/* ===== ОСНОВНЫЕ СТИЛИ КИБЕРКОНСЬЕРЖ ===== */

:root {
    /* Цветовая схема */
    --primary-neon: #00f3ff;
    --secondary-neon: #ff00ff;
    --accent-neon: #00ff9d;
    --warning-neon: #ffaa00;
    
    --dark-bg: #0a0a12;
    --darker-bg: #050508;
    --card-bg: rgba(10, 15, 30, 0.8);
    --card-border: rgba(0, 243, 255, 0.3);
    
    --text-primary: #e0e0ff;
    --text-secondary: #8a8aff;
    --text-muted: #5a5a8a;
    
    /* Шрифты */
    --font-header: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-ui: 'Rajdhani', sans-serif;
    
    /* Эффекты */
    --glow-primary: 0 0 20px var(--primary-neon);
    --glow-secondary: 0 0 20px var(--secondary-neon);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-ui);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Фоновые канвасы */
#matrixCanvas,
#particlesCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

#matrixCanvas {
    opacity: 0.05;
}

#particlesCanvas {
    opacity: 0.1;
}

/* CRT эффекты */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    z-index: 9998;
    mix-blend-mode: overlay;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 243, 255, 0.03) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9997;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

/* Основной контейнер */
.cyber-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ===== ХЕДЕР ===== */
.cyber-header {
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    margin-bottom: 40px;
    position: relative;
}

.header-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 40px;
}

/* Логотип */
.logo-container {
    position: relative;
}

.logo-glitch {
    font-family: var(--font-header);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-neon);
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo-part-1 {
    color: var(--primary-neon);
    text-shadow: var(--glow-primary);
}

.logo-part-2 {
    color: var(--secondary-neon);
    text-shadow: var(--glow-secondary);
}

.logo-subtitle {
    margin-top: 5px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.signal-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.signal-dot.active {
    background: var(--accent-neon);
    box-shadow: 0 0 10px var(--accent-neon);
}

.signal-dot.active:nth-child(1) { animation: pulse 1s infinite; }
.signal-dot.active:nth-child(2) { animation: pulse 1s infinite 0.3s; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Навигация */
.cyber-nav {
    justify-self: center;
}

.nav-list {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 10px 0;
    position: relative;
    transition: all 0.3s;
}

.nav-link::before {
    content: attr(data-hover);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--darker-bg);
    color: var(--primary-neon);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    border: 1px solid var(--primary-neon);
    z-index: 10;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    color: var(--primary-neon);
}

.nav-link:hover .link-arrow {
    transform: translateX(5px);
    color: var(--accent-neon);
}

.link-text {
    transition: all 0.3s;
}

.link-arrow {
    color: var(--text-muted);
    transition: all 0.3s;
}

/* Панель авторизации */
.auth-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.user-status {
    text-align: right;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(0, 243, 255, 0.3);
}

.status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-neon);
    animation: pulse 2s infinite;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.cyber-btn {
    position: relative;
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-family: var(--font-ui);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn {
    border: 1px solid;
    min-width: 180px;
}

.login-btn {
    border-color: var(--primary-neon);
    color: var(--primary-neon);
}

.register-btn {
    border-color: var(--secondary-neon);
    color: var(--secondary-neon);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px;
}

.auth-btn:hover .btn-glow {
    opacity: 1;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, currentColor 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

/* Загрузчик системы */
.system-loader {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
}

.loader-bar {
    height: 2px;
    background: rgba(0, 243, 255, 0.1);
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    animation: loading 3s ease-in-out infinite;
}

@keyframes loading {
    0%, 100% { width: 0%; }
    50% { width: 100%; }
}

.loader-text {
    position: absolute;
    right: 0;
    top: -25px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== ГЛАВНЫЙ КОНТЕНТ ===== */
.cyber-main {
    padding: 40px 0;
}

/* Герой секция */
.hero-section {
    margin-bottom: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    padding-right: 20px;
}

.hero-title {
    font-family: var(--font-header);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 30px;
}

.title-line {
    display: block;
    position: relative;
    overflow: hidden;
}

.title-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-neon), transparent);
    animation: slide 3s infinite;
}

