/* ========================================
   AUTH PAGE - PAPA GRILL
   СТИЛИ КАК В ПРОФИЛЕ
   ======================================== */

:root {
    --yellow: #f7c600;
    --yellow-hover: #ffda44;
    --bg-dark: #0a0a0a;
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-muted: #a0a0a0;
    --text-main: #ffffff;
    --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

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

body {
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

.site-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 40%, rgba(247, 198, 0, 0.08), transparent 60%),
                linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
    z-index: -1;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Glass Card как в профиле */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.96), rgba(14, 14, 14, 0.98));
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
    animation: fadeSlideUp 0.5s ease forwards;
}

.auth-card:hover {
    border-color: rgba(247, 198, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(247, 198, 0, 0.1);
}

/* Анимация появления */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow эффект */
.auth-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(247, 198, 0, 0.15), rgba(247, 198, 0, 0));
    pointer-events: none;
    border-radius: 50%;
}

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

.auth-logo img {
    height: 70px;
    filter: drop-shadow(0 0 12px rgba(247, 198, 0, 0.3));
    transition: var(--transition);
}

.auth-logo img:hover {
    transform: scale(1.02);
}

/* Заголовки */
.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, rgba(247, 198, 0, 0.8) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* Табы */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-tab {
    height: 48px;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.08);
}

.auth-tab.active {
    background: var(--yellow);
    color: #000;
    border-color: var(--yellow);
    box-shadow: 0 4px 12px rgba(247, 198, 0, 0.2);
}

/* Панели */
.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: fadeSlideUp 0.3s ease;
}

/* Переключатель способов входа */
.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-switch__btn {
    height: 44px;
    border-radius: 22px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.auth-switch__btn.active {
    border-color: var(--yellow);
    color: var(--yellow);
    background: rgba(247, 198, 0, 0.08);
}

.auth-panel-inner {
    display: none;
}

.auth-panel-inner.active {
    display: block;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-step-form {
    display: none;
}

.auth-step-form.active {
    display: flex;
}

/* Поля ввода */
.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.auth-input {
    width: 100%;
    height: 50px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: rgba(10, 10, 10, 0.6);
    color: #fff;
    padding: 0 16px;
    outline: none;
    transition: var(--transition);
    font-size: 14px;
    margin-bottom: 16px;
}

.auth-input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.1), 0 0 15px rgba(247, 198, 0, 0.1);
    background: rgba(10, 10, 10, 0.8);
}

.auth-input.error {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Счетчик символов */
.char-counter {
    display: block;
    font-size: 12px;
    margin-top: -12px;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

/* Кнопки */
.auth-btn {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--yellow), #e6b800);
    color: #000;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:active::before {
    width: 300px;
    height: 300px;
}

.auth-btn:hover {
    background: linear-gradient(135deg, #ffdd40, var(--yellow));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 198, 0, 0.35);
}

.auth-btn--secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.auth-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: none;
}

/* Информационный блок */
.auth-step-info {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.auth-step-info span {
    color: var(--yellow);
    font-weight: 700;
}

.auth-step-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Сообщения */
.auth-message {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
}

.auth-message--success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #a5d6a7;
}

.auth-message--error {
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ffb3b3;
}

/* Футер */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.auth-back-link {
    color: var(--yellow);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-back-link:hover {
    color: var(--yellow-hover);
    gap: 10px;
}

/* Адаптив */
@media (max-width: 640px) {
    .auth-page {
        padding: 20px 16px;
        align-items: stretch;
    }
    
    .auth-card {
        padding: 28px 20px;
        border-radius: 28px;
    }
    
    .auth-title {
        font-size: 28px;
    }
    
    .auth-subtitle {
        font-size: 13px;
    }
    
    .auth-tabs,
    .auth-switch {
        gap: 8px;
    }
    
    .auth-tab,
    .auth-switch__btn {
        height: 42px;
        font-size: 14px;
    }
    
    .auth-input {
        height: 46px;
        margin-bottom: 14px;
    }
    
    .auth-btn {
        min-height: 48px;
    }
    
    .char-counter {
        margin-top: -10px;
        margin-bottom: 14px;
    }
}
/* ===== ТАЙМЕР С ЛИНИЕЙ ===== */
.timer-container {
    margin: 16px 0 20px;
    text-align: center;
}

.timer-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.timer-progress {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), #ffda44);
    border-radius: 4px;
    transition: width 1s linear;
}

.timer-text {
    font-size: 12px;
    color: var(--text-muted);
}

.timer-text span {
    color: var(--yellow);
    font-weight: 700;
}

/* ===== ПОЛЯ ДЛЯ ВВОДА КОДА (4 отдельные ячейки) ===== */
.code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.code-digit {
    width: 60px;
    height: 70px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: #fff;
    outline: none;
    transition: var(--transition);
}

.code-digit:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(247, 198, 0, 0.1);
}

.code-digit.error {
    border-color: #ff6b6b;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Адаптив для мобильных */
@media (max-width: 640px) {
    .code-digit {
        width: 48px;
        height: 56px;
        font-size: 22px;
    }
    
    .code-inputs {
        gap: 8px;
    }
}

/* Скрытое поле для кода */
.hidden-code-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Кнопка повторной отправки */
.resend-btn {
    background: transparent;
    border: none;
    color: var(--yellow);
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.resend-btn:hover:not(:disabled) {
    background: rgba(247, 198, 0, 0.1);
    color: #ffda44;
}

.resend-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .code-digit {
        width: 48px;
        height: 56px;
        font-size: 24px;
        gap: 8px;
    }
    
    .code-inputs {
        gap: 8px;
    }
}