/* Giriş sayfası: gece gökyüzü, Biri ve krem giriş kartı. Ortak öğeler tasarim.css içindedir. */
.login-page { position: relative; min-height: 100svh; overflow-x: hidden; color: #fff; background: radial-gradient(120% 80% at 20% 0%, #2a3f95 0%, var(--night-900) 52%, var(--night-950) 100%); }
.login-sky { position: fixed; inset: 0; z-index: 0; opacity: .85; pointer-events: none; }
.login-sky svg { width: 100%; height: 100%; }
.login-skyline { position: fixed; left: 0; right: 0; bottom: -2px; z-index: 0; height: 120px; color: rgba(4, 9, 30, .7); pointer-events: none; }
.login-skyline svg { width: 100%; height: 100%; }
.login-header, .login-shell { position: relative; z-index: 1; }

.login-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: calc(18px + var(--safe-top)) 20px 6px; }
.login-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 19px/1 var(--font-display); }
.login-brand small { display: block; margin-top: 3px; color: var(--gold-300); font: 900 9.5px/1 var(--font-body); letter-spacing: .32em; }
.brand-mark { width: 44px; height: 44px; }
.brand-mark svg { width: 100%; height: 100%; }
.header-note { color: rgba(255, 255, 255, .6); font-weight: 800; font-size: 13px; }

