/* Sushi Dotto — Giriş ekranı · Tasarım & Geliştirme: Zetuya Software */

:root {
    --bg: #070708;
    --primary: var(--brand, #7c4dff);
    --accent: var(--brand-light, #a78bfa);
    --rose: #e879f9;
    --amber: #f59e0b;
    --muted: #a1a1aa;
    --dim: #71717a;
    --line: rgba(255, 255, 255, 0.1);
    --font-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Outfit', system-ui, sans-serif;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--bg);
    color: #fff;
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-x: clip;
}
::selection { background: var(--primary); color: #fff; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
svg, canvas, img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.pixelated { image-rendering: pixelated; }

/* ---------- Arka plan ---------- */
.bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(55% 55% at 22% 45%, rgba(var(--brand-rgb, 124, 77, 255), 0.2), transparent 70%),
        radial-gradient(50% 60% at 100% 0%, rgba(217, 70, 239, 0.1), transparent 70%),
        radial-gradient(60% 50% at 60% 110%, rgba(109, 40, 217, 0.16), transparent 70%),
        var(--bg);
}
.bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 35% 45%, #000 5%, transparent 70%);
    mask-image: radial-gradient(ellipse at 35% 45%, #000 5%, transparent 70%);
}
#gl-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100lvh;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}
.gl-on #gl-bg { opacity: 1; }

/* ---------- Yerleşim ---------- */
.auth {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(14px + var(--safe-t)) max(16px, var(--safe-r)) calc(14px + var(--safe-b)) max(16px, var(--safe-l));
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 74rem; margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(var(--brand-rgb, 124, 77, 255), 0.6)); }
.brand em { font-style: normal; background: linear-gradient(90deg, var(--brand-light, #a78bfa), #e879f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-size: 13px; font-weight: 500; color: var(--muted); transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease; }
.back .ico { font-size: 15px; transition: transform 0.3s var(--ease); }
@media (hover: hover) { .back:hover { color: #fff; border-color: rgba(var(--brand-rgb, 124, 77, 255), 0.45); background: rgba(var(--brand-rgb, 124, 77, 255), 0.1); } .back:hover .ico { transform: translateX(-3px); } }

.main { display: grid; align-content: center; justify-items: center; gap: 6px; width: 100%; max-width: 74rem; margin-inline: auto; padding-block: 12px; }

/* Dotto-san alanı (3D karakter bu kutuyu takip eder) */
.side { position: relative; width: 100%; display: grid; justify-items: center; }
.spot { position: relative; width: min(100%, 300px); height: clamp(150px, 24vh, 210px); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.spot-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
/* Katmanlı Dotto-san (hafif mod): 6 arka katman + ön yüz CSS 3B'de dizilir, gövde süzülüp sağa sola döner, imleci izler */
.spot-fallback .mascot { position: relative; height: 70%; aspect-ratio: 1; max-width: 100%; perspective: 640px; }
.spot-fallback .mascot::before { content: ''; position: absolute; left: -30%; right: -30%; bottom: -24%; height: 60%; border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--brand-rgb, 124, 77, 255), 0.4), rgba(var(--brand-rgb, 124, 77, 255), 0.08) 60%, transparent); pointer-events: none; }
.spot-fallback .mascot-look { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--lx, 0deg)) rotateY(var(--ly, 0deg)); transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.spot-fallback .mascot-body { position: absolute; inset: 0; transform-style: preserve-3d; animation: login-dotto-float 5.5s ease-in-out infinite; will-change: transform; }
.spot-fallback .mascot-body svg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.spot-fallback .mascot-body .layer { color: #b45309; transform: translateZ(calc(var(--z) * -2.4px)); }
.spot-fallback .mascot-body .layer:nth-child(-n+3) { color: #92400e; }
.spot-fallback .mascot-body .front { transform: translateZ(0.5px); filter: drop-shadow(0 0 22px rgba(var(--brand-rgb, 124, 77, 255), 0.45)); }
.spot-fallback .mascot-shadow { position: absolute; left: 20%; right: 20%; bottom: -16px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.75), transparent); animation: login-dotto-shadow 5.5s ease-in-out infinite; }
@keyframes login-dotto-float {
    0%, 100% { transform: translate3d(0, 0, 0) rotateX(8deg) rotateY(-22deg); }
    50% { transform: translate3d(0, -10px, 0) rotateX(-4deg) rotateY(22deg); }
}
@keyframes login-dotto-shadow { 50% { transform: scaleX(0.78); opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
    .spot-fallback .mascot-body, .spot-fallback .mascot-shadow { animation: none; }
    .spot-fallback .mascot-look { transition: none; transform: none; }
}
.gl-on .spot-fallback { display: none; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.bubble {
    position: relative;
    z-index: 2;
    max-width: 18rem;
    margin-bottom: 2px;
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(14, 14, 18, 0.9);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: #e4e4e7;
    transition: transform 0.35s var(--ease), opacity 0.2s ease;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; margin-left: -5px; transform: rotate(45deg); border-right: 1px solid rgba(255, 255, 255, 0.14); border-bottom: 1px solid rgba(255, 255, 255, 0.14); background: rgb(14, 14, 18); }
.bubble.swap { opacity: 0; transform: translateY(6px) scale(0.96); }
.pitch { display: none; }

/* ---------- Kart ---------- */
.card-scene { width: 100%; max-width: 440px; perspective: 1200px; }
.card {
    position: relative;
    padding: 26px 22px 24px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(165deg, rgba(28, 28, 34, 0.9), rgba(9, 9, 12, 0.94));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 60px rgba(var(--brand-rgb, 124, 77, 255), 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transform-style: preserve-3d;
    animation: card-in 1s var(--ease) backwards;
}
@keyframes card-in { from { opacity: 0; transform: translate3d(0, 40px, -120px) rotateX(-16deg); } }
.card.shake { animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.card-clip { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.card-clip::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--brand-light-rgb, 167, 139, 250), 0.9), rgba(217, 70, 239, 0.7), transparent); }
.glare { position: absolute; inset: 0; background: radial-gradient(460px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.1), rgba(var(--brand-rgb, 124, 77, 255), 0.05) 35%, transparent 60%); opacity: 0; transition: opacity 0.4s ease; }
.card.is-active .glare { opacity: 1; }
.z1 { transform: translateZ(18px); }
.z2 { transform: translateZ(34px); }

.card-head { text-align: center; margin-bottom: 22px; }
.card-head h1 { font-family: var(--font-display); font-size: clamp(1.45rem, 5vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; }
.card-head p { margin-top: 6px; font-size: 14px; color: var(--muted); }

.alert { display: flex; gap: 10px; margin-bottom: 18px; padding: 11px 14px; border-radius: 14px; font-size: 13px; font-weight: 500; }
.alert .ico { font-size: 17px; margin-top: 1px; }
.alert.ok { border: 1px solid rgba(16, 185, 129, 0.35); background: rgba(16, 185, 129, 0.1); color: #6ee7b7; }
.alert.err { border: 1px solid rgba(var(--brand-light-rgb, 167, 139, 250), 0.4); background: rgba(var(--brand-rgb, 124, 77, 255), 0.12); color: var(--brand-pastel, #d8b4fe); }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.control { position: relative; }
.control > .ico { position: absolute; left: 14px; top: 50%; margin-top: -9px; font-size: 18px; color: var(--dim); pointer-events: none; transition: color 0.3s ease; }
.control:focus-within > .ico { color: var(--accent); }
.input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    font: inherit;
    font-size: 16px; /* iOS odak yakınlaştırmasını engeller */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.input::placeholder { color: #52525b; }
.input:focus { border-color: rgba(var(--brand-light-rgb, 167, 139, 250), 0.8); background: rgba(var(--brand-rgb, 124, 77, 255), 0.06); box-shadow: 0 0 0 4px rgba(var(--brand-rgb, 124, 77, 255), 0.14), 0 0 26px rgba(var(--brand-rgb, 124, 77, 255), 0.18); }
.input.bad { border-color: rgba(var(--brand-light-rgb, 167, 139, 250), 0.7); }
.input.pr { padding-right: 50px; }
.input:-webkit-autofill, .input:-webkit-autofill:focus { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 1000px #17171b inset, 0 0 0 4px rgba(var(--brand-rgb, 124, 77, 255), 0.14); transition: background-color 9999s; }
.eye { position: absolute; right: 4px; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; border-radius: 12px; font-size: 19px; color: var(--muted); transition: color 0.3s ease; touch-action: manipulation; }
.eye:hover { color: #fff; }
.eye .off, .eye.on .open { display: none; }
.eye.on .off { display: block; }
.hint { display: none; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--amber); }
.hint.show { display: flex; }
.error { margin-top: 7px; font-size: 12.5px; font-weight: 500; color: var(--brand-pastel, #d8b4fe); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; font-size: 13.5px; }
.check { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); cursor: pointer; user-select: none; -webkit-user-select: none; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.05); transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
.check i svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 18; stroke-dashoffset: 18; transition: stroke-dashoffset 0.3s var(--ease); }
.check input:checked + i { background: var(--primary); border-color: var(--accent); box-shadow: 0 0 14px rgba(var(--brand-rgb, 124, 77, 255), 0.55); }
.check input:checked + i svg { stroke-dashoffset: 0; }
.check input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 3px; }
.row a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); transition: color 0.3s ease; }
.check { min-height: 44px; }
/* Hesabı olmayan ziyaretçiye ücretsiz deneme yolu */
.signup { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 13.5px; color: var(--muted); }
.signup a { display: inline-flex; align-items: center; min-height: 40px; padding-inline: 4px; font-weight: 600; color: var(--brand-pastel, #d8b4fe); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .signup a:hover { color: #fff; } }
.row a:hover { color: #fff; }

.submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    border-radius: 15px;
    background: linear-gradient(100deg, #6d3cff, #b23ef0);
    box-shadow: 0 0 30px rgba(var(--brand-rgb, 124, 77, 255), 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    overflow: hidden;
    touch-action: manipulation;
    transition: transform 0.35s var(--ease), box-shadow 0.35s ease, filter 0.3s ease;
}
.submit::before { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent); transform: skewX(-18deg); animation: sweep 3.6s ease-in-out infinite; }
@keyframes sweep { 0%, 55% { transform: translateX(0) skewX(-18deg); } 100% { transform: translateX(520%) skewX(-18deg); } }
.submit .ico { font-size: 18px; transition: transform 0.3s var(--ease); }
.submit:active { transform: scale(0.98); }
@media (hover: hover) { .submit:hover { transform: translateY(-2px); box-shadow: 0 0 48px rgba(var(--brand-rgb, 124, 77, 255), 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.3); } .submit:hover .ico { transform: translateX(4px); } }
.submit .spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.submit.loading { pointer-events: none; filter: saturate(0.8) brightness(0.92); }
.submit.loading .spin { display: block; }
.submit.loading .ico { display: none; }

.secure { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 16px; font-size: 11.5px; color: var(--dim); }
.secure .ico { font-size: 13px; color: #34d399; }

/* ---------- Alt bilgi ---------- */
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 74rem; margin-inline: auto; padding-top: 8px; text-align: center; }
.foot small { font-size: 11.5px; color: var(--dim); }
.credit { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(16, 16, 20, 0.8); font-size: 11.5px; color: var(--muted); }
.credit-mark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--primary), #d946ef); font-family: var(--font-display); font-size: 12px; font-weight: 700; color: #fff; }
.credit b { font-family: var(--font-display); color: #fff; }

/* ---------- Masaüstü ---------- */
@media (min-width: 1024px) {
    .auth { padding-top: 22px; padding-bottom: 20px; }
    .main { grid-template-columns: 1.15fr minmax(400px, 440px); gap: 56px; align-items: center; justify-items: stretch; }
    .side { justify-items: start; }
    .bubble { margin-left: clamp(60px, 9vw, 150px); font-size: 14px; }
    .spot { width: min(100%, 520px); height: min(52vh, 480px); }
    .pitch { display: block; margin-top: 10px; max-width: 30rem; }
    .pitch h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; }
    .pitch h2 span { background: linear-gradient(90deg, #9d6bff, #d946ef 55%, #fbd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .pitch p { margin-top: 12px; color: var(--muted); font-size: 15px; }
    .card { padding: 34px 32px 30px; }
    .foot { flex-direction: row; justify-content: space-between; }
}
@media (max-height: 640px) and (max-width: 1023px) { .spot { height: 120px; } .bubble { display: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

@supports (-webkit-touch-callout: none) {
    input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px !important; }
}

/* "3D açık / kapalı" düğmesi (public/js/fx-toggle.js) */
.top-actions { display: flex; align-items: center; gap: 8px; }
.fx-toggle { cursor: pointer; font: inherit; font-size: 13px; }
.fx-toggle .fx-dot { width: 8px; height: 8px; border-radius: 50%; background: #52525b; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.fx-toggle.is-on { color: #e9d5ff; border-color: rgba(168, 85, 247, 0.45); }
.fx-toggle.is-on .fx-dot { background: #a855f7; box-shadow: 0 0 10px #a855f7; }
.fx-toggle:focus-visible { outline: 2px solid #a855f7; outline-offset: 2px; }
@media (max-width: 480px) { .top-actions .back:not(.fx-toggle) { padding-inline: 11px; } }
