﻿@font-face {
    font-family: AESFont;
    src: url(/AESFont.ttf);
}

:root {
    --bg-body: #0b0b0e;
    --bg-block: rgba(24, 24, 32, 0.65);
    --bg-header: rgba(16, 16, 22, 0.96);
    --accent-orange: #ff761b;
    --accent-glow: rgba(255, 118, 27, 0.25);
    --text-primary: #f8fafc;
    --text-muted: #64748b;
    --border-classic: #232332;
    --radius-modern: 8px;
    --font-stack: 'AESFont', 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

a {
    color: var(--accent-orange);
    text-decoration: none;
    transition: var(--transition);
}

    a:hover {
        color: #ff934b;
    }

/* ===== КОНТЕЙНЕР ФОРМ ===== */
.auth-container {
    width: 100%;
    max-width: 440px;
    background-color: var(--bg-block);
    border: 1px solid var(--border-classic);
    border-radius: var(--radius-modern);
    padding: 1.8rem 2rem 1.6rem;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-orange) !important;
    margin-bottom: 1.2rem;
}

    .brand-link svg {
        fill: var(--accent-orange);
        width: 26px;
        height: 26px;
    }

    .brand-link:hover {
        opacity: 0.8;
    }

.form-panel {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

    .form-panel.active {
        display: flex;
    }

.panel-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.1rem;
}

    .panel-title span {
        color: var(--accent-orange);
    }

.panel-sub {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 0.4rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .field-group label {
        font-size: 13px;
        font-weight: 500;
        color: var(--text-muted);
        letter-spacing: 0.02em;
    }

        .field-group label .required {
            color: #ef4444;
            margin-left: 2px;
        }

    .field-group input,
    .field-group select {
        background-color: rgba(11, 11, 14, 0.7);
        border: 1px solid var(--border-classic);
        color: var(--text-primary);
        padding: 10px 14px;
        border-radius: var(--radius-modern);
        font-size: 14px;
        transition: var(--transition);
        outline: none;
        font-family: var(--font-stack);
        width: 100%;
    }

        .field-group input:focus,
        .field-group select:focus {
            border-color: var(--accent-orange);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        .field-group input::placeholder {
            color: var(--text-muted);
            opacity: 0.6;
        }

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

    .field-hint strong {
        color: var(--accent-orange);
    }

.btn-primary {
    background-color: var(--accent-orange);
    border: none;
    color: #0b0b0e;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 0;
    border-radius: var(--radius-modern);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-family: var(--font-stack);
    margin-top: 0.8rem;
}

    .btn-primary:hover {
        background-color: #ff8c3a;
        box-shadow: 0 0 20px var(--accent-glow);
    }

    .btn-primary:disabled {
        opacity: 0.5;
        pointer-events: none;
    }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-classic);
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 0;
    border-radius: var(--radius-modern);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-family: var(--font-stack);
    font-size: 14px;
    margin-top: 0.8rem;
}

    .btn-secondary:hover {
        border-color: var(--accent-orange);
        color: var(--accent-orange);
    }

.error-msg {
    color: #ef4444;
    font-size: 13px;
    background: rgba(239, 68, 68, 0.08);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: none;
}

    .error-msg.show {
        display: block;
    }

.success-msg {
    color: #22c55e;
    font-size: 13px;
    background: rgba(34, 197, 94, 0.08);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    display: none;
}

    .success-msg.show {
        display: block;
    }

/* ===== СОЦСЕТИ (только иконки) ===== */
.social-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    margin: 0.2rem 0 0.4rem;
}

    .social-divider::before,
    .social-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border-classic);
    }

.social-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-classic);
    border-radius: var(--radius-modern);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

    .social-btn:hover {
        border-color: var(--accent-orange);
        background: rgba(255,118,27,0.06);
    }

    .social-btn svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
        color: var(--text-primary);
        transition: var(--transition);
    }

    .social-btn:hover svg {
        color: var(--accent-orange);
    }

/* ===== КОД ПОДТВЕРЖДЕНИЯ (6 ячеек) ===== */
.code-section {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.2rem;
}

    .code-section.active {
        display: flex;
    }

.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
}

    .code-inputs input {
        width: 48px;
        height: 54px;
        text-align: center;
        font-size: 24px;
        font-weight: 700;
        background-color: rgba(11, 11, 14, 0.7);
        border: 1px solid var(--border-classic);
        border-radius: var(--radius-modern);
        color: var(--text-primary);
        outline: none;
        transition: var(--transition);
        font-family: var(--font-stack);
    }

        .code-inputs input:focus {
            border-color: var(--accent-orange);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        .code-inputs input.filled {
            border-color: var(--accent-orange);
            background-color: rgba(255, 118, 27, 0.08);
        }

.code-actions {
    display: flex;
    gap: 10px;
    margin-top: 0.2rem;
}

    .code-actions .btn-primary,
    .code-actions .btn-secondary {
        margin-top: 0;
    }

    .code-actions .btn-secondary {
        flex: 1;
    }

    .code-actions .btn-primary {
        flex: 1;
    }

.back-link {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    font-family: var(--font-stack);
    padding: 4px;
    margin-top: 4px;
}

    .back-link:hover {
        color: var(--accent-orange);
    }

/* ===== НОВЫЙ СТИЛЬ ФУТЕРА (ряд, gap 25px) ===== */
.form-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 0.4rem;
    display: flex;
    flex-direction: row;
    gap: 25px;
    justify-content: center;
}

    .form-footer a {
        font-weight: 600;
    }

/* ===== АДАПТИВ ===== */
@media (max-width: 520px) {
    .auth-container {
        padding: 1.2rem 1rem;
    }

    .code-inputs input {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }

    .social-btn {
        width: 44px;
        height: 44px;
    }

        .social-btn svg {
            width: 22px;
            height: 22px;
        }
}
