/* ============================================================
   Sim Of World — Pre-Registration
   Dark theme · Inter (body) + Poppins (display)
   ============================================================ */

:root {
    --bg-0: #060d16;
    --bg-1: #0a1622;
    --panel: #0f1c2b;
    --panel-2: #122336;
    --line: rgba(148, 190, 233, .14);
    --text: #e8f1f8;
    --muted: #93a9bd;
    --faint: #5f7890;
    --gold: #f6c453;
    --gold-2: #e8a838;
    --gold-deep: #b97f1d;
    --teal: #37e0c8;
    --teal-2: #19b8a3;
    --danger: #ff6b7a;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Poppins', var(--font-body);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    color: var(--text);
    background: linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 45%, #0a1622 100%);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(246, 196, 83, .35); color: #fff; }

/* subtle scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #1c3044; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #27405a; }

/* ---------- ambient background (static) ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.bg-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.bg-glow--teal {
    width: 520px; height: 520px; top: -140px; left: -140px;
    background: rgba(25, 184, 163, .26);
}
.bg-glow--gold {
    width: 560px; height: 560px; bottom: -200px; right: -160px;
    background: rgba(232, 150, 31, .15);
}

/* keep content above background */
.topbar { position: relative; z-index: 100; }   /* dropdown ustte kalsin */
.page, .footer { position: relative; z-index: 1; }

/* ---------- topbar ---------- */
.topbar {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 22px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}
.brand-logo {
    height: 40px;
    width: auto;
    max-width: 240px;
    flex: none;
    filter: drop-shadow(0 2px 8px rgba(246, 196, 83, .25));
}

/* ---------- language switcher (dropdown) ---------- */
.lang-switch {
    position: relative;
    z-index: 50;
}
.lang-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px 7px 10px;
    border: 1px solid var(--line);
    background: rgba(15, 28, 43, .75);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    cursor: pointer;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    transition: border-color .2s, box-shadow .2s;
}
.lang-current:hover { border-color: rgba(55, 224, 200, .45); }
.lang-current:focus-visible {
    outline: 0;
    border-color: rgba(55, 224, 200, .55);
    box-shadow: 0 0 0 3px rgba(55, 224, 200, .14);
}
.lang-name { white-space: nowrap; }
.lang-caret {
    width: 14px; height: 14px;
    color: var(--muted);
    transition: transform .2s;
}
.lang-current[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

/* bayrak / flag */
.flag {
    width: 20px; height: 14px;
    object-fit: cover;
    border-radius: 2px;
    flex: none;
    background: rgba(255, 255, 255, .05);
    display: inline-block;
}
/* bayrak yuklenemezse (AQ, BQ, EH vb.) gri kod yer tutucu */
.flag-missing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 190, 233, .12);
    color: var(--faint);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
}
.flag-missing::after { content: attr(data-code); }
/* trigger'daki bayrak (secili ulke) */
.flag-trigger { width: 20px; height: 14px; }
/* generic hidden yardimci (display:none) */
.hidden { display: none !important; }

