/* kirish.css — Kirish ekrani: tungi sahro foni, kirish kartasi. */
/* ---------- Kirish ekrani: tungi sahro mavzusi (faqat tizimga kirilmaganda) ---------- */
/* Fon — tayyor rasm (fon_yasash.py yasaydi): osmon, ufq yog'dusi, tog'lar, qumtepalar.
   Vertikal ekranda (telefon) alohida tik kompozitsiya. Rasm yuklanguncha qora rang turadi. */
.night-bg { display: none; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: #020203 url(/fon/sahro-keng.webp) center 56% / cover no-repeat; }
/* Pozitsiya % = rasmdagi ufq ulushi: ekran nisbati qanday bo'lmasin, ufq ekranning
   o'sha balandligida qoladi (keng: 0.56, tik: 0.535 — fon_yasash.py dagi HOR) */
@media (orientation: portrait) { .night-bg { background-image: url(/fon/sahro-tik.webp); background-position: center 53.5%; } }
/* Chapdagi dantelsimon oltin mandala: markazi ekran chetidan biroz tashqarida, yarmi ko'rinadi */
.night-bg .mandala { position: absolute; left: 0; top: 37%; width: clamp(187px, 49vmin, 707px); height: auto;
  transform: translate(-55.8%, -50%); opacity: .95; }
body.auth-mode .night-bg { display: block; }
.night-bg .stars { position: absolute; inset: 0 0 35% 0; opacity: .85; animation: xzTwinkle 6s ease-in-out infinite alternate;
  background-image:
    radial-gradient(1px 1px at 12px 18px, #fff, transparent), radial-gradient(1px 1px at 64px 92px, #f7e7c4, transparent),
    radial-gradient(1.4px 1.4px at 130px 40px, #fff, transparent), radial-gradient(1px 1px at 172px 130px, #fff, transparent),
    radial-gradient(1px 1px at 96px 160px, #f7e7c4, transparent), radial-gradient(1.2px 1.2px at 210px 70px, #fff, transparent);
  background-size: 230px 190px; }
.night-bg .stars.s2 { background-size: 370px 310px; opacity: .55; animation-duration: 9s; animation-delay: -3s; }
@keyframes xzTwinkle { from { opacity: .35; } to { opacity: .9; } }
.night-bg .moon { position: absolute; top: 56px; right: 9%; width: 64px; height: 64px; filter: drop-shadow(0 0 14px rgba(245,190,90,.75)) drop-shadow(0 0 40px rgba(245,190,90,.35)); }
.night-bg .moon { z-index: 1; }
.night-bg .grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,235,200,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,235,200,.035) 1px, transparent 1px);
  background-size: 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.7) 40%, transparent 62%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.7) 40%, transparent 62%); }

body.auth-mode {
  --bg: #07060a; --surface: rgba(12,10,14,.74); --border: rgba(233,184,90,.28);
  --text: #f3e7cf; --text-muted: rgba(233,184,90,.62); --accent: #e3ae55; --accent-contrast: #1a1206;
  background: #07060a;
}
body.auth-mode .shell { position: relative; z-index: 1; min-height: 100vh; }
body.auth-mode header.top { background: transparent; border-bottom: none; position: relative; }
body.auth-mode .brand .name { color: #eab65a; font-size: 38px; text-shadow: 0 0 18px rgba(234,182,90,.35); }
body.auth-mode .lang-switch { background: rgba(255,255,255,.05); border: 1px solid rgba(233,184,90,.22); }
body.auth-mode .lang-pill { color: rgba(243,231,207,.55); }
body.auth-mode .lang-pill.active { background: linear-gradient(180deg, #f3c96b, #c58d2c); color: #1a1206; }
body.auth-mode footer { display: none; }
body.auth-mode .auth-wrap { margin: max(28px, calc(50vh - 380px)) auto 40px; width: calc(100% - 32px); border: 1px solid rgba(233,184,90,.6); border-radius: 22px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 24px 70px rgba(0,0,0,.65), 0 0 36px rgba(233,170,70,.14), inset 0 1px 0 rgba(255,220,150,.08); }
body.auth-mode .auth-wrap h2 { color: #fff4de; font-size: 30px; }
body.auth-mode .auth-wrap input { background: rgba(255,255,255,.03); border-color: rgba(233,184,90,.26); padding: 13px 14px; }
body.auth-mode .auth-wrap input::placeholder { color: rgba(243,231,207,.42); }
body.auth-mode .auth-wrap input:focus { outline: none; border-color: #e3ae55; box-shadow: 0 0 0 3px rgba(227,174,85,.15); }
body.auth-mode .auth-wrap button { background: linear-gradient(180deg, #f3c96b 0%, #d59c3a 55%, #b9812a 100%); color: #fffaf0; font-size: 15px; padding: 13px; text-shadow: 0 1px 2px rgba(90,50,0,.45);
  box-shadow: 0 8px 24px rgba(214,150,50,.28), inset 0 1px 0 rgba(255,240,200,.5); }
body.auth-mode .auth-wrap button:hover { filter: brightness(1.07); }
body.auth-mode .auth-wrap .switch { color: rgba(243,231,207,.85); }
body.auth-mode .auth-wrap .switch:hover { color: #f3c96b; }
body.auth-mode .auth-wrap .err { color: #ff9a86; }
@media (max-width: 680px) {
  body.auth-mode .brand .name { font-size: 30px; }
  .night-bg .moon { top: 70px; right: 7%; width: 48px; height: 48px; }
  body.auth-mode .auth-wrap { margin-top: 28px; padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) { .night-bg .stars { animation: none; } }
