:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --border-color: #334155;
    --error-color: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.2s;
    font-size: 15px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

/* Контент */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 50px;
    align-items: center;
    padding: 60px 20px;
}

@media (max-width: 868px) {
    .main-content {
        grid-template-columns: 1fr;
        padding: 30px 20px;
        gap: 30px;
    }
}

/* Описание */
.promo-section h1 {
    font-size: 38px;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 700;
}

.promo-section p {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 35px;
}

.stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: var(--card-bg);
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-muted);
}

.stat-item strong {
    display: block;
    font-size: 22px;
    color: var(--accent);
    margin-bottom: 20px;
}

/* Карточки */
.auth-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease-in-out;
}

.hidden {
    display: none !important;
}

.auth-card h2 {
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.accent-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.accent-link:hover {
    text-decoration: underline;
}

/* Кнопка с лоадером */
.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 0.8s linear infinite;
    position: absolute;
}

.btn-primary.loading .btn-text {
    visibility: hidden;
}

.btn-primary.loading .spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

/* Уведомление (Toast) */
.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--error-color);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show {
    top: 24px;
}

/* Подвал */
.footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: auto;
}