/* dropdown menu */
.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    max-width: calc(100vw - 32px);
    /* viewport'un altindan tasmamasi icin dinamik max-height */
    max-height: min(420px, calc(100vh - 120px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    margin: 0; padding: 6px;
    background: rgba(12, 22, 34, .98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .6);
    animation: langMenuIn .15s ease-out;
}
@keyframes langMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lang-menu li { margin: 0; }
/* scrollbar */
.lang-menu::-webkit-scrollbar { width: 8px; }
.lang-menu::-webkit-scrollbar-track { background: transparent; }
.lang-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 190, 233, .2);
    border-radius: 8px;
}
.lang-menu::-webkit-scrollbar-thumb:hover { background: rgba(148, 190, 233, .35); }
.lang-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    background: transparent;
    border-radius: 9px;
    color: var(--muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    text-align: start;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.lang-menu button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.lang-menu button.active {
    background: linear-gradient(135deg, rgba(255, 215, 106, .15), rgba(232, 168, 56, .12));
    color: var(--gold);
}
.lang-menu-name { flex: 1; }

/* scrollbar in menu */
.lang-menu::-webkit-scrollbar { width: 8px; }
.lang-menu::-webkit-scrollbar-track { background: transparent; }
.lang-menu::-webkit-scrollbar-thumb { background: rgba(148, 190, 233, .2); border-radius: 8px; }

/* ---------- layout ---------- */
.page {
    flex: 1;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(28px, 5vh, 60px) 24px 44px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(34px, 5vw, 76px);
    align-items: center;
}

/* ---------- hero (left) ---------- */
.hero { position: relative; }

.hero > * { position: relative; z-index: 1; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid rgba(55, 224, 200, .35);
    border-radius: 999px;
    background: rgba(55, 224, 200, .08);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .18em;
    color: var(--teal);
}
.tag-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--teal);
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(55, 224, 200, .6); }
    55%      { box-shadow: 0 0 0 7px rgba(55, 224, 200, 0); }
}

h1 {
    margin-top: 22px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.7rem, 6vw, 4.4rem);
    line-height: 1.04;
    letter-spacing: -.02em;
}
h1 .accent {
    color: var(--gold);
    text-shadow: 0 0 34px rgba(246, 196, 83, .45);
}

.hero-form-name {
    margin-top: 12px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(.82rem, 1.5vw, .98rem);
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--teal);
}

.hero-desc {
    margin-top: 18px;
    max-width: 46ch;
    font-size: 1.03rem;
    line-height: 1.65;
    color: var(--muted);
}

/* reward card */
.reward {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid transparent;
    background:
        linear-gradient(var(--panel), var(--panel)) padding-box,
        linear-gradient(120deg, var(--gold), rgba(246,196,83,.15) 40%, var(--gold-2)) border-box;
    position: relative;
    overflow: hidden;
}
.reward::after { /* shimmer sweep — disabled */
    content: none;
}
.reward-icon {
    flex: none;
    width: 50px; height: 50px;
    border-radius: 13px;
    display: grid; place-items: center;
    background: rgba(246, 196, 83, .12);
    border: 1px solid rgba(246, 196, 83, .3);
    color: var(--gold);
}
.reward-icon svg { width: 26px; height: 26px; }
.reward-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-2);
}
.reward-value {
    margin-top: 3px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.22rem;
    line-height: 1.25;
    color: var(--gold);
}
.reward-note { margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* chips */
.chips {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}
.chips li {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    transition: transform .2s, border-color .25s, color .25s;
}
.chips li:hover { transform: translateY(-2px); border-color: rgba(55, 224, 200, .45); color: var(--text); }

/* ---------- form panel (right) ---------- */
.panel {
    width: 100%;
    max-width: 470px;
    justify-self: end;
    padding: clamp(26px, 4vw, 38px);
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, .6),
        inset 0 1px 0 rgba(255, 255, 255, .05);
    position: relative;
    /* overflow: hidden kaldirildi — ulke dropdown'u tasmak zorunda */
}
.panel::before { /* top accent hairline */
    content: '';
    position: absolute;
    top: -1px; left: 8%; right: 8%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--teal), transparent);
    opacity: .8;
    /* panel overflow:hidden olmadigi icin::before'un kenarlarda tasmamasi icin */
    border-radius: 2px;
}

.panel-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -.01em;
}
.panel-sub { margin-top: 7px; font-size: 14px; color: var(--muted); }

/* field */
.field { display: block; margin-top: 26px; }
.field-label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #cfe0ee;
}
.field-box {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 54px;
    padding: 0 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: #0a1420;
    color: var(--faint);
    transition: border-color .25s, box-shadow .25s, color .25s;
}
.field-box svg { width: 19px; height: 19px; flex: none; }
.field-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    font-family: var(--font-body);
    font-size: 15.5px;
    color: var(--text);
}
.field-box input::placeholder { color: var(--faint); }

