/* ============================================================
   AUZATA — стили страницы авторизации
   Тёмный космос, звёзды, светящаяся плита
   ============================================================ */

/* ============================================================
   Переменные цветов
   ============================================================ */
:root {
    --bg: #000008;
    --plate-bg: #0a0a1a;
    --plate-border: rgba(0, 180, 255, 0.15);
    --glow-blue: #00cfff;
    --glow-green: #4ade80;
    --field-bg: rgba(255, 255, 255, 0.04);
    --field-border: rgba(255, 255, 255, 0.1);
    --text: #e2e8f0;
    --text-muted: #64748b;
    --red: #ef4444;
}

/* ============================================================
   Сброс и базовые стили
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow: hidden;
}

/* ============================================================
   Анимированные звёзды на фоне
   ============================================================ */
.stars, .stars2 {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.stars {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Ccircle cx='50' cy='80' r='1' fill='white' opacity='0.6'/%3E%3Ccircle cx='150' cy='30' r='0.8' fill='white' opacity='0.4'/%3E%3Ccircle cx='280' cy='120' r='1.2' fill='white' opacity='0.7'/%3E%3Ccircle cx='320' cy='200' r='0.7' fill='white' opacity='0.5'/%3E%3Ccircle cx='90' cy='250' r='1' fill='%2300cfff' opacity='0.4'/%3E%3Ccircle cx='370' cy='350' r='0.8' fill='white' opacity='0.6'/%3E%3Ccircle cx='200' cy='380' r='1.1' fill='white' opacity='0.3'/%3E%3Ccircle cx='60' cy='340' r='0.9' fill='%2300cfff' opacity='0.5'/%3E%3Ccircle cx='340' cy='60' r='0.7' fill='white' opacity='0.8'/%3E%3Ccircle cx='170' cy='170' r='0.6' fill='white' opacity='0.4'/%3E%3C/svg%3E") repeat;
    animation: starsMove 80s linear infinite;
    opacity: 0.8;
}

.stars2 {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Ccircle cx='100' cy='100' r='1.5' fill='white' opacity='0.3'/%3E%3Ccircle cx='400' cy='50' r='1' fill='%2300cfff' opacity='0.3'/%3E%3Ccircle cx='550' cy='300' r='1.3' fill='white' opacity='0.4'/%3E%3Ccircle cx='250' cy='450' r='0.8' fill='white' opacity='0.5'/%3E%3Ccircle cx='480' cy='520' r='1.1' fill='%2300cfff' opacity='0.2'/%3E%3C/svg%3E") repeat;
    animation: starsMove 120s linear infinite reverse;
    opacity: 0.5;
}

@keyframes starsMove {
    from { transform: translateY(0); }
    to { transform: translateY(-400px); }
}

/* ============================================================
   Контейнер
   ============================================================ */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* ============================================================
   Плита
   ============================================================ */
.plate {
    background: var(--plate-bg);
    border: 1px solid var(--plate-border);
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow:
        0 0 0 1px rgba(0, 180, 255, 0.05),
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(0, 180, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: plateAppear 0.6s ease-out;
}

@keyframes plateAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   Логотип
   ============================================================ */
.logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.logo {
    width: 100%;
    max-width: 320px;
    max-height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(0, 200, 255, 0.5));
}

/* ============================================================
   Таб
   ============================================================ */
.tabs {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 9px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    cursor: default;
    transition: all 0.2s;
}

.tab.active {
    background: rgba(0, 180, 255, 0.12);
    color: var(--glow-blue);
    box-shadow: 0 0 12px rgba(0, 180, 255, 0.1);
}

/* ============================================================
   Поля ввода
   ============================================================ */
.field {
    width: 100%;
    padding: 13px 16px;
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 10px;
    color: var(--text);
    font-size: 15px;
    margin-bottom: 12px;
    outline: none;
    transition: all 0.25s ease;
}

.field::placeholder {
    color: var(--text-muted);
}

.field:focus {
    border-color: var(--glow-blue);
    background: rgba(0, 200, 255, 0.06);
    box-shadow:
        0 0 0 3px rgba(0, 200, 255, 0.12),
        0 0 20px rgba(0, 200, 255, 0.15),
        0 0 40px rgba(0, 180, 255, 0.08),
        inset 0 0 12px rgba(0, 200, 255, 0.04);
}

/* ============================================================
   Кнопки
   ============================================================ */
.btn-main, .btn-secondary, .btn-forgot, .btn-danger {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 10px;
}

.btn-main {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
}

.btn-main:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow:
        0 0 20px rgba(74, 222, 128, 0.6),
        0 0 40px rgba(74, 222, 128, 0.3);
    animation: btnPulse 0.8s ease-in-out infinite;
    transform: translateY(-1px);
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(74, 222, 128, 0.6), 0 0 40px rgba(74, 222, 128, 0.3); }
    50%       { box-shadow: 0 0 30px rgba(74, 222, 128, 0.9), 0 0 60px rgba(74, 222, 128, 0.5); }
}

.btn-main:active {
    transform: translateY(1px);
    animation: none;
}

