/* ================= ROYAL VISA — v3 ================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --bg-0: #070812;
    --card: #151334c9;
    --stroke: #ffffff14;
    --violet: #7c5cff;
    --violet-2: #a78bfa;
    --royal: #232a86;
    --pink: #d946ef;
    --gold: #e6c479;
    --text: #f2f0ff;
    --muted: #9a94c9;
    --danger: #ff7a90;
    --radius: 20px;
    --shadow: 0 24px 60px -24px rgba(90, 50, 200, .5);
    --font-display: 'Marcellus', serif;
    --font-body: 'Outfit', sans-serif;
    --font-ar: 'Tajawal', sans-serif;
}

html {
    scroll-behavior: smooth
}

body {
    min-height: 100svh;
    color: var(--text);
    background: var(--bg-0);
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    touch-action: manipulation
}

html[lang="ar"] body {
    font-family: var(--font-ar)
}

[hidden] {
    display: none !important
}

body.lock {
    overflow: hidden
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer
}

input,
textarea,
select {
    font: inherit;
    color: var(--text)
}

/* ---------- living 2D scene ---------- */
.bg-scene {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(120% 90% at 85% -10%, #1b1464 0%, transparent 55%),
        radial-gradient(100% 80% at 8% 112%, #241a6b 0%, transparent 55%), var(--bg-0)
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none
}

.planet {
    position: absolute;
    top: -14vmax;
    inset-inline-start: -12vmax;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 35%, #6d4aff 0%, #3b2bb3 42%, #171243 78%);
    box-shadow: 0 0 90px 30px #7c5cff2e, inset -30px -30px 80px #00000088;
    animation: breathe 9s ease-in-out infinite alternate
}

@keyframes breathe {
    to {
        transform: scale(1.06);
        box-shadow: 0 0 120px 40px #7c5cff3d, inset -30px -30px 80px #00000088
    }
}

.aurora {
    position: absolute;
    width: 70vmax;
    height: 26vmax;
    filter: blur(60px);
    opacity: .28;
    border-radius: 50%
}

.a1 {
    bottom: -14vmax;
    inset-inline-start: -16vmax;
    background: radial-gradient(circle, #4c1d95, transparent 65%);
    animation: drift1 26s ease-in-out infinite alternate
}

.a2 {
    bottom: -16vmax;
    inset-inline-end: -18vmax;
    background: radial-gradient(circle, #1e2a8a, transparent 65%);
    animation: drift2 32s ease-in-out infinite alternate
}

@keyframes drift1 {
    to {
        transform: translate(8vmax, -4vmax) scale(1.12)
    }
}

@keyframes drift2 {
    to {
        transform: translate(-7vmax, -5vmax) scale(1.1)
    }
}

.plane-wrap {
    position: absolute;
    top: 22%;
    inset-inline-start: 0;
    animation: fly 30s linear infinite;
    opacity: .7
}

.plane-bob {
    animation: bob 3.4s ease-in-out infinite alternate;
    color: #c4b5fd
}

.plane-bob svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 8px #7c5cff88)
}

@keyframes fly {
    0% {
        transform: translateX(-12vw)
    }

    50% {
        transform: translateX(50vw) translateY(-4vh)
    }

    100% {
        transform: translateX(112vw)
    }
}

@keyframes bob {
    to {
        transform: translateY(6px) rotate(4deg)
    }
}

html[dir="rtl"] .plane-wrap {
    animation-name: flyRtl
}

@keyframes flyRtl {
    0% {
        transform: translateX(112vw)
    }

    50% {
        transform: translateX(50vw) translateY(-4vh)
    }

    100% {
        transform: translateX(-12vw)
    }
}

html[dir="rtl"] .plane-bob svg {
    transform: scaleX(-1)
}

/* ---------- header ---------- */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1080px;
    margin-inline: auto;
    padding: calc(14px + env(safe-area-inset-top)) 18px 4px
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px
}

.brand-logo svg,
.brand-logo img {
    width: 36px;
    height: 36px;
    display: block;
    filter: drop-shadow(0 4px 14px rgba(124, 92, 255, .5))
}

.brand-logo img {
    object-fit: contain;
    border-radius: 10px
}

.brand-name {
    font-family: var(--font-display);
    font-size: 16px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold)
}

html[lang="ar"] .brand-name {
    font-family: var(--font-ar);
    font-weight: 800;
    letter-spacing: 0;
    font-size: 17px
}

.lang-float {
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: #141233d9;
    border: 1px solid var(--stroke);
    backdrop-filter: blur(12px)
}

.lang-float button {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    transition: .25s
}

.lang-float button.on {
    background: linear-gradient(135deg, var(--violet), var(--royal));
    color: #fff
}

/* ---------- layout intelligence ---------- */
#app {
    max-width: 1080px;
    margin-inline: auto;
    padding: 6px 18px 26px;
    min-height: calc(100svh - 76px);
    display: flex;
    flex-direction: column
}