/* select — input ile ayni koyu tema / same dark theme as input */
/* ---------- country dropdown (aramali / searchable) ---------- */
.country-select {
    position: relative;
    z-index: 20;
}
.country-trigger {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    height: 54px;
    padding: 0 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: #0a1420;
    color: var(--faint);
    font-family: var(--font-body);
    font-size: 15.5px;
    cursor: pointer;
    text-align: start;
    transition: border-color .25s, box-shadow .25s, color .25s;
}
.country-trigger-icon { width: 19px; height: 19px; flex: none; }
.country-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.country-trigger-text.placeholder { color: var(--faint); }
.country-caret {
    width: 18px; height: 18px;
    flex: none;
    color: var(--faint);
    transition: transform .2s, color .2s;
}
.country-trigger:hover { border-color: rgba(55, 224, 200, .4); }
.country-trigger[aria-expanded="true"] .country-caret {
    transform: rotate(180deg);
    color: var(--teal);
}
.country-trigger[aria-expanded="true"] {
    border-color: rgba(55, 224, 200, .55);
    box-shadow: 0 0 0 3px rgba(55, 224, 200, .14);
    color: var(--teal);
}
.country-select.error .country-trigger {
    border-color: rgba(255, 107, 122, .65);
    box-shadow: 0 0 0 3px rgba(255, 107, 122, .12);
    color: var(--danger);
}

/* dropdown paneli */
.country-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: rgba(12, 22, 34, .98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .7);
    overflow: hidden;
    animation: countryPanelIn .15s ease-out;
    z-index: 30;
}
@keyframes countryPanelIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.country-search-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border-bottom: 1px solid var(--line);
}
.country-search-wrap svg {
    width: 16px; height: 16px;
    flex: none;
    color: var(--faint);
}
.country-search {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}
.country-search::placeholder { color: var(--faint); }

.country-list {
    list-style: none;
    margin: 0; padding: 6px;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.country-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 9px;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    transition: background .12s, color .12s;
}
.country-list li:hover {
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}
.country-list li.active {
    background: linear-gradient(135deg, rgba(55, 224, 200, .15), rgba(55, 224, 200, .08));
    color: var(--teal);
}
.country-list .country-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.country-list .country-empty {
    justify-content: center;
    color: var(--faint);
    cursor: default;
    font-size: 13px;
}
/* scrollbar */
.country-list::-webkit-scrollbar { width: 8px; }
.country-list::-webkit-scrollbar-track { background: transparent; }
.country-list::-webkit-scrollbar-thumb {
    background: rgba(148, 190, 233, .2);
    border-radius: 8px;
}

/* ---------- field-box genel hata hali ---------- */
.field-box.error {
    border-color: rgba(255, 107, 122, .65);
    box-shadow: 0 0 0 3px rgba(255, 107, 122, .12);
    color: var(--danger);
}

/* consent checkbox */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 18px;
    cursor: pointer;
    user-select: none;
}
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent .box {
    flex: none;
    width: 21px; height: 21px;
    margin-top: 1px;
    border-radius: 6px;
    border: 1.5px solid var(--line);
    background: #0a1420;
    display: grid; place-items: center;
    color: #241703;
    transition: background .2s, border-color .2s, transform .15s;
}
.consent .box svg { width: 13px; height: 13px; opacity: 0; transform: scale(.4); transition: opacity .18s, transform .22s cubic-bezier(.34,1.56,.64,1); }
.consent input:checked + .box {
    background: linear-gradient(135deg, #ffd76a, var(--gold-2));
    border-color: var(--gold-2);
}
.consent input:checked + .box svg { opacity: 1; transform: scale(1); }
.consent input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(246, 196, 83, .25); }
.consent.shake .box { animation: shake .4s; }
.consent-text { font-size: 13px; line-height: 1.6; color: var(--muted); }
.consent-text a {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}
.consent-text a:hover { color: var(--teal-2); }

