/* ==========================================================
   CS DUEL 2026 - КИБЕРПАНК СТИЛЬ (СТАБИЛЬНАЯ ВЕРСИЯ)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

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

body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: #0a0a12;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== ШАПКА ===== */
header {
    background: #0a0a12;
    padding: 0.8rem 2rem;
    border-bottom: 2px solid #00ffff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 1.2rem;
}

/* ===== МЕНЮ — ВСЕГДА ВИДИМО ===== */
nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #b3b6bc !important;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Rajdhani', sans-serif;
    background: transparent;
    display: inline-block;
    border: none;
}

nav ul li a:hover {
    color: #00ffff !important;
    background: rgba(0, 255, 255, 0.08);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

/* Кнопка "Создать матч" */
.btn-nav {
    background: linear-gradient(135deg, #00ffff, #0088ff) !important;
    color: #0a0a12 !important;
    font-weight: 700 !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 4px !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease !important;
}

.btn-nav:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.4) !important;
    color: #0a0a12 !important;
}

/* Выйти — красный */
nav ul li a[href="logout.php"] {
    color: #ff5555 !important;
}

nav ul li a[href="logout.php"]:hover {
    color: #ff7777 !important;
    background: rgba(255, 50, 50, 0.08);
}

/* Уведомления — золотой */
nav ul li a[href="notifications.php"] {
    color: #ffb700 !important;
}

nav ul li a[href="notifications.php"]:hover {
    color: #ffd700 !important;
    background: rgba(255, 183, 0, 0.08);
}

/* Профиль — зелёный */
nav ul li a[href="profile.php"] {
    color: #00ff66 !important;
}

nav ul li a[href="profile.php"]:hover {
    color: #66ff99 !important;
    background: rgba(0, 255, 102, 0.08);
}

/* ===== ГЛАВНАЯ ===== */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: #00ffff;
    padding: 0.3rem 1.2rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: #00ffff;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 60px rgba(0, 255, 255, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #8899aa;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.hero-subtitle span {
    color: #ff00ff;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Rajdhani', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #00ffff, #0088ff);
    color: #0a0a12 !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #00ffff !important;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.btn-secondary:hover {
    color: #fff !important;
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.05);
}

.btn-small {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 255, 255, 0.06);
    color: #00ffff !important;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.15);
    transition: all 0.3s;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-small:hover {
    background: rgba(0, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
    transform: scale(1.05);
}

/* ===== СТАТИСТИКА ===== */
.stats-section {
    max-width: 1000px;
    margin: -2rem auto 2rem;
    padding: 0 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: rgba(10, 10, 18, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.06);
    border-radius: 8px;
    padding: 1.5rem 2rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
}

.stat-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.15);
}