.screen {
    display: none;
    flex: 1;
    flex-direction: column
}

.screen.active {
    display: flex;
    animation: screenIn .5s cubic-bezier(.2, .7, .2, 1)
}

@keyframes screenIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.s-inner {
    margin-top: auto;
    margin-bottom: 10px;
    width: 100%
}

.s-inner.center {
    margin-block: auto
}

#screen-form .s-inner {
    max-width: 720px;
    margin-inline: auto
}

#screen-thanks .s-inner {
    max-width: 640px;
    margin-inline: auto
}

/* ---------- flying plane on curved path (bottom deco) ---------- */
.flight-deco {
    margin-top: auto;
    display: flex;
    justify-content: center;
    padding: 14px 0 4px;
    color: #8b7bd8
}

.flight-deco svg {
    width: min(680px, 92%);
    height: 70px;
    overflow: visible;
    opacity: .85
}

.flight-deco path[stroke] {
    stroke: #7c5cff59
}

.deco-plane {
    color: #c4b5fd;
    filter: drop-shadow(0 0 10px #7c5cffcc)
}

html[dir="rtl"] .flight-deco svg {
    transform: scaleX(-1)
}

/* ---------- headline / search ---------- */
.headline {
    text-align: center;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(26px, 5vw, 42px);
    letter-spacing: .05em;
    color: #fff
}

.headline .accent {
    background: linear-gradient(120deg, var(--violet-2), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

html[lang="ar"] .headline {
    font-family: var(--font-ar);
    font-weight: 800;
    letter-spacing: 0
}

.spark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 18px;
    color: var(--gold)
}

.spark svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    filter: drop-shadow(0 0 8px #e6c47988);
    animation: twinkle 2.6s ease-in-out infinite
}

.spark i {
    width: 56px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent)
}

@keyframes twinkle {
    50% {
        transform: scale(1.35) rotate(20deg)
    }
}

.search {
    position: relative;
    max-width: 430px;
    margin: 0 auto 26px
}

.search svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--muted)
}

.search input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    border-radius: 999px;
    background: #100e2ab0;
    border: 1px solid var(--stroke);
    outline: none;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: .25s
}

html[dir="rtl"] .search input {
    padding: 13px 44px 13px 16px
}

.search input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px #7c5cff26
}

/* ---------- cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px
}

@media(max-width:430px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px
    }
}

.dest-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: start;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .3s, box-shadow .3s
}

.dest-card:hover {
    transform: translateY(-6px);
    border-color: #7c5cff55
}

.dest-card:active {
    transform: scale(.965)
}

.dest-card.enter {
    animation: cardIn .6s both cubic-bezier(.2, .7, .2, 1)
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.96)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.dest-media {
    position: relative;
    display: block;
    aspect-ratio: 4/2.8;
    overflow: hidden
}

.dest-media svg,
.dest-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.dest-media img {
    animation: kenburns 16s ease-in-out infinite alternate
}

@keyframes kenburns {
    to {
        transform: scale(1.1) translate(1.5%, -1.5%)
    }
}

.dest-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 9, 26, .6), transparent 55%)
}

.dest-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg, transparent 40%, #ffffff22 50%, transparent 60%);
    transform: translateX(-120%);
    pointer-events: none
}

html[dir="rtl"] .dest-card::before {
    transform: translateX(120%)
}

.dest-card:hover::before {
    transform: translateX(120%);
    transition: transform .8s ease
}

html[dir="rtl"] .dest-card:hover::before {
    transform: translateX(-120%)
}

.flag-chip {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    z-index: 3;
    width: 30px;
    height: 22px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ffffff33;
    box-shadow: 0 4px 12px #0008
}

.flag-chip svg {
    width: 100%;
    height: 100%
}

.flag-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 40px;
    font-weight: 800;
    color: #fffc;
    background: linear-gradient(140deg, var(--ac, #7c5cff), #1b1464)
}

.dest-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px 14px
}

.dest-name {
    font-size: 16px;
    font-weight: 700
}

.dest-tag {
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.5
}

.dest-check {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    z-index: 3;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold), #c99b4e);
    color: #241a05;
    transform: scale(0);
    transition: transform .3s cubic-bezier(.3, 1.6, .4, 1)
}

.dest-check svg {
    width: 15px;
    height: 15px
}

.dest-card.selected {
    border-color: var(--violet);
    box-shadow: 0 0 0 2px var(--violet), 0 26px 60px -22px rgba(124, 92, 255, .7)
}

.dest-card.selected .dest-check {
    transform: scale(1)
}

/* skeleton */
.dest-card.skel {
    pointer-events: none
}

