/* ===== Login Page Styles (TV version only - extracted from login.php) ===== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: system-ui, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 { text-align: center; margin-bottom: 1.5rem; font-size: 2rem; color: white; }

.login-card {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    width: 90%;
    max-width: 450px;
}

.login-input {
    width: 100%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 0.875rem;
    color: white;
    font-size: 1rem;
}

.login-input:focus { outline: none; border-color: #3b82f6; }

.login-button {
    width: 100%;
    background: #3b82f6;
    border: none;
    border-radius: 1rem;
    padding: 0.875rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
}

.login-button:hover { background: #2563eb; }

.error-message {
    background: rgba(239,68,68,0.2);
    border: 1px solid #ef4444;
    padding: 0.75rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #fca5a5;
}

.register-link { text-align: center; margin-top: 1rem; color: #9ca3af; }
.register-link a { color: #3b82f6; text-decoration: none; }

/* ===== Обычная (не-TV) версия страницы входа ===== */

.auth-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

/* Стена постеров переиспользует .hero-poster-wall/.hero-poster-scrim из
   style.v4.css (та же анимация heroWallFloat) — здесь только позиционирование
   под контекст страницы логина (там это внутри .hero-block, тут — на всю
   страницу). Своя (меньшая) сетка колонок: на главной 14 колонок работают,
   т.к. бо́льшая часть стены скрыта контентом hero-блока — здесь она видна
   целиком, поэтому те же 14 колонок дают заметно мелкие, невыразительные
   ячейки. 7 колонок — постеры крупнее и узнаваемее. */
.auth-poster-wall {
    inset: -10% -4% auto -4%;
    grid-template-columns: repeat(7, 1fr);
}
.auth-poster-scrim {
    background:
        radial-gradient(ellipse 70% 85% at 50% 45%, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.75) 55%, rgba(0,0,0,0.4) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, transparent 25%, transparent 70%, #000 100%);
}

@media (max-width: 900px) {
    .auth-poster-wall { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 560px) {
    .auth-poster-wall { grid-template-columns: repeat(3, 1fr); }
}

/* Плавное появление каждого постера по мере загрузки — без этого картинки
   выскакивают резко и вразнобой (разное время ответа CDN на каждую).
   opacity переключается на classList.add('is-loaded') в JS (см. auth
   страницы) по событию img.onload — для уже закэшированных браузером
   картинок onload может не сработать, поэтому JS дополнительно проверяет
   img.complete сразу после вставки в DOM. */
.auth-poster-wall .hero-poster-cell img {
    opacity: 0;
    transition: opacity 0.6s ease;
}
.auth-poster-wall .hero-poster-cell img.is-loaded {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .auth-poster-wall .hero-poster-cell img { transition: none; }
}

.auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
    max-width: 68rem;
    width: 100%;
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
}

/* ── Появление при загрузке (не scroll-триггер, страница логина не
   скроллится — просто fade+slide сразу после первого кадра) ───────────── */
.reveal-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1);
}
.reveal-in--visible { opacity: 1; transform: translateY(0); }
.reveal-in--delay { transition-delay: 0.12s; }

/* ── Левая колонка: презентация портала ─────────────────────────────── */
.auth-pitch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.auth-pitch-title {
    font-size: clamp(1.75rem, 3.4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.auth-pitch-text {
    color: #9ca3af;
    font-size: 1rem;
    line-height: 1.7;
    max-width: 34rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 900px) {
    .auth-pitch-text { margin-left: auto; margin-right: auto; }
}

.auth-pitch-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    list-style: none;
}

@media (max-width: 900px) {
    .auth-pitch-list { align-items: center; }
}

.auth-pitch-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #d1d5db;
    font-size: 0.92rem;
}

.auth-pitch-list i {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.6rem;
    color: #a78bfa;
    font-size: 0.85rem;
}

/* ── Правая колонка: карточка входа ──────────────────────────────────── */
.auth-card {
    background: rgba(15, 15, 20, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2.25rem;
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

/* Карточка сама по себе, без соседней pitch-колонки — register/forgot-
   password/reset-password (login.php использует .auth-shell с двумя
   колонками, эти три страницы — просто центрированная карточка). */
.auth-card--solo { margin: 0 auto; }

.auth-card-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.35rem;
}

.auth-card-title--center { text-align: center; }

.auth-card-subtitle {
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.auth-card-subtitle--center { text-align: center; }

.auth-card-icon {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-card-icon img {
    max-width: 140px;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 0 auto;
}

.auth-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.7rem 0.9rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.auth-success {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #86efac;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.auth-field-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-field input {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-field input::placeholder { color: #4b5563; }

.auth-field input:focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.06);
}

.auth-submit {
    position: relative;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    border-radius: 0.85rem;
    padding: 0.9rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.1s ease;
}

.auth-submit:hover { filter: brightness(1.1); }
.auth-submit:active { transform: scale(0.98); }

.auth-submit-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.1rem;
    height: 1.1rem;
    margin: -0.55rem 0 0 -0.55rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

.auth-submit--loading .auth-submit-text { opacity: 0; }
.auth-submit--loading .auth-submit-spinner { display: block; }

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

.auth-link-row {
    text-align: center;
    margin-top: 1.1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.auth-link-row a {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 600;
}

.auth-link-row a:hover { text-decoration: underline; }

.auth-link-row--muted { margin-top: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
    .reveal-in { transition: opacity 0.3s ease; transform: none; }
}
