/* ==========================================================================
   Bikupon — Soft Auth (giriş / kayıt / şifre sıfırlama)
   Mobil öncelikli; iOS Safari, Android Chrome ve masaüstü için optimize.
   ========================================================================== */

:root {
    /* Açık tema değerleri (data-theme="light") */
    color-scheme: light;

    --bg: #FFF4EE;
    --blob-1: #FFD3CB;
    --blob-2: #FFE7BF;
    --blob-3: #E7E2FF;

    --surface: #FFFFFF;
    --surface-2: #FFF8F5;
    --surface-3: #FFEFEA;
    --hero: linear-gradient(160deg, #FFE6DF 0%, #FFF1E0 55%, #F3EEFF 100%);

    --text: #2F2330;
    --text-2: #6F5E6B;
    --muted: #A8969F;
    --border: #F2E2DC;
    --border-strong: #E8D2CA;

    --brand: #F83B3B;
    --brand-2: #FF6F61;
    --brand-ink: #D92B2B;
    --brand-tint: #FFE9E6;
    --ring: rgba(248, 59, 59, .16);

    --success: #1F9D62;
    --success-tint: #E4F7EC;
    --danger: #DC3F45;
    --danger-tint: #FDECEC;
    --info: #3F6FE0;
    --info-tint: #EAF0FF;
    --tg: #2AABEE;

    --shadow-card: 0 1px 2px rgba(91, 46, 46, .04), 0 12px 40px -12px rgba(150, 70, 60, .18);
    --shadow-shell: 0 30px 80px -30px rgba(150, 70, 60, .30);
    --shadow-btn: 0 10px 22px -10px rgba(248, 59, 59, .65);

    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --ease: cubic-bezier(.22, .9, .32, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);

    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* Varsayılan tema: koyu. Açık tema istenirse <html data-theme="light"> verilebilir. */
:root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #1A1418;
    --blob-1: #4A2228;
    --blob-2: #3D2E1C;
    --blob-3: #2C2647;

    --surface: #241C21;
    --surface-2: #2C2229;
    --surface-3: #352830;
    --hero: linear-gradient(160deg, #3A2026 0%, #2E2420 55%, #262139 100%);

    --text: #F7ECEF;
    --text-2: #CBB8C1;
    --muted: #8F7D86;
    --border: #3A2D34;
    --border-strong: #4A3942;

    --brand-tint: rgba(248, 59, 59, .16);
    --ring: rgba(255, 111, 97, .25);

    --success: #4FD394;
    --success-tint: rgba(79, 211, 148, .12);
    --danger: #FF7B80;
    --danger-tint: rgba(255, 123, 128, .12);
    --info: #8FB0FF;
    --info-tint: rgba(143, 176, 255, .12);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 50px -18px rgba(0, 0, 0, .6);
    --shadow-shell: 0 30px 80px -30px rgba(0, 0, 0, .7);
    --shadow-btn: 0 10px 24px -10px rgba(248, 59, 59, .55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body.auth-body {
    font-family: 'Nunito', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img, svg { display: block; }

.ico { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Arka plan blob'ları ---------- */
.auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .75;
    animation: blobDrift 18s ease-in-out infinite alternate;
}
.auth-blob--1 { width: 420px; height: 420px; background: var(--blob-1); top: -120px; left: -100px; }
.auth-blob--2 { width: 360px; height: 360px; background: var(--blob-2); bottom: -120px; right: -80px; animation-delay: -6s; }
.auth-blob--3 { width: 300px; height: 300px; background: var(--blob-3); top: 40%; left: 55%; animation-delay: -12s; opacity: .6; }

@keyframes blobDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(40px, 30px, 0) scale(1.08); }
}

/* ---------- Kabuk (desktop: iki sütun) ---------- */
.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-shell);
    overflow: hidden;
    overflow: clip;
    animation: shellIn .6s var(--ease) both;
}

@keyframes shellIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Hero (maskot alanı) ---------- */
.auth-hero {
    position: relative;
    background: var(--hero);
    padding: 36px 40px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    align-self: flex-start;
    border-radius: 12px;
}
.auth-brand img { width: 34px; height: 34px; }
.auth-brand__text {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -.02em;
    color: var(--text);
}
.auth-brand__bi { color: var(--brand); }

.kupi-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 18px auto 0;
    width: 100%;
}
.kupi-stage .kupi { width: 230px; height: auto; overflow: visible; }