.dest-card.skel .dest-media {
    background: linear-gradient(100deg, #1a1840 40%, #262258 50%, #1a1840 60%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite
}

.sk-line {
    display: block;
    height: 12px;
    border-radius: 6px;
    margin: 8px 14px 0;
    background: linear-gradient(100deg, #1a1840 40%, #262258 50%, #1a1840 60%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite
}

.w60 {
    width: 55%
}

.w90 {
    width: 85%;
    margin-bottom: 16px
}

@keyframes shimmer {
    to {
        background-position: -200% 0
    }
}

.empty,
.error-box {
    text-align: center;
    color: var(--muted);
    padding: 30px 0
}

.error-box p {
    margin-bottom: 12px
}

/* ---------- buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 22px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--violet), var(--pink));
    color: #fff;
    font-weight: 700;
    font-size: 15.5px;
    box-shadow: 0 14px 34px -14px var(--violet);
    transition: transform .25s, box-shadow .25s, opacity .2s
}

.btn-primary:hover {
    transform: translateY(-2px)
}

.btn-primary:hover .ic-send {
    transform: translate(4px, -4px) rotate(-8deg)
}

.btn-primary:active {
    transform: scale(.97)
}

.btn-primary:disabled {
    opacity: .6;
    transform: none
}

.ic-send {
    width: 17px;
    height: 17px;
    transition: transform .3s
}

html[dir="rtl"] .ic-send {
    transform: scaleX(-1)
}

html[dir="rtl"] .btn-primary:hover .ic-send {
    transform: scaleX(-1) translate(4px, -4px)
}

.btn-ghost {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    color: var(--violet-2);
    transition: .25s
}

.btn-ghost:hover {
    border-color: var(--violet);
    color: #fff
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #fff5;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* ---------- form screen: back + compact banner + card ---------- */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    margin: 8px 0 14px;
    padding: 6px 10px;
    border-radius: 10px;
    transition: .25s
}

.btn-back:hover {
    color: #fff;
    background: #ffffff0d
}

html[dir="rtl"] .ic-back {
    transform: scaleX(-1)
}

.banner {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    height: 170px;
    width: 100%;
    max-width: 680px;
    margin: 0 auto 16px;
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #2a1d6b, #15103a)
}

.banner-media {
    position: absolute;
    inset: 0;
    display: block
}

.banner-media .banner-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
    animation: kenburns 18s ease-in-out infinite alternate
}

.banner-media .banner-flag {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(80% 120% at 50% 0%, #3a2a8a66, transparent)
}

.banner-media .banner-flag svg {
    width: auto;
    height: 72%;
    aspect-ratio: 3/2;
    border-radius: 12px;
    box-shadow: 0 12px 34px #0009;
    opacity: .95
}

.banner.no-photo {
    height: 130px
}

.banner-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0b0a20f0 6%, #0b0a2059 55%, transparent)
}

.banner-bar {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    z-index: 2
}

@media(max-width:640px) {
    .banner {
        height: 140px
    }

    .banner.no-photo {
        height: 112px
    }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #141233d9;
    border: 1px solid #7c5cff44;
    font-size: 13.5px;
    font-weight: 700;
    backdrop-filter: blur(8px)
}