.stat-label {
    font-size: 0.75rem;
    color: #556677;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* ===== МАТЧИ ===== */
.matches-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: #00ffff;
    letter-spacing: 2px;
}

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.match-card {
    background: rgba(10, 10, 18, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.06);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.match-card:hover {
    border-color: rgba(0, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.match-game {
    font-weight: 700;
    font-size: 0.8rem;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.match-players {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 1.05rem;
}

.match-players .vs {
    color: #445566;
    font-size: 0.8rem;
    font-weight: 700;
}

.match-players .player {
    color: #e0e0e0;
}

.match-info {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 0.8rem 0;
    font-size: 0.8rem;
    color: #667788;
}

.match-info .bet {
    color: #ff00ff;
    font-weight: 700;
}

.match-info .status {
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-info .status.waiting {
    background: rgba(0, 255, 255, 0.06);
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.match-info .status.active {
    background: rgba(255, 0, 255, 0.06);
    color: #ff00ff;
    border: 1px solid rgba(255, 0, 255, 0.1);
}

/* ===== СЕРВЕР В КАРТОЧКЕ ===== */
.match-server {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 255, 255, 0.03);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.match-server .server-label {
    color: #667788;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.match-server .server-ip {
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0, 255, 255, 0.02);
    font-size: 0.85rem;
}

.match-server .server-ip:hover {
    background: rgba(0, 255, 255, 0.08);
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.match-server .server-copy {
    cursor: pointer;
    color: #556677;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.match-server .server-copy:hover {
    color: #00ffff;
}

/* ===== ПУСТОЙ БЛОК ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(10, 10, 18, 0.4);
    border-radius: 8px;
    border: 1px dashed rgba(0, 255, 255, 0.06);
}

.empty-state p {
    color: #667788;
    font-size: 1.1rem;
}

.empty-state .empty-hint {
    font-size: 0.9rem;
    color: #445566;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ===== О ТУРНИРЕ ===== */
.about-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
    text-align: center;
}

.about-section h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #00ffff;
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.about-item {
    background: rgba(10, 10, 18, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.03);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    transition: all 0.3s;
}

.about-item:hover {
    border-color: rgba(0, 255, 255, 0.1);
    transform: translateY(-4px);
}

.about-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.8rem;
}

.about-item h3 {
    color: #00ffff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.about-item p {
    color: #667788;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== ФУТЕР ===== */
footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-top: 1px solid rgba(0, 255, 255, 0.03);
    color: #445566;
    font-size: 0.85rem;
    background: #0a0a12;
}

footer .footer-tagline {
    color: #334455;
    font-size: 0.75rem;
    margin-top: 0.3rem;
    letter-spacing: 3px;
    font-weight: 600;
}

/* ===== ФОРМЫ ===== */
form {
    background: rgba(10, 10, 18, 0.8);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #8899aa;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(0, 255, 255, 0.15) !important;
    border-radius: 8px;
    color: #e0e0e0 !important;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00ffff !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8899aa !important;
    opacity: 1;
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #556677;
    font-size: 0.75rem;
}

/* ===== АВТОРИЗАЦИЯ ===== */
.auth-container {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.06);
    border-radius: 12px;
}

.auth-container h2 {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    color: #00ffff;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    font-size: 1.3rem;
}

.auth-container input {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(0, 255, 255, 0.12) !important;
    color: #e0e0e0 !important;
}

.auth-container input:focus {
    border-color: #00ffff !important;
}

/* ===== ОШИБКИ / УСПЕХ ===== */
.error {
    background: rgba(255, 0, 255, 0.06);
    border: 1px solid rgba(255, 0, 255, 0.1);
    color: #ff00ff;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success {
    background: rgba(0, 255, 255, 0.06);
    border: 1px solid rgba(0, 255, 255, 0.1);
    color: #00ffff;
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.info {
    background: rgba(255, 183, 0, 0.08);
    border: 1px solid rgba(255, 183, 0, 0.2);
    color: #ffb700;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    nav ul {
        justify-content: center;
        gap: 0.2rem;
    }
    
    nav ul li a {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.5rem !important;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .auth-container {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* ==========================================================
   ВЫПАДАЮЩЕЕ МЕНЮ ДЛЯ СТАТИСТИКИ
   ========================================================== */
nav ul li:hover > ul {
    display: block !important;
}

nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 10, 18, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: 200;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

nav ul li ul li {
    list-style: none;
}

nav ul li ul li a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: #b3b6bc !important;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav ul li ul li a:hover {
    color: #00ffff !important;
    background: rgba(0, 255, 255, 0.05);
}

nav ul li ul li a[href*="clans"]:hover {
    color: #ff00ff !important;
    background: rgba(255, 0, 255, 0.05);
}

/* ==========================================================
   ОГНЕННЫЙ ЭФФЕКТ ДЛЯ ЛОГОТИПА CS DUEL
   ========================================================== */

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    color: #ff6b00;
    text-shadow: 
        0 0 5px #ff6b00,
        0 0 10px #ff6b00,
        0 0 20px #ff4500,
        0 0 40px #ff4500,
        0 0 80px #ff2200,
        0 0 120px #ff0000;
    animation: fireGlow 1.5s ease-in-out infinite alternate;
}

.logo-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 68, 0, 0.5));
    animation: fireIcon 1.5s ease-in-out infinite alternate;
}

.logo .logo-fire {
    position: absolute;
    pointer-events: none;
}

/* Анимация пульсации огня */
@keyframes fireGlow {
    0% {
        text-shadow: 
            0 0 5px #ff6b00,
            0 0 10px #ff6b00,
            0 0 20px #ff4500,
            0 0 40px #ff4500,
            0 0 80px #ff2200;
        transform: scale(1);
    }
    100% {
        text-shadow: 
            0 0 10px #ff8800,
            0 0 20px #ff6b00,
            0 0 40px #ff4500,
            0 0 80px #ff2200,
            0 0 120px #ff0000,
            0 0 160px #cc0000;
        transform: scale(1.02);
    }
}

/* Анимация для иконки */
@keyframes fireIcon {
    0% {
        filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.6)) drop-shadow(0 0 20px rgba(255, 68, 0, 0.3));
        transform: scale(1) rotate(-5deg);
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.9)) drop-shadow(0 0 40px rgba(255, 68, 0, 0.5));
        transform: scale(1.1) rotate(5deg);
    }
}

/* Огненные искры вокруг логотипа (дополнительно) */
.logo::before,
.logo::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(255, 107, 0, 0.1), transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    animation: fireParticles 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.logo::after {
    animation-delay: 1s;
    background: radial-gradient(ellipse at center, rgba(255, 50, 0, 0.05), transparent 70%);
    transform: translate(-50%, -50%) scale(2);
}

@keyframes fireParticles {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.2);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.8);
    }
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Дополнительные летающие искры (только для CS DUEL) */
.logo-fire-sparks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: -1;
}

.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff6b00;
    border-radius: 50%;
    box-shadow: 0 0 6px #ff4500, 0 0 12px #ff2200;
    animation: sparkFloat 2s ease-in-out infinite;
}

.spark:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.spark:nth-child(2) { top: 5%; right: 15%; animation-delay: 0.5s; }
.spark:nth-child(3) { bottom: 20%; left: 0%; animation-delay: 1s; }
.spark:nth-child(4) { bottom: 10%; right: 5%; animation-delay: 1.5s; }
.spark:nth-child(5) { top: 50%; left: -5%; animation-delay: 0.3s; }
.spark:nth-child(6) { top: 30%; right: -5%; animation-delay: 0.8s; }
.spark:nth-child(7) { bottom: 40%; left: -3%; animation-delay: 1.2s; }
.spark:nth-child(8) { bottom: 30%; right: -3%; animation-delay: 1.7s; }

@keyframes sparkFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(10px, -20px) scale(1.5);
        opacity: 0.8;
    }
    100% {
        transform: translate(-5px, -40px) scale(0.5);
        opacity: 0;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    .logo::before,
    .logo::after {
        transform: translate(-50%, -50%) scale(1);
    }
    .logo-fire-sparks {
        display: none;
    }
}