.kupi-bubble {
    position: relative;
    max-width: 320px;
    text-wrap: balance;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    padding: 10px 16px;
    border-radius: 18px;
    box-shadow: 0 8px 24px -12px rgba(150, 70, 60, .35);
    margin-bottom: 6px;
    text-align: center;
    transition: transform .35s var(--spring);
}
.kupi-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: inherit;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: translateX(-50%) rotate(45deg);
    border-bottom-right-radius: 4px;
}
.kupi-bubble.is-pop { animation: bubblePop .4s var(--spring); }
@keyframes bubblePop {
    0% { transform: scale(.92); }
    100% { transform: scale(1); }
}

.auth-hero__copy { text-align: center; margin-top: 4px; }
.auth-hero__copy h2 {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -.02em;
}
.auth-hero__copy p {
    margin: 8px auto 0;
    max-width: 340px;
    color: var(--text-2);
    font-size: 15px;
}

.auth-perks {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}
.auth-perks li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-2);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    padding: 10px 14px;
    border-radius: 14px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.auth-perks .ico {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 10px;
    background: var(--brand-tint);
    color: var(--brand);
}

/* ---------- Form paneli ---------- */
.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px 28px;
    min-width: 0;
}

.auth-card { width: 100%; max-width: 420px; margin: 0 auto; }

.auth-head { margin-bottom: 26px; }
.auth-title {
    font-size: 30px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.025em;
}
.auth-subtitle {
    margin-top: 8px;
    color: var(--text-2);
    font-size: 15.5px;
}

.auth-foot {
    margin-top: 28px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------- Uyarılar ---------- */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 18px;
    animation: alertIn .45s var(--spring) both;
}
.alert .ico { margin-top: 1px; }
.alert--error { background: var(--danger-tint); color: var(--danger); }
.alert--success { background: var(--success-tint); color: var(--success); }
.alert--info { background: var(--info-tint); color: var(--info); }

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Form alanları ---------- */
.auth-form { display: grid; gap: 16px; }

.field { display: grid; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}
.field-label .req { color: var(--brand); margin-left: 2px; }
.field-label a {
    font-weight: 700;
    font-size: 13.5px;
    color: var(--brand);
    text-decoration: none;
}
.field-label a:hover { text-decoration: underline; }

.field-control { position: relative; display: flex; align-items: center; }

.field-icon {
    position: absolute;
    left: 15px;
    color: var(--muted);
    pointer-events: none;
    transition: color .2s;
}

.field-input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px 14px 46px;
    font-size: 16px; /* iOS'ta odaklanınca zoom olmaması için 16px altına inmeyin */
    font-weight: 600;
    color: var(--text);
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field-input::placeholder { color: var(--muted); font-weight: 500; opacity: 1; }
.field-input:hover { border-color: var(--border-strong); }
.field-input:focus {
    background: var(--surface);
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px var(--ring);
}
.field-control:focus-within .field-icon { color: var(--brand); }

.field-input.has-toggle { padding-right: 52px; }

textarea.field-input {
    min-height: 104px;
    resize: vertical;
    line-height: 1.5;
}
.field-control--textarea { align-items: flex-start; }
.field-control--textarea .field-icon { top: 16px; }

/* Autofill (Chrome / Safari) rengini temaya uydur */
.field-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface-3) inset;
    caret-color: var(--text);
    transition: background-color 9999s ease-out 0s;
}

.field.is-invalid .field-input { border-color: var(--danger); background: var(--danger-tint); }
.field.is-invalid .field-icon { color: var(--danger); }

.field-error {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--danger);
}
.field-error .ico { width: 15px; height: 15px; }

.field-hint { font-size: 13px; color: var(--muted); font-weight: 600; }

.field-toggle {
    position: absolute;
    right: 6px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--muted);
    transition: color .2s, background-color .2s;
}
.field-toggle:hover { color: var(--text-2); background: var(--surface-3); }
.field-toggle .ico-eye-off { display: none; }
.field-toggle[aria-pressed="true"] .ico-eye { display: none; }
.field-toggle[aria-pressed="true"] .ico-eye-off { display: block; }

.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.code-input::placeholder { text-transform: none; letter-spacing: normal; font-weight: 500; }