.chip-flag {
    width: 24px;
    height: 17px;
    border-radius: 5px;
    overflow: hidden;
    flex: none
}

.chip-flag svg {
    width: 100%;
    height: 100%
}

.chip-btn {
    font-size: 12px;
    color: var(--violet-2);
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    backdrop-filter: blur(8px);
    transition: .25s
}

.chip-btn:hover {
    border-color: var(--violet);
    color: #fff
}

.form-card {
    max-width: 680px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 24px;
    padding: 26px 22px;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow)
}

.form-card h2 {
    font-size: 22px;
    color: #fff
}

html[lang="ar"] .form-card h2 {
    font-family: var(--font-ar);
    font-weight: 800
}

.form-sub {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 20px
}

#dyn-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px
}

@media(max-width:640px) {
    #dyn-form {
        grid-template-columns: 1fr
    }
}

.field {
    margin-bottom: 14px
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 7px;
    font-weight: 600
}

.req {
    color: var(--gold);
    margin-inline-start: 3px
}

.field input,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: 13px;
    background: #0e0c26b0;
    border: 1px solid var(--stroke);
    outline: none;
    font-size: 14.5px;
    transition: border-color .25s, box-shadow .25s
}

.field input:focus,
.field textarea:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px #7c5cff2b
}

.field input.invalid,
.field textarea.invalid {
    border-color: var(--danger)
}

.field input.ltr,
.field textarea.ltr {
    direction: ltr;
    text-align: left
}

.field .err {
    min-height: 15px;
    font-size: 11.5px;
    color: var(--danger);
    margin-top: 5px;
    opacity: 0
}

.field .err.on {
    opacity: 1
}

.field.shake {
    animation: shake .4s
}

@keyframes shake {
    25% {
        transform: translateX(-5px)
    }

    75% {
        transform: translateX(5px)
    }
}

#btn-submit {
    margin-top: 6px
}

.secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 13px;
    font-size: 12px;
    color: var(--muted)
}

.secure-note svg {
    width: 13px;
    height: 13px;
    color: var(--gold)
}

.form-error {
    margin-top: 10px;
    font-size: 13px;
    color: var(--danger);
    text-align: center
}

/* ---------- thanks ---------- */
.thanks {
    text-align: center;
    max-width: 520px;
    margin-inline: auto
}

.check-wrap {
    position: relative;
    width: 130px;
    margin: 0 auto 20px
}

.check-svg {
    width: 130px;
    height: 130px;
    filter: drop-shadow(0 0 26px #7c5cff66)
}

.check-svg circle {
    stroke-dasharray: 264;
    stroke-dashoffset: 264
}

.check-svg .check-path {
    stroke-dasharray: 70;
    stroke-dashoffset: 70
}

.thanks.play circle {
    animation: draw 1s cubic-bezier(.4, 0, .2, 1) forwards
}

.thanks.play .check-path {
    animation: draw .6s .8s cubic-bezier(.4, 0, .2, 1) forwards
}

@keyframes draw {
    to {
        stroke-dashoffset: 0
    }
}

.burst i {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0
}

.burst i:nth-child(odd) {
    background: var(--gold)
}

.burst i:nth-child(even) {
    background: var(--violet-2)
}

.thanks.play .burst i {
    animation: spark .9s .75s cubic-bezier(.2, .7, .3, 1) forwards
}

.thanks.play .burst i:nth-child(1) {
    --a: 0deg
}

.thanks.play .burst i:nth-child(2) {
    --a: 45deg
}

.thanks.play .burst i:nth-child(3) {
    --a: 90deg
}

.thanks.play .burst i:nth-child(4) {
    --a: 135deg
}

.thanks.play .burst i:nth-child(5) {
    --a: 180deg
}

.thanks.play .burst i:nth-child(6) {
    --a: 225deg
}

.thanks.play .burst i:nth-child(7) {
    --a: 270deg
}

.thanks.play .burst i:nth-child(8) {
    --a: 315deg
}

@keyframes spark {
    0% {
        opacity: 1;
        transform: rotate(var(--a)) translateX(14px) scale(1)
    }

    100% {
        opacity: 0;
        transform: rotate(var(--a)) translateX(78px) scale(.2)
    }
}

.thanks h2 {
    font-family: var(--font-display);
    font-size: clamp(26px, 5vw, 36px);
    background: linear-gradient(120deg, #fff, var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px
}

html[lang="ar"] .thanks h2 {
    font-family: var(--font-ar);
    font-weight: 800
}

.thanks p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.9
}

/* ---------- whatsapp float ---------- */
#wa-float {
    position: fixed;
    bottom: calc(18px + env(safe-area-inset-bottom));
    right: 18px;
    z-index: 80;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #0f2b1d;
    border: 1px solid #25D36655;
    box-shadow: 0 12px 30px -10px #25D36688;
    transition: transform .25s
}