@keyframes slide {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cyber-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.text-highlight {
    color: var(--primary-neon);
    font-weight: 600;
}

.text-glitch {
    position: relative;
    color: var(--secondary-neon);
}

.neon-accent {
    color: var(--accent-neon);
    text-shadow: 0 0 10px var(--accent-neon);
    animation: neon-flicker 2s infinite;
}

@keyframes neon-flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
    }
    20%, 24%, 55% {
        opacity: 0.8;
    }
}

/* Статистика в реальном времени */
.live-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary-neon);
    box-shadow: var(--glow-primary);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-neon);
    margin-bottom: 15px;
}

.stat-data {
    margin-bottom: 15px;
}

.stat-value {
    display: block;
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-neon);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-graph {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-neon));
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    animation: graph-wave 2s infinite linear;
}

@keyframes graph-wave {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

/* Терминал */
.hero-terminal {
    perspective: 1000px;
}

.terminal-wrapper {
    background: var(--darker-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--primary-neon);
    box-shadow: 
        0 0 30px rgba(0, 243, 255, 0.2),
        inset 0 0 30px rgba(0, 243, 255, 0.1);
    transform: rotateX(5deg);
    transition: transform 0.3s;
}

.terminal-wrapper:hover {
    transform: rotateX(0deg);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 10, 20, 0.9);
    border-bottom: 1px solid var(--primary-neon);
}

.terminal-tabs {
    display: flex;
    gap: 10px;
}