/* Şifre gücü */
.strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 2px;
}
.strength span {
    height: 5px;
    border-radius: 99px;
    background: var(--border);
    transition: background-color .3s;
}
.strength[data-level="1"] span:nth-child(-n+1) { background: #F2766B; }
.strength[data-level="2"] span:nth-child(-n+2) { background: #F5A44A; }
.strength[data-level="3"] span:nth-child(-n+3) { background: #8CC152; }
.strength[data-level="4"] span:nth-child(-n+4) { background: #2BB673; }
.strength-text { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.strength-text:empty { display: none; }

/* ---------- Checkbox ---------- */
.check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    line-height: 1.5;
    cursor: pointer;
}
.check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.check__box {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: -1px;
    border-radius: 8px;
    border: 1.5px solid var(--border-strong);
    background: var(--surface-2);
    display: grid;
    place-items: center;
    color: #fff;
    transition: background-color .2s, border-color .2s, transform .2s var(--spring);
}
.check__box .ico { width: 15px; height: 15px; stroke-width: 3; opacity: 0; transform: scale(.5); transition: .2s var(--spring); }
.check input:checked + .check__box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check__box .ico { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px var(--ring); }
.check a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
}
.check a:hover { text-decoration: underline; }

/* ---------- Butonlar ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 56px;
    padding: 14px 22px;
    border-radius: var(--radius);
    font-size: 16.5px;
    font-weight: 800;
    letter-spacing: .005em;
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    transition: transform .15s var(--ease), box-shadow .2s, background-color .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn[disabled] { cursor: default; opacity: .75; }

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 100%);
    box-shadow: var(--shadow-btn);
}
.btn--primary:hover:not([disabled]) { box-shadow: 0 14px 28px -10px rgba(248, 59, 59, .7); transform: translateY(-1px); }
.btn--primary .ico { transition: transform .25s var(--ease); }
.btn--primary:hover:not([disabled]) .ico { transform: translateX(3px); }

.btn--ghost {
    color: var(--text-2);
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    min-height: 52px;
    font-size: 15.5px;
}
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }

.btn--telegram {
    color: #fff;
    background: linear-gradient(135deg, #3CB8F5 0%, #229ED9 100%);
    box-shadow: 0 10px 22px -12px rgba(34, 158, 217, .8);
    min-height: 52px;
    font-size: 15.5px;
}

.btn .spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2.5px solid currentColor;
    border-right-color: transparent;
    animation: spin .7s linear infinite;
    display: none;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .ico { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Telegram doğrulandı */
.verified {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--success-tint);
    color: var(--success);
    font-weight: 800;
    font-size: 14.5px;
    animation: alertIn .45s var(--spring) both;
}

/* ---------- Alt linkler ---------- */
.auth-switch {
    margin-top: 22px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-2);
}
.auth-switch a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: none;
    padding: 6px 2px;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-back { margin-top: 14px; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin: 6px 0;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.recaptcha-wrap { display: flex; justify-content: center; }

/* ---------- Modallar (sheet) ---------- */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(40, 20, 28, .38);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.sheet.is-open { display: flex; animation: fadeIn .25s ease both; }
.sheet__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: min(80vh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-shell);
    overflow: hidden;
    animation: panelIn .35s var(--spring) both;
}
.sheet__panel--sm { max-width: 400px; text-align: center; padding: 28px 24px 22px; }
.sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 14px 24px;
    border-bottom: 1px solid var(--border);
}
.sheet__title { font-size: 19px; font-weight: 900; letter-spacing: -.01em; }
.sheet__close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--text-2);
    background: var(--surface-2);
}
.sheet__close:hover { background: var(--surface-3); color: var(--text); }
.sheet__body {
    padding: 18px 24px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.65;
}
.sheet__body h3 { color: var(--text); font-size: 15.5px; font-weight: 800; margin: 18px 0 6px; }
.sheet__body p + p { margin-top: 8px; }
.sheet__body ul { padding-left: 20px; display: grid; gap: 4px; }
.sheet__body a { color: var(--brand); font-weight: 700; }
.sheet__body strong { color: var(--text); }
.sheet__meta { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.sheet__foot { padding: 14px 24px calc(18px + var(--safe-bottom)); border-top: 1px solid var(--border); }

.sheet__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: var(--danger-tint);
    color: var(--danger);
}
.sheet__icon .ico { width: 30px; height: 30px; }
.sheet__panel--sm .sheet__title { margin-bottom: 6px; }
.sheet__panel--sm p { color: var(--text-2); font-size: 15px; margin-bottom: 20px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn {
    from { opacity: 0; transform: translateY(20px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Maskot: Kupi
   ========================================================================== */
.kupi .kupi-float { animation: kupiFloat 4.2s ease-in-out infinite; transform-origin: 100px 170px; }
.kupi .kupi-shadow { fill: var(--kupi-shadow, #000); opacity: .08; animation: kupiShadow 4.2s ease-in-out infinite; transform-origin: 100px 188px; transform-box: view-box; }
.kupi .kupi-antenna { animation: kupiAntenna 3s ease-in-out infinite; transform-origin: 100px 42px; transform-box: view-box; }
.kupi .kupi-cheek { fill: #FFB8C6; opacity: .9; }

.kupi .kupi-eye {
    transform-box: fill-box;
    transform-origin: center;
    animation: kupiBlink 5.5s infinite;
}
.kupi .kupi-eye:nth-of-type(2) { animation-delay: .04s; }

.kupi .kupi-pupil {
    transform: translate(var(--kx, 0px), var(--ky, 0px));
    transition: transform .25s var(--ease);
}

.kupi .kupi-mouth { opacity: 0; transition: opacity .2s; }
.kupi .kupi-hand {
    transform-box: view-box;
    transition: transform .45s var(--spring);
}

@keyframes kupiFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1.2deg); }
}
@keyframes kupiShadow {
    0%, 100% { transform: scale(1); opacity: .08; }
    50% { transform: scale(.86); opacity: .05; }
}
@keyframes kupiAntenna {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(8deg); }
}
@keyframes kupiBlink {
    0%, 92%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(.1); }
}

/* Ruh hâlleri */
.kupi-stage[data-mood="idle"] .kupi-mouth--smile,
.kupi-stage[data-mood="look"] .kupi-mouth--smile,
.kupi-stage[data-mood="happy"] .kupi-mouth--happy,
.kupi-stage[data-mood="sad"] .kupi-mouth--sad,
.kupi-stage[data-mood="shy"] .kupi-mouth--o { opacity: 1; }

.kupi-stage[data-mood="happy"] .kupi .kupi-float { animation: kupiHop .9s var(--spring) 2, kupiFloat 4.2s ease-in-out .9s infinite; }
@keyframes kupiHop {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-16px) rotate(2deg); }
}