#wa-float svg {
    width: 30px;
    height: 30px
}

#wa-float::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25D36644;
    animation: waPulse 2s infinite
}

@keyframes waPulse {
    0% {
        transform: scale(.9);
        opacity: 1
    }

    100% {
        transform: scale(1.35);
        opacity: 0
    }
}

#wa-float:hover {
    transform: scale(1.08)
}

.wa-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #141233;
    border: 1px solid var(--stroke);
    color: var(--text);
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: .25s
}

#wa-float:hover .wa-tip {
    opacity: 1
}

/* ---------- transition overlay ---------- */
#overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    background: radial-gradient(90% 90% at 30% 20%, #4c1d95 0%, #1b1464 45%, #0b0d1f 100%)
}

#overlay .overlay-logo {
    width: 70px;
    height: 70px;
    opacity: 0
}

#overlay .overlay-logo svg,
#overlay .overlay-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

#overlay.show .overlay-logo {
    animation: logoPop .7s .1s cubic-bezier(.3, 1.4, .4, 1) forwards
}

@keyframes logoPop {
    to {
        opacity: 1;
        transform: scale(1)
    }
}

.loader {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 44px 0
}

.loader span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--violet-2);
    animation: pulse 1s infinite ease-in-out
}

.loader span:nth-child(2) {
    animation-delay: .16s
}

.loader span:nth-child(3) {
    animation-delay: .32s
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(.6);
        opacity: .4
    }

    50% {
        transform: scale(1);
        opacity: 1
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important
    }
}

.hp-field {
    position: absolute;
    inset-inline-start: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none
}

/* ===== v5: realistic planes + statuses + stats + paused ===== */
.plane-sine {
    animation: sine 7s ease-in-out infinite
}

@keyframes sine {

    0%,
    100% {
        transform: translateY(0)
    }

    30% {
        transform: translateY(-16px)
    }

    65% {
        transform: translateY(10px)
    }
}

.plane-bob {
    position: relative;
    animation: bank 7s ease-in-out infinite;
    color: #c4b5fd
}

@keyframes bank {

    0%,
    100% {
        transform: rotate(2deg)
    }

    30% {
        transform: rotate(-5deg)
    }

    65% {
        transform: rotate(6deg)
    }
}

.contrail {
    position: absolute;
    top: 50%;
    right: calc(100% - 2px);
    width: 64px;
    height: 2px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: linear-gradient(to left, #c4b5fd55, transparent);
    filter: blur(.5px)
}

html[dir="rtl"] .contrail {
    right: auto;
    left: calc(100% - 2px);
    background: linear-gradient(to right, #c4b5fd55, transparent)
}

.st {
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid
}

.st-new {
    color: #8ab6ff;
    border-color: #3b82f655;
    background: #3b82f61a
}

.st-contacted {
    color: #ffd479;
    border-color: #e6c47955;
    background: #e6c4791a
}

.st-processing {
    color: #c4b5fd;
    border-color: #7c5cff55;
    background: #7c5cff1a
}

.st-done {
    color: #7ef0c0;
    border-color: #10b98155;
    background: #10b9811a
}

.st-select {
    padding: 5px 8px;
    border-radius: 10px;
    background: #0e0c26;
    border: 1px solid var(--stroke);
    font-size: 11.5px;
    outline: none
}

.ic-btn.wa {
    color: #25D366;
    border-color: #25D36644
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 14px
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 13px 14px
}

.stat-num {
    font-size: 23px;
    font-weight: 800;
    color: #fff
}

.stat-lbl {
    font-size: 11.5px;
    color: var(--muted)
}

.bars {
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    gap: 7px
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted)
}

.bar-row b {
    min-width: 70px;
    color: var(--text);
    font-weight: 600
}

.bar-row .bar {
    flex: 1;
    height: 8px;
    border-radius: 99px;
    background: #ffffff12;
    overflow: hidden
}

.bar-row .bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--violet), var(--pink))
}