.tab {
    padding: 5px 15px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.tab.active {
    background: var(--primary-neon);
    color: var(--dark-bg);
    font-weight: 600;
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.3s;
}

.control-btn:hover {
    transform: scale(1.2);
}

.minimize { background: #ff5f56; }
.maximize { background: #ffbd2e; }
.close { background: #27ca3f; }

.terminal-body {
    padding: 20px;
    height: 250px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.5;
    background: rgba(0, 5, 10, 0.5);
}

.terminal-output p {
    margin-bottom: 10px;
}

.prompt {
    color: var(--accent-neon);
    font-weight: 600;
}

.blinking {
    animation: blink 1s infinite;
}

.cursor {
    color: var(--primary-neon);
    animation: blink 1s infinite;
}

.terminal-input {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 10, 20, 0.9);
    border-top: 1px solid var(--primary-neon);
}

.input-prompt {
    color: var(--accent-neon);
    margin-right: 10px;
    font-weight: 600;
}

.command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
}

.command-input::placeholder {
    color: var(--text-muted);
}

.send-command {
    background: transparent;
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.send-command:hover {
    background: var(--primary-neon);
    color: var(--dark-bg);
}

/* ===== СЕКЦИЯ КУРСОВ ===== */
.courses-section {
    margin-bottom: 100px;
}

.section-header {
    margin-bottom: 50px;
    text-align: center;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-family: var(--font-header);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.title-number {
    color: var(--text-muted);
    font-size: 1.5rem;
}

.title-text {
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.section-subtitle {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Сетка курсов */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.course-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-neon);
    box-shadow: var(--glow-primary);
}

.course-card:hover .course-hologram {
    opacity: 0.1;
}

.course-card.locked {
    opacity: 0.7;
    filter: grayscale(0.5);
}

.course-card.locked:hover {
    transform: none;
    border-color: var(--card-border);
    box-shadow: none;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.course-badge {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.badge-level {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 10px;
    background: rgba(0, 243, 255, 0.2);
    color: var(--primary-neon);
    border-radius: 10px;
    display: inline-block;
}

.badge-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
}

.badge-status.active {
    background: rgba(0, 255, 157, 0.2);
    color: var(--accent-neon);
}

.badge-status.locked {
    background: rgba(255, 0, 255, 0.2);
    color: var(--secondary-neon);
}

.course-icon {
    font-size: 2.5rem;
    color: var(--primary-neon);
}

.course-title {
    font-family: var(--font-header);
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--primary-neon);
}

.course-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.course-progress {
    margin-top: 25px;
}

.progress-bar {
    height: 4px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-neon), var(--accent-neon));
    border-radius: 2px;
    transition: width 1s ease;
}

.progress-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.progress-value {
    color: var(--accent-neon);
    font-weight: 600;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.course-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid;
    font-family: var(--font-ui);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.start-btn {
    border-color: var(--accent-neon);
    color: var(--accent-neon);
}

.start-btn:hover {
    background: rgba(0, 255, 157, 0.1);
}

.info-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border-color: var(--primary-neon);
    color: var(--primary-neon);
    justify-content: center;
}

.info-btn:hover {
    background: rgba(0, 243, 255, 0.1);
}

.locked-btn {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    width: 100%;
    justify-content: center;
}

.course-hologram {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 243, 255, 0.05) 50%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: -1;
}

/* Загрузчик курсов */
.courses-loader {
    text-align: center;
    padding: 30px;
}

.loader-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.loader-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-neon);
    animation: dots-bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dots-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.loader-text {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== СЕКЦИЯ CTA ===== */
.cta-section {
    background: linear-gradient(90deg, rgba(0, 243, 255, 0.1), rgba(255, 0, 255, 0.1));
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.cta-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cta-message {
    flex: 1;
}

.cta-title {
    font-family: var(--font-header);
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.text-blink {
    color: var(--accent-neon);
    animation: blink 1.5s infinite;
}

.cta-actions {
    display: flex;
    gap: 20px;
}

.cta-btn {
    padding: 15px 30px;
    min-width: 200px;
    font-size: 1rem;
}

.cta-btn.primary {
    background: linear-gradient(45deg, var(--primary-neon), var(--accent-neon));
    color: var(--dark-bg);
    border: none;
    font-weight: 700;
    position: relative;
}

.cta-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 243, 255, 0.3);
}

.btn-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    animation: pulse-ring 2s infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

.cta-btn.secondary {
    border-color: var(--secondary-neon);
    color: var(--secondary-neon);
}

.cta-btn.secondary:hover {
    background: rgba(255, 0, 255, 0.1);
}

.cta-terminal {
    background: rgba(0, 5, 10, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.terminal-message p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* ===== ФУТЕР ===== */
.cyber-footer {
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    padding-top: 40px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section {
    padding: 20px;
}

.footer-title {
    font-family: var(--font-header);
    color: var(--primary-neon);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-logs {
    list-style: none;
}

.footer-logs li {
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.log-time {
    color: var(--accent-neon);
    margin-right: 10px;
}

.connection-status {
    padding: 15px;
    background: rgba(0, 10, 20, 0.5);
    border-radius: 8px;
}

.connection-bar {
    height: 4px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.connection-quality {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-neon), var(--primary-neon));
    border-radius: 2px;
}

.connection-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    color: var(--accent-neon);
}

.support-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--primary-neon);
    width: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 243, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.powered-by {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tech-logo {
    padding: 5px 10px;
    background: rgba(0, 243, 255, 0.1);
    border-radius: 4px;
    color: var(--primary-neon);
    font-weight: 600;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.cyber-modal {
    background: var(--darker-bg);
    border: 1px solid var(--primary-neon);
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    box-shadow: 
        0 0 50px rgba(0, 243, 255, 0.3),
        inset 0 0 30px rgba(0, 243, 255, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
}

.modal-title {
    font-family: var(--font-header);
    color: var(--primary-neon);
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: var(--primary-neon);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* Форма */
.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 12px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.form-input:focus {
    border-bottom-color: var(--primary-neon);
}

.form-input:focus + .form-line {
    width: 100%;
}

.form-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-neon);
    transition: width 0.3s;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 3px;
    position: relative;
    transition: all 0.3s;
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary-neon);
    border-color: var(--primary-neon);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-bg);
    font-size: 0.8rem;
    font-weight: bold;
}

.form-link {
    color: var(--secondary-neon);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-link:hover {
    text-shadow: 0 0 10px var(--secondary-neon);
}

.submit-btn {
    background: linear-gradient(45deg, var(--primary-neon), var(--accent-neon));
    border: none;
    color: var(--dark-bg);
    font-weight: 700;
    padding: 15px;
    margin-top: 10px;
}

.submit-btn:hover .btn-loading {
    opacity: 1;
}

.btn-loading {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: var(--dark-bg);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 243, 255, 0.2);
}

.form-divider span {
    padding: 0 15px;
}

.alternative-auth {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.auth-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.auth-method:hover {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary-neon);
    color: var(--primary-neon);
}

.auth-method i {
    font-size: 1.5rem;
}

.auth-method span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: center;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-grid {
        gap: 40px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .header-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cyber-nav {
        justify-self: start;
    }
    
    .auth-panel {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text {
        padding-right: 0;
    }
    
    .cta-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .live-stats {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-btn {
        width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .alternative-auth {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cyber-container {
        padding: 0 15px;
    }
    
    .logo-glitch {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .auth-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .auth-btn {
        width: 100%;
    }
}