.kupi-stage[data-mood="sad"] .kupi .kupi-pupil { transform: translate(0px, 3px); }
.kupi-stage[data-mood="sad"] .kupi .kupi-antenna { animation: none; transform: rotate(-24deg); }
.kupi-stage[data-mood="sad"] .kupi .kupi-float { animation: kupiShake .5s ease-in-out 2, kupiFloat 4.2s ease-in-out 1s infinite; }
@keyframes kupiShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}

.kupi-stage[data-mood="shy"] .kupi .kupi-cheek { opacity: 1; fill: #FF9DB2; }

/* Eller */
.kupi-stage[data-hands="cover"] .kupi-hand--l { transform: translate(44px, -42px) scale(1); }
.kupi-stage[data-hands="cover"] .kupi-hand--r { transform: translate(-44px, -42px); }
.kupi-stage[data-hands="peek"] .kupi-hand--l { transform: translate(44px, -18px); }
.kupi-stage[data-hands="peek"] .kupi-hand--r { transform: translate(-44px, -42px); }
.kupi-stage[data-hands="cover"] .kupi .kupi-eye,
.kupi-stage[data-hands="peek"] .kupi .kupi-eye { animation: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet ve mobil: tek sütun, maskot kartın üstünden "kafasını uzatır" */
@media (max-width: 899.98px) {
    body.auth-body {
        align-items: flex-start;
        padding: calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(16px + var(--safe-left));
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
        margin: 0 auto;
    }

    .auth-hero {
        background: none;
        padding: 0;
        gap: 0;
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "brand brand"
            "kupi kupi";
        align-items: end;
    }
    .auth-brand { grid-area: brand; margin: 4px 0 0 4px; }
    .auth-brand img { width: 30px; height: 30px; }
    .auth-brand__text { font-size: 20px; }

    .kupi-stage {
        grid-area: kupi;
        flex-direction: row;
        align-items: flex-end;
        justify-content: center;
        gap: 4px;
        margin: 6px 0 -34px;
        position: relative;
        z-index: 0;
    }
    .kupi-stage .kupi { width: 150px; order: 1; }
    .kupi-stage .kupi .kupi-shadow { display: none; }
    .kupi-bubble {
        order: 2;
        align-self: center;
        max-width: 190px;
        margin: 0 0 30px;
        font-size: 14px;
        padding: 9px 13px;
        text-align: left;
    }
    .kupi-bubble::after {
        left: -7px;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%) rotate(135deg);
    }

    .auth-hero__copy, .auth-perks { display: none; }

    .auth-panel { padding: 0; position: relative; z-index: 1; }
    .auth-card {
        max-width: none;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 28px;
        box-shadow: var(--shadow-card);
        padding: 28px 24px 26px;
    }
    .auth-head { margin-bottom: 22px; }
    .auth-title { font-size: 26px; }
    .auth-foot { margin-top: 18px; }
}

/* Küçük telefonlar */
@media (max-width: 420px) {
    .auth-card { padding: 24px 18px 22px; border-radius: 24px; }
    .kupi-stage .kupi { width: 132px; }
    .kupi-stage { margin-bottom: -30px; }
    .kupi-bubble { max-width: 170px; font-size: 13.5px; }
    .auth-title { font-size: 24px; }
    .auth-subtitle { font-size: 14.5px; }
    .field-row { grid-template-columns: 1fr; }
    .sheet { padding: 0; align-items: flex-end; }
    .sheet__panel {
        max-width: none;
        max-height: 88vh;
        max-height: 88dvh;
        border-radius: 26px 26px 0 0;
        animation: sheetUp .35s var(--ease) both;
    }
    .sheet__panel--sm { padding-bottom: calc(22px + var(--safe-bottom)); }
    .sheet__panel::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        width: 40px;
        height: 4px;
        border-radius: 99px;
        background: var(--border-strong);
        transform: translateX(-50%);
    }
}
@keyframes sheetUp {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

@media (max-width: 340px) {
    .kupi-bubble { display: none; }
    .kupi-stage { justify-content: center; }
}

/* Kısa ekranlar (yatay telefon) */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 899.98px) {
    .kupi-stage .kupi { width: 100px; }
    .kupi-stage { margin-bottom: -22px; }
}

