/* Общие стили для всех страниц */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@400;600&display=swap');

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

body {
    background: #0a0f1e;
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    color: #e0e0e0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0f1e 0%, #1a1f2e 100%);
    z-index: -2;
}

.container { 
    position: relative; 
    z-index: 1; 
    max-width: 1200px;
}

/* Хедер - единый для всех страниц */
.header {
    background: rgba(10, 20, 40, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid #4a6eff;
    border-radius: 20px;
    padding: 30px 20px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 0 30px rgba(74, 110, 255, 0.3);
    z-index: 10;
}

.header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 2.5em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 15px #00ffff;
    letter-spacing: 2px;
}

.header .lead {
    font-size: 1.2em;
    color: #aaddff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Навигационное меню */
.nav-menu {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 15px 0 0;
    flex-wrap: wrap;
}

.nav-btn {
    background: linear-gradient(135deg, #2a2a4a, #1a1a3a);
    border: 2px solid #4a6eff;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border-radius: 50px;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(74, 110, 255, 0.3);
    text-decoration: none;
    font-size: 0.85rem;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(74, 110, 255, 0.6);
    border-color: #ff4aff;
    color: #fff;
}

.nav-btn-outline {
    background: transparent;
    border: 2px solid #ff4aff;
}

.nav-btn i {
    margin-right: 5px;
}

/* Кнопки */
.gamer-btn {
    background: linear-gradient(135deg, #2a2a4a, #1a1a3a);
    border: 2px solid #4a6eff;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 25px;
    border-radius: 50px;
    transition: all 0.2s ease;
    box-shadow: 0 0 15px rgba(74, 110, 255, 0.3);
    text-decoration: none;
    display: inline-block;
}

.gamer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(74, 110, 255, 0.6);
    border-color: #ff4aff;
    color: #fff;
}

.gamer-btn-outline {
    background: transparent;
    border: 2px solid #ff4aff;
}

/* Переключатель языка */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9999 !important;
}

.lang-button {
    background: rgba(20, 30, 50, 0.9);
    border: 2px solid #4a6eff;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    position: relative;
    z-index: 9999 !important;
}

.lang-button:hover {
    background: #4a6eff;
    transform: translateY(-2px);
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid #4a6eff;
    border-radius: 10px;
    padding: 8px;
    min-width: 200px;
    display: none;
    box-shadow: 0 0 30px rgba(74, 110, 255, 0.5);
    z-index: 10000 !important;
}

.lang-menu.show { display: block; }

.lang-menu a {
    display: flex;
    align-items: center;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.95em;
    background: rgba(20, 30, 50, 0.9);
    margin: 2px 0;
}

.lang-menu a:hover {
    background: linear-gradient(135deg, #4a6eff, #8a4aff);
    transform: translateX(5px);
}

.language-flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #00ffff;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Флаги */
.lang-ru { background: linear-gradient(to bottom, #fff 33%, #0039a6 33%, #0039a6 66%, #d52b1e 66%); }
.lang-en { background: linear-gradient(90deg, #012169 0 33%, #c8102e 33% 66%, #fff 66% 100%); }
.lang-fr { background: linear-gradient(90deg, #002395 0 33%, #fff 33% 66%, #ed2939 66% 100%); }
.lang-de { background: linear-gradient(to bottom, #000 33%, #dd0000 33%, #dd0000 66%, #ffcc00 66%); }
.lang-es { background: linear-gradient(to bottom, #aa1515 0 25%, #f1bf00 25% 75%, #aa1515 75% 100%); }
.lang-zh { background: #de2910; position: relative; }
.lang-zh::after { content: '★'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #ffde00; font-size: 12px; }
.lang-mo { background: linear-gradient(90deg, #0039a6 0 33%, #ffde00 33% 66%, #d52b1e 66% 100%); }
.lang-pl { background: linear-gradient(to bottom, #fff 50%, #d52b1e 50%); }
.lang-bg { background: linear-gradient(to bottom, #fff 33%, #009b75 33% 66%, #d52b1e 66%); }
.lang-ro { background: linear-gradient(90deg, #0039a6 0 33%, #ffde00 33% 66%, #d52b1e 66% 100%); }

/* Telegram кнопка */
.telegram-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.telegram-btn .btn {
    background: linear-gradient(135deg, #0088cc, #00aaff);
    border: 2px solid #00ffff;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.telegram-btn .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px #0088cc;
}

/* Статистические карточки */
.stat-card {
    border-radius: 15px;
    padding: 25px 15px;
    color: white;
    margin-bottom: 20px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 2px solid #4a6eff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(20, 30, 50, 0.8);
    position: relative;
    z-index: 1;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(74, 110, 255, 0.4);
    border-color: #00ffff;
}

.stat-card-1 { border-color: #ffd700; }
.stat-card-2 { border-color: #c0c0c0; }
.stat-card-3 { border-color: #cd7f32; }

.stat-card i {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8em;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px #00ffff;
    line-height: 1.2;
}

.stat-card div:last-child {
    font-family: 'Orbitron', sans-serif;
    font-size: 1em;
    color: #aaddff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Правила */
.rules-box {
    background: rgba(20, 30, 50, 0.8);
    backdrop-filter: blur(5px);
    border: 2px solid #4a6eff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    z-index: 5;
}

.rules-box h3 {
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.rules-box ul li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.rules-box ul li i {
    color: #00ff9d;
}

/* Карточки рейтинга */
.rating-card {
    background: rgba(20, 30, 50, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid #4a6eff;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.rating-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(74, 110, 255, 0.4);
    border-color: #00ffff;
}

.rating-card.first-place {
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px #ffd700;
}

.rating-card.second-place {
    border: 3px solid #c0c0c0;
    box-shadow: 0 0 20px #c0c0c0;
}

.rating-card.third-place {
    border: 3px solid #cd7f32;
    box-shadow: 0 0 20px #cd7f32;
}

.rating-place {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8em;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.rating-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2em;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px #00ffff;
}

.rating-star i {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    color: #fff;
    font-size: 1.3em;
}

.views-count {
    background: rgba(0, 100, 255, 0.2);
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid #00ffff;
    color: #fff;
    font-size: 0.9em;
}

/* Кнопка просмотра */
.btn-primary {
    background: linear-gradient(135deg, #4a6eff, #8a4aff);
    border: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    box-shadow: 0 0 20px rgba(74, 110, 255, 0.4);
    text-decoration: none;
    display: inline-block;
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(74, 110, 255, 0.6);
}

/* Пагинация */
.pagination { gap: 5px; }

.page-link {
    background: rgba(20, 30, 50, 0.8);
    border: 2px solid #4a6eff;
    color: #00ffff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.page-link:hover {
    background: #4a6eff;
    color: #fff;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #4a6eff, #8a4aff);
    border-color: #00ffff;
    color: #fff;
}

/* Карточки и списки */
.card {
    background: rgba(20, 30, 50, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid #4a6eff;
    border-radius: 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.card-header {
    background: rgba(10, 20, 40, 0.9);
    border-bottom: 2px solid #4a6eff;
    padding: 15px 20px;
}

.card-header h5 {
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    margin: 0;
    font-size: 1.2em;
}

.card-header h5 i {
    margin-right: 8px;
    color: #ff4aff;
}

.card-body { padding: 20px; }

.list-group {
    background: transparent;
}

.list-group-item {
    background: rgba(30, 40, 60, 0.8);
    border: 1px solid #4a6eff;
    border-radius: 8px !important;
    margin-bottom: 6px;
    color: #fff;
    padding: 12px 15px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: rgba(40, 50, 70, 0.9);
    border-color: #00ffff;
    transform: translateX(3px);
}

.list-group-item-action {
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    display: block;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #4a6eff, #8a4aff) !important;
    font-family: 'Orbitron', sans-serif;
    padding: 5px 10px;
    border-radius: 50px;
}

.badge.bg-secondary {
    background: rgba(108, 117, 125, 0.5) !important;
    font-family: 'Orbitron', sans-serif;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid #00ffff;
}

/* Формы */
.form-container {
    max-width: 800px;
    margin: 0 auto 30px;
    background: rgba(20, 30, 50, 0.9);
    backdrop-filter: blur(5px);
    border: 2px solid #4a6eff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 30px rgba(74, 110, 255, 0.3);
}

.form-label {
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    font-weight: 500;
    margin-bottom: 5px;
}

.form-control, .form-select {
    background: rgba(10, 20, 40, 0.9);
    border: 2px solid #4a6eff;
    border-radius: 10px;
    color: #fff;
    padding: 10px 15px;
    transition: all 0.2s ease;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: #00ffff;
    box-shadow: 0 0 15px #00ffff;
    background: rgba(10, 20, 40, 0.95);
    color: #fff;
    outline: none;
}

.form-text { color: #aaddff; font-size: 0.85em; }

.alert-info {
    background: rgba(0, 100, 255, 0.15);
    border: 2px solid #00ffff;
    border-radius: 12px;
    color: #fff;
    padding: 20px;
    margin: 20px 0;
}

/* Топ-сайты */
.top-sites-section { margin-top: 30px; }

.top-sites-section h5 {
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.top-sites-list {
    max-height: 350px;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(20, 30, 50, 0.5);
    border: 2px solid #4a6eff;
    padding: 5px;
}

.top-sites-list::-webkit-scrollbar {
    width: 5px;
}

.top-sites-list::-webkit-scrollbar-track {
    background: rgba(20, 30, 50, 0.8);
}

.top-sites-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4a6eff, #8a4aff);
    border-radius: 5px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header h1 { font-size: 1.8em; }
    .rating-place { font-size: 1.5em; }
    .rating-number { font-size: 1.8em; }
    .stat-number { font-size: 2.2em; }
    
    .language-switcher, .telegram-btn { 
        position: relative; 
        top: 0; 
        margin: 10px; 
        z-index: 9999 !important;
    }
    
    .header { padding-top: 40px; }
    
    .lang-menu {
        min-width: 180px;
        max-height: 300px;
        overflow-y: auto;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
    }
}