:root {
    /* Строгая темная тема из референсов */
    --bg-body: #050505;
    --bg-card: #0a0a0c;
    --bg-input: #151518;
    --border-color: #242429;
    --border-focus: #ffb400; /* Акцентный фокус */
    --accent: #ffb400;
    --accent-hover: #e09e00;
    --accent-glow: rgba(255, 180, 0, 0.08);
    
    /* Текст */
    --text-main: #ffffff;
    --text-muted: #85858b;
    --text-input: #ffffff;
    
    /* Состояния */
    --error-bg: rgba(255, 69, 58, 0.1);
    --error-text: #ff453a;
    --error-border: rgba(255, 69, 58, 0.2);
    --success-bg: rgba(48, 209, 88, 0.1);
    --success-text: #30d158;
    --success-border: rgba(48, 209, 88, 0.2);
    
    /* Размеры */
    --radius-btn: 12px;
    --radius-input: 14px;
    --radius-card: 24px;
    --transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- СТРУКТУРА МАКЕТА --- */
.page-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.hero-side {
    display: none; /* Скрыто на мобильных */
    position: relative;
    overflow: hidden;
    background-color: var(--bg-body);
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.6); /* Затемнение видео для читаемости текста */
    background-image: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 60%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-content img {
    width: 120px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 25px rgba(255, 180, 0, 0.3));
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- КОНТРОЛЛЕРЫ ВИДЕО --- */
.video-controls {
    position: absolute;
    bottom: 40px;
    left: 40px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(15, 15, 18, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.control-btn:hover {
    color: var(--accent);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 15px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.volume-slider::-webkit-slider-thumb:hover {
    background: var(--accent);
    transform: scale(1.2);
}

.form-side {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

/* --- АДАПТАЦИЯ ДЛЯ ПК (Разделенный экран) --- */
@media (min-width: 900px) {
    .hero-side {
        display: flex;
        flex: 1; /* Занимает всё свободное место слева */
        align-items: center;
        justify-content: center;
        border-right: 1px solid var(--border-color);
    }
    
    .form-side {
        width: 500px; /* Фиксированная ширина панели справа */
        background: var(--bg-card); /* Слегка выделяем панель цветом */
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.4);
        z-index: 10;
    }
}

/* --- ЭЛЕМЕНТЫ ФОРМЫ --- */
.back-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.back-nav:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
    background: #1c1c20;
}

.auth-header {
    margin-bottom: 32px;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    color: var(--text-main);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border: 1px solid;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-wrapper i.icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
    pointer-events: none;
    transition: var(--transition);
}

.form-control {
    width: 100%;
    height: 54px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-input);
    padding: 0 48px; 
    border-radius: var(--radius-input);
    font-size: 1rem;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-control::placeholder {
    color: #55555c;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: #1a1a1e;
}

.form-control:focus ~ i.icon-left {
    color: var(--accent);
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.toggle-password:hover {
    color: var(--text-main);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
    transition: var(--transition);
}

.checkbox-container:hover {
    color: var(--text-main);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid var(--text-muted);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-container input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-container input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    width: 4px;
    height: 8px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.link:hover {
    color: var(--text-main);
}

.btn-primary {
    width: 100%;
    height: 54px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 28px 0;
    color: #4a4a50;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider::before { margin-right: 16px; }
.divider::after { margin-left: 16px; }

.vk-container-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.footer-nav {
    text-align: center;
    margin-top: 32px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-nav .link-accent {
    color: var(--text-main);
    font-weight: 500;
    text-decoration: none;
    margin-left: 4px;
    transition: var(--transition);
}

.footer-nav .link-accent:hover {
    color: var(--accent);
}

.footer-nav p {
    margin-top: 16px;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #55555c;
}

.footer-nav p a {
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-color: #33333a;
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.account-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-input);
    cursor: pointer;
    transition: var(--transition);
}

.account-item:hover {
    border-color: var(--text-muted);
    background: #1c1c20;
}

.account-item input[type="radio"] {
    display: none;
}

.account-item input[type="radio"]:checked + .account-info {
    color: var(--accent);
}

.account-item input[type="radio"]:checked ~ .account-check {
    background: var(--accent);
    border-color: var(--accent);
}

.account-item input[type="radio"]:checked ~ .account-check::after {
    opacity: 1;
}

.account-info {
    flex-grow: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    transition: var(--transition);
}

.account-info i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.account-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}

.account-check::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}