/* Büyük ekranlar */
@media (min-width: 900px) {
    .auth-shell { min-height: 620px; }
    .auth-page--register .kupi-stage { position: sticky; top: 24px; z-index: 2; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* Küçük yardımcılar */
.field--tight { margin-top: -8px; gap: 6px; }
.field-hint--below { margin-top: 8px; }
.check .req { color: var(--brand); margin-left: 2px; }
[hidden] { display: none !important; }

/* ---------- Şifre sıfırlama (Telegram OTP) ---------- */
.alert--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.alert__row { display: flex; gap: 10px; align-items: flex-start; }
.alert__note { color: var(--text-2); font-weight: 600; font-size: 14px; }
.alert__note strong, .alert a:not(.btn) { color: inherit; font-weight: 800; }
.alert--stack .alert__note strong { color: var(--text); }

.btn--sm { min-height: 46px; font-size: 15px; padding: 10px 16px; }

.auth-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}
.auth-note .ico { color: var(--brand); width: 18px; height: 18px; margin-top: 1px; }
.auth-note a { color: var(--brand); font-weight: 800; text-decoration: none; }

.auth-subtitle strong { color: var(--text); font-weight: 800; }

/* 6 haneli kod kutuları: tek gerçek input (yapıştırma ve iOS/Android SMS otomatik doldurma uyumlu) */
.otp { position: relative; }
.otp__cells {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    pointer-events: none;
}
.otp__cells span {
    height: 60px;
    display: grid;
    place-items: center;
    font-size: 26px;
    font-weight: 900;
    color: var(--text);
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s, box-shadow .2s, background-color .2s, transform .2s var(--spring);
}
.otp__cells span.is-filled { border-color: var(--border-strong); background: var(--surface); transform: translateY(-1px); }
.otp__cells span.is-active {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px var(--ring);
    background: var(--surface);
}
.otp__cells span.is-active:empty::after {
    content: '';
    width: 2px;
    height: 26px;
    border-radius: 2px;
    background: var(--brand);
    animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }
.otp__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    font-size: 16px; /* iOS zoom engeli */
    color: transparent;
    caret-color: transparent;
    background: transparent;
    border: 0;
    outline: none;
    letter-spacing: 3em;
    z-index: 1;
}
.field.is-invalid .otp__cells span { border-color: var(--danger); background: var(--danger-tint); }
@media (max-width: 380px) {
    .otp__cells { gap: 7px; }
    .otp__cells span { height: 52px; font-size: 22px; border-radius: 13px; }
}

.auth-resend {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--text-2);
    font-weight: 600;
    font-size: 15px;
}
.link-btn {
    color: var(--brand);
    font-weight: 800;
    padding: 6px 4px;
    border-radius: 8px;
}
.link-btn:hover:not([disabled]) { text-decoration: underline; }
.link-btn[disabled] { color: var(--muted); cursor: default; }
.field-error--center { justify-content: center; margin-top: 6px; }