.btn-secondary {
    background: rgba(34, 197, 94, 0.08);
    color: var(--glow-green);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.btn-secondary:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(74, 222, 128, 0.5);
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.3);
    animation: btnPulse 0.8s ease-in-out infinite;
    transform: translateY(-1px);
}

/* btn-forgot оставляем для совместимости, но используем btn-danger */
.btn-forgot {
    background: transparent;
    color: var(--glow-blue);
    border: 1px solid rgba(0, 180, 255, 0.2);
    font-size: 13px;
    font-weight: 400;
    padding: 9px;
}

.btn-forgot:hover {
    background: rgba(0, 180, 255, 0.06);
    border-color: rgba(0, 180, 255, 0.4);
}

/* Красная кнопка "Забыли пароль?" — появляется при неверном пароле */
.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow:
        0 0 20px rgba(239, 68, 68, 0.5),
        0 0 40px rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(1px);
}

/* Текст успешной смены пароля — синий акцент */
.reset-success-text {
    color: var(--glow-blue) !important;
    text-shadow: 0 0 20px rgba(0, 207, 255, 0.5) !important;
}

/* ============================================================
   Таймер кода
   ============================================================ */
.code-timer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.code-timer span {
    color: var(--glow-blue);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.code-timer.expired span {
    color: var(--red);
}

/* ============================================================
   Сообщения
   ============================================================ */
.msg {
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 14px;
    margin-bottom: 14px;
    text-align: center;
}

.msg.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.msg.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--glow-green);
}

/* ============================================================
   Экран "Регистрация успешна"
   ============================================================ */
.success-big {
    text-align: center;
    padding: 24px 0;
    animation: fadeIn 0.4s ease-out;
}

.success-big-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.success-big-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--glow-green);
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.hidden {
    display: none !important;
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 8, 0.85);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlayIn 0.3s ease-out;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: #0a0a1e;
    border: 1px solid rgba(0, 180, 255, 0.2);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(0, 180, 255, 0.05),
        0 24px 64px rgba(0, 0, 0, 0.9),
        0 0 80px rgba(0, 180, 255, 0.08);
    animation: modalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px 28px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 180, 255, 0.3) transparent;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 180, 255, 0.3);
    border-radius: 2px;
}

.modal-text {
    font-size: 14px;
    line-height: 1.7;
    color: #94a3b8;
    white-space: pre-wrap;
}

.modal-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.modal-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
}

.modal-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #22c55e;
    cursor: pointer;
}

.modal-checkbox-label {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-checkbox-link {
    color: var(--glow-blue);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 180, 255, 0.3);
    transition: border-color 0.2s;
}

.modal-checkbox-link:hover {
    border-color: var(--glow-blue);
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.btn-modal-decline {
    flex: 1;
    padding: 12px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-decline:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: var(--red);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.2);
}

.btn-modal-accept {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    transition: all 0.25s;
}

.btn-modal-accept.active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.25);
    cursor: pointer;
}

.btn-modal-accept.active:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

.btn-modal-accept.inactive {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
   PRELOADER — реальная загрузка ресурсов game_hub
   Показывается вместо форм после успешного логина
   ============================================================ */
.preloader-wrap {
    padding: 16px 0 8px;
    text-align: center;
}

.preloader-title {
    font-size: 13px;
    color: var(--glow-blue);
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 300;
    text-transform: uppercase;
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Обёртка полосы */
.preloader-bar-wrap {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

/* Полоса прогресса */
.preloader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00cfff, #4ade80);
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Бегущий блик по полосе */
.preloader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: barShimmer 1.2s ease-in-out infinite;
}

@keyframes barShimmer {
    from { left: -100%; }
    to { left: 200%; }
}

/* Строка информации под полосой */
.preloader-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

#preloader-text {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

#preloader-percent {
    font-weight: 600;
    color: var(--glow-blue);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
/* ============================================================
   ЭКРАН ДЕАКТИВИРОВАННОГО АККАУНТА
   ============================================================ */
.deleted-account-info {
    text-align: center;
    padding: 8px 0 20px;
}

.deleted-account-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: #f59e0b;
    text-shadow: 0 0 16px rgba(245, 158, 11, 0.5);
}

.deleted-account-title {
    font-family: var(--font-fantasy, Georgia, serif);
    font-size: 16px;
    color: #f59e0b;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.deleted-account-text {
    font-size: 13px;
    color: var(--text-muted, #6b6255);
    line-height: 1.6;
    margin-bottom: 10px;
}

.deleted-account-nick {
    color: var(--gold, #c9a84c);
    font-family: var(--font-fantasy, Georgia, serif);
}

.deleted-account-countdown {
    font-size: 13px;
    color: var(--text, #c8bfa8);
    margin-bottom: 6px;
}

.deleted-account-days {
    font-family: var(--font-fantasy, Georgia, serif);
    font-size: 20px;
    color: #f87171;
    font-weight: 700;
}

.deleted-account-hint {
    font-size: 11px;
    color: var(--text-muted, #6b6255);
    font-style: italic;
    opacity: 0.6;
}