/* honeypot — gizli / hidden */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* submit button */
.btn {
    margin-top: 24px;
    width: 100%;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .02em;
    color: #241703;
    background: linear-gradient(135deg, #ffd76a, var(--gold-2) 55%, #e8961f);
    box-shadow: 0 12px 28px -8px rgba(240, 169, 46, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
    position: relative;
    overflow: hidden;
    transition: transform .18s, box-shadow .25s, filter .25s;
}
.btn::after { /* shine sweep */
    content: '';
    position: absolute;
    top: -60%; bottom: -60%;
    left: 0;
    width: 40%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg) translateX(-180%);
    transition: transform .8s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 16px 34px -8px rgba(240,169,46,.65), inset 0 1px 0 rgba(255,255,255,.5); }
.btn:hover::after { transform: skewX(-20deg) translateX(320%); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-arrow { width: 19px; height: 19px; transition: transform .2s; }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-spinner {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(36, 23, 3, .25);
    border-top-color: #241703;
    animation: btnSpin .7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
.btn[disabled] { cursor: default; filter: saturate(.7) brightness(.92); transform: none; }

/* form message */
.form-msg {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
    background: rgba(255, 107, 122, .1);
    border: 1px solid rgba(255, 107, 122, .35);
    color: #ffb3bc;
}
.form-msg.show { animation: shake .4s; }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    45% { transform: translateX(5px); }
    70% { transform: translateX(-3px); }
    90% { transform: translateX(2px); }
}

/* ---------- success / already state ---------- */
.state { text-align: center; padding: 22px 4px 10px; position: relative; }
.state-icon {
    width: 86px; height: 86px;
    margin: 0 auto 20px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(55, 224, 200, .08);
    box-shadow: 0 0 0 1px rgba(55, 224, 200, .25), 0 0 40px rgba(55, 224, 200, .18);
    position: relative;
}
.state-icon .check { width: 48px; height: 48px; }
.state-icon .check circle {
    stroke: var(--teal);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: draw .7s ease forwards;
}
.state-icon .check path {
    stroke: var(--teal);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: draw .4s .5s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.state-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
}
.state-desc {
    margin: 10px auto 0;
    max-width: 36ch;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--muted);
}
.state-email {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 15px;
    border-radius: 999px;
    border: 1px solid rgba(55, 224, 200, .3);
    background: rgba(55, 224, 200, .08);
    color: var(--teal);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .03em;
}

/* ---------- footer ---------- */
.footer {
    padding: 26px 24px 30px;
    text-align: center;
}
.footer a {
    font-size: 13px;
    color: var(--faint);
    text-decoration: none;
    transition: color .25s;
}
.footer a:hover { color: var(--muted); }

/* ---------- entrance reveal ---------- */
.reveal { opacity: 0; animation: fadeUp .7s cubic-bezier(.22, 1, .36, 1) forwards; }
.d1 { animation-delay: .08s; } .d2 { animation-delay: .16s; } .d3 { animation-delay: .24s; }
.d4 { animation-delay: .32s; } .d5 { animation-delay: .4s; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .page { grid-template-columns: 1fr; gap: 40px; align-items: start; }
    .panel { justify-self: center; max-width: 520px; }
    .hero { text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .chips { justify-content: center; }
    .reward { text-align: left; }
}

@media (max-width: 560px) {
    .topbar { padding: 18px 18px 0; }
    .page { padding-left: 18px; padding-right: 18px; }
    .brand-logo { height: 32px; }
    .lang-current { padding: 6px 10px 6px 8px; font-size: 12px; }
    .lang-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
    .lang-menu { min-width: 180px; }
    .reward { flex-direction: row; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .reveal { opacity: 1; }
}
