/* ============================================================
   COSMIC THEME — AETHER-STYLE DARK UI
   ============================================================
   Палитра:
   - Фон: #0a0a0f (глубокий космический чёрный)
   - Акценты: фиолетовый #a855f7, синий #3b82f6, циан #06b6d4
   - Золото: #f59e0b (для статусов и выделений)
   - Текст: #e2e8f0 (основной), #94a3b8 (вторичный)
   ============================================================ */

:root {
    --void: #0a0a0f;
    --void-light: #0f0f19;
    --surface: rgba(15, 15, 25, 0.65);
    --surface-hover: rgba(25, 25, 40, 0.7);
    
    --purple: #a855f7;
    --purple-glow: rgba(168, 85, 247, 0.4);
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --gold: #f59e0b;
    --red: #ef4444;
    --green: #10b981;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: rgba(168, 85, 247, 0.18);
    --border-focus: rgba(168, 85, 247, 0.5);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--void);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Звёздный фон (canvas) === */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* === Градиентный оверлей поверх звёзд === */
.cosmic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
}

/* === Навбар === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 64px;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-brand .orb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 12px var(--purple), 0 0 24px var(--purple-glow);
    animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { box-shadow: 0 0 12px var(--purple), 0 0 24px var(--purple-glow); }
    50% { box-shadow: 0 0 20px var(--purple), 0 0 40px var(--purple-glow); }
}

.nav-brand span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 6px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* === Основной контент === */
.main-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
}

/* === Glass Card (стеклянная карточка) === */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

/* Светящаяся рамка при наведении */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.05), transparent);
    transition: left 0.7s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    left: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Заголовки === */
.glass-card h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

/* === Формы === */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(168, 85, 247, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1), 0 0 20px rgba(168, 85, 247, 0.08);
    background: rgba(0, 0, 0, 0.45);
}

/* === Кнопки === */
.btn-primary {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25);
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Анимация блика на кнопке */
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::after {
    transform: rotate(45deg) translateX(100%);
}

/* === Вторичная кнопка (обводка) === */
.btn-outline {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    cursor: pointer;
    background: transparent;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-outline:hover {
    border-color: var(--purple);
    color: var(--text-primary);
    background: rgba(168, 85, 247, 0.08);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

/* === Сообщения === */
.message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: none;
    animation: fadeIn 0.3s ease;
    border: 1px solid transparent;
}

.message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--green);
    border-color: rgba(16, 185, 129, 0.2);
}

.message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Hero секция (главная страница) === */
.hero {
    text-align: center;
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero .gradient-text {
    background: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    width: auto;
    padding: 14px 36px;
}

/* === Dashboard === */
.dashboard-card {
    max-width: 500px;
    width: 100%;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.profile-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(168, 85, 247, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.3s ease;
}

.profile-item:hover {
    border-color: rgba(168, 85, 247, 0.25);
    background: rgba(0, 0, 0, 0.35);
}

.profile-item .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-item .value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

/* === Разделитель === */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 20px 0;
}

/* === Footer hint === */
.footer-hint {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.footer-hint a {
    color: var(--purple);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-hint a:hover {
    color: var(--blue);
}

/* === Адаптивность === */
@media (max-width: 480px) {
    .navbar {
        padding: 0 16px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .glass-card {
        padding: 28px 20px;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 32px;
    }
}