.paused-msg {
    text-align: center;
    color: var(--muted);
    padding: 26px 8px;
    font-size: 14.5px;
    line-height: 2
}

/* ===== v6 fixes + tracking ===== */
.m-grid textarea{width:100%;padding:11px 13px;border-radius:12px;background:#0e0c26;border:1px solid var(--stroke);outline:none;color:var(--text);font-size:13px;resize:vertical;min-height:90px}
#set-px{font-family:ui-monospace,Consolas,monospace;font-size:12px;min-height:140px}
.m-grid textarea:focus{border-color:var(--violet);box-shadow:0 0 0 3px #7c5cff2b}
.set-title{margin:22px 0 12px;font-size:15px;color:var(--gold);border-top:1px dashed var(--stroke);padding-top:18px}
.tr-hint{font-size:11.5px;color:var(--muted);line-height:1.9}
#wa-float{background:#25D366;border:none;box-shadow:0 12px 30px -8px #25d366aa}
#wa-float svg{width:32px;height:32px}
#wa-float::before{border-color:#25D36666}

/* ===== v7 performance: lite mode (phones) — desktop stays fully rich ===== */
.lite .aurora{filter:none}
.lite .planet{animation:none}
.lite .dest-media img,.lite .banner-media .banner-photo{animation:none}
.lite .dest-card,.lite .form-card,.lite .lang-float,.lite .search input,.lite .chip,.lite .chip-btn{backdrop-filter:none;-webkit-backdrop-filter:none}
.lite .dest-card{box-shadow:0 12px 32px -20px rgba(90,50,200,.45)}
.lite .form-card{box-shadow:0 16px 40px -24px rgba(90,50,200,.5)}
@media (pointer:coarse){.dest-card:hover{transform:none}}

/* ===== v8: GPU-smooth transition on phones + CLS guards ===== */
#overlay.circle{inset:auto;border-radius:50%;will-change:transform,opacity}
#overlay.circle .overlay-logo{display:none}
.headline{min-height:1.35em}
.brand-name{min-height:1.5em}
.dest-name{min-height:1.5em}
.dest-tag{min-height:2.4em}
.form-card h2{min-height:1.4em}
.thanks h2{min-height:1.4em}

.upload-row{display:flex;gap:8px}
.upload-row input:not([type=file]){flex:1;min-width:0}
.btn-upload{flex:none;display:inline-flex;align-items:center;gap:6px;padding:11px 16px;border-radius:12px;cursor:pointer;
  background:linear-gradient(135deg,var(--violet),var(--royal));color:#fff;font-size:13px;font-weight:600;transition:.2s;white-space:nowrap}
.btn-upload:hover{transform:translateY(-1px)}
.btn-upload:active{transform:scale(.97)}
.field textarea { min-height: 110px; resize: vertical; }

/* Final visual polish: existing content only. */
.dest-card,
.form-card {
    isolation: isolate;
}

.dest-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,.055), transparent 46%);
    pointer-events: none;
}

#wa-float {
    right: auto;
    inset-inline-end: max(16px, env(safe-area-inset-right));
    box-sizing: border-box;
}

.wa-tip {
    right: auto;
    inset-inline-end: 0;
}

@media (max-width: 640px) {
    #wa-float {
        width: 52px;
        height: 52px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        inset-inline-end: max(14px, env(safe-area-inset-right));
    }

    #wa-float svg { width: 29px; height: 29px; }
    .plane-wrap { animation-duration: 38s; opacity: .5; }
    .plane-sine, .plane-bob { animation-duration: 8s; }
    .contrail { filter: none; }
}

@media (hover: none), (pointer: coarse) {
    .wa-tip { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .plane-wrap, .plane-sine, .plane-bob, #wa-float::before { animation: none !important; }
    .plane-wrap { display: none; }
}