.login-shell { display: grid; gap: 8px; max-width: 1180px; margin: 0 auto; padding: 0 0 calc(24px + var(--safe-bottom)); }
.login-welcome { display: grid; justify-items: center; gap: 6px; padding: 0 20px; text-align: center; }
.welcome-eyebrow { color: var(--gold-300); font: 900 11.5px/1.3 var(--font-body); letter-spacing: .16em; }
.welcome-copy { display: grid; gap: 8px; }
.welcome-copy h1 { color: #fff; font-size: clamp(30px, 8vw, 56px); line-height: 1.04; }
.welcome-copy h1 span { color: var(--gold-400); }
.welcome-description { max-width: 34ch; margin: 0 auto; color: rgba(255, 255, 255, .78); font-weight: 700; }

/* Sahne: Biri ve etrafında dönen kartlar. İşaretçiye hafifçe eğilir (--stage-x, --stage-y). */
.learning-stage { --stage-x: 0; --stage-y: 0; position: relative; width: min(300px, 76vw); aspect-ratio: 1.15; margin-top: 4px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.stage-glow { position: absolute; inset: 14% 12%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 94, .38), transparent 68%); filter: blur(6px); }
/* Ortalama translate ile yapılır. Biri kendi içinde nefes alır; dıştan ikinci bir süzülme eklenmez. */
.stage-mascot { position: absolute; left: 50%; top: 50%; width: 62%; translate: calc(-50% + var(--stage-x) * 10px) calc(-50% + var(--stage-y) * 8px); rotate: calc(var(--stage-x) * 4deg); filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .3)); }
.stage-mascot svg { width: 100%; height: auto; }
.stage-bubble { position: absolute; right: -4%; top: 6%; padding: 8px 13px; border-radius: 18px 18px 18px 6px; background: #fff; color: var(--ink-900); font: 800 13.5px/1.2 var(--font-body); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); animation: pop .6s var(--spring) .5s both; }
.stage-card { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; padding: 9px; border-radius: 16px; background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transform: translate(calc(var(--stage-x) * -12px), calc(var(--stage-y) * -10px)); animation: float 7s ease-in-out infinite; }
.stage-card svg { width: 100%; height: 100%; }
.card-a { left: 0; bottom: 14%; padding: 4px; background: rgba(255, 255, 255, .92); animation-delay: -2s; }
.card-b { left: 6%; top: 8%; background: linear-gradient(160deg, #ffae4d, #d9572b); box-shadow: 0 10px 20px rgba(217, 87, 43, .35); animation-delay: -4s; }
.card-c { right: 2%; bottom: 8%; background: linear-gradient(160deg, #ff8aa0, #c8395b); box-shadow: 0 10px 20px rgba(200, 57, 91, .35); animation-delay: -1s; }
.login-page[data-role="teacher"] .stage-bubble::after { content: none; }

/* Giriş kartı: telefonda alttan açılan bir yaprak gibi durur. */
.login-form-section { display: grid; gap: 10px; width: 100%; }
.login-card { padding: 26px 22px 22px; border-radius: 32px 32px 26px 26px; background: var(--cream-50); color: var(--ink-900); box-shadow: var(--shadow-3); animation: sheet-up .5s var(--ease) both; margin: 0 10px; }
.card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.login-kicker { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: var(--gold-200); color: var(--gold-700); }
.login-kicker svg { width: 21px; height: 21px; }
.card-top p { color: var(--ink-500); font: 900 11.5px/1 var(--font-body); letter-spacing: .14em; }
.login-card h2 { font-size: 30px; }
.login-description { margin-top: 4px; color: var(--ink-500); font-weight: 700; }
#login-form { display: grid; gap: 14px; margin-top: 18px; }
.form-field { display: grid; gap: 7px; }
.form-field label { font-weight: 800; color: var(--ink-700); font-size: 14.5px; }
.form-field .input { width: 100%; min-height: 54px; font-size: 16px; }
.password-field { position: relative; }
.password-field .input { padding-right: 84px; }
.password-field button { position: absolute; right: 6px; top: 6px; bottom: 6px; min-width: 70px; border: 0; border-radius: 12px; background: var(--cream-200); color: var(--ink-700); font: 800 13.5px/1 var(--font-body); }
.remember-field { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; color: var(--ink-700); font-weight: 700; cursor: pointer; justify-self: start; }
.remember-field input { width: 20px; height: 20px; accent-color: var(--night-700); }
.login-message { color: var(--danger); font-weight: 800; font-size: 14px; }
.login-message:empty { display: none; }
.login-submit { min-height: 56px; font-size: 17px; justify-content: center; }
.submit-arrow svg { width: 20px; height: 20px; }
.submit-loader { display: none; gap: 4px; }
.submit-loader i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse-dot .9s ease-in-out infinite; }
.submit-loader i:nth-child(2) { animation-delay: .12s; }
.submit-loader i:nth-child(3) { animation-delay: .24s; }
.login-form-section[aria-busy="true"] .submit-arrow { display: none; }
.login-form-section[aria-busy="true"] .submit-loader { display: inline-flex; }
.login-help { margin-top: 16px; text-align: center; color: var(--ink-500); font-weight: 700; font-size: 13.5px; }
.login-back { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; justify-self: center; color: rgba(255, 255, 255, .78); font-weight: 800; font-size: 14px; text-decoration: none; }
.login-back svg { width: 16px; height: 16px; transform: rotate(180deg); }
.noscript-message { position: relative; z-index: 1; padding: 24px; text-align: center; }
.login-page.is-typing .stage-mascot, .login-page.is-typing .stage-card { animation-play-state: paused; }
.login-page.is-hidden * { animation-play-state: paused !important; }

@media (max-width: 420px) { .header-note { display: none; } }
@media (min-width: 900px) {
  .login-shell { grid-template-columns: minmax(0, 1.1fr) minmax(380px, 440px); align-items: center; gap: 56px; min-height: calc(100svh - 90px); padding: 20px 32px 140px; }
  .login-welcome { justify-items: start; text-align: left; padding: 0; }
  .welcome-description { margin: 0; }
  .learning-stage { order: 2; width: min(380px, 100%); margin-top: 18px; }
  .login-card { margin: 0; border-radius: 32px; padding: 32px 30px 26px; }
  .login-header { padding: 26px 32px 0; }
}
.reduce-motion .stage-mascot, .reduce-motion .stage-card, .reduce-motion .stage-bubble, .reduce-motion .login-card { animation: none; }
/* Biri'nin duruş değişimi ve konuşma balonu: girişte yazdıkça Biri tepki verir. */
.stage-mascot.is-poz svg { animation: giris-poz .5s cubic-bezier(.3, 1.45, .5, 1); transform-origin: 50% 90%; }
@keyframes giris-poz { 0% { transform: scale(.86, 1.08); } 45% { transform: scale(1.06, .95) translateY(-6px); } 100% { transform: none; } }
.stage-bubble.is-yeni { animation: giris-balon .42s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes giris-balon { 0% { opacity: 0; transform: scale(.6) translateY(8px); } 100% { opacity: 1; transform: none; } }
.reduce-motion .stage-mascot.is-poz svg, .reduce-motion .stage-bubble.is-yeni { animation: none; }
@media (prefers-reduced-motion: reduce) { .stage-mascot.is-poz svg, .stage-bubble.is-yeni { animation: none; } }
