/* ===== ОСНОВНЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Segoe UI', monospace;
    background: radial-gradient(circle at 20% 30%, #0a0f0a, #030603);
    color: #00ff88;
    min-height: 100vh;
}

/* Киберпанк-сетка на фоне */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, rgba(0, 255, 136, 0.08) 0px, rgba(0, 255, 136, 0.08) 2px, transparent 2px, transparent 8px),
        repeating-linear-gradient(90deg, rgba(0, 255, 136, 0.08) 0px, rgba(0, 255, 136, 0.08) 2px, transparent 2px, transparent 8px);
    pointer-events: none;
    z-index: 0;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* ===== НАВИГАЦИЯ ===== */
.top-nav {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 1px solid #00ff88;
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #EE82EE;
    text-shadow: 0 0 5px #EE82EE;
    text-decoration: none;
}

.burger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #EE82EE;
    background: none;
    border: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #EE82EE;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 25px;
    transition: 0.3s;
    font-weight: bold;
}

.nav-links a:hover {
    background: rgba(238, 130, 238, 0.2);
    box-shadow: 0 0 10px #EE82EE;
}

@media (max-width: 768px) {
    .burger {
        display: block;
    }
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 15px;
    }
    .nav-links.show {
        display: flex;
    }
}

/* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    gap: 30px;
    position: relative;
    z-index: 1;
}

/* ===== САЙДБАР ===== */
.sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 20px;
    height: fit-content;
    border: 1px solid #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    position: sticky;
    top: 90px;
}

.sidebar h3 {
    margin-bottom: 20px;
    color: #EE82EE;
    font-size: 18px;
}

.sidebar a {
    display: block;
    color: #00ff88;
    text-decoration: none;
    padding: 10px 15px;
    margin: 5px 0;
    border-radius: 12px;
    transition: 0.3s;
}

.sidebar a:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateX(5px);
    box-shadow: 0 0 8px #00ff88;
}

/* ===== НОВЫЕ ИГРОКИ С АВАТАРКАМИ ===== */
.new-players-sidebar {
    margin-top: 40px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.new-players-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.new-player-item {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.new-player-item:hover {
    background: rgba(0, 255, 136, 0.1);
    transform: translateX(5px);
}

.new-player-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.new-player-avatar {
    flex-shrink: 0;
}

.mini-avatar {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #00ff88;
}

.mini-avatar-placeholder {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    border: 1.5px solid #EE82EE;
}

.new-player-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.new-player-name {
    font-weight: bold;
    color: #00ff88;
    font-size: 0.9rem;
}

.player-since {
    font-size: 0.65rem;
    color: #EE82EE;
    opacity: 0.8;
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hero-section {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
}

.neon-title {
    font-size: 2rem;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
    margin-bottom: 15px;
}

.flame-flicker {
    animation: flameFlicker 1.5s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
    0% { text-shadow: 0 0 5px #00ff88; opacity: 1; }
    100% { text-shadow: 0 0 20px #00ff88, 0 0 30px #EE82EE; opacity: 0.95; }
}

.hero-text {
    font-size: 1.2rem;
    margin-top: 15px;
    color: #00ff88;
}

.hero-subtext {
    font-size: 0.9rem;
    margin-top: 8px;
    color: #EE82EE;
}

/* ===== ХРОНИКА ИГР ===== */
.chronicle-section {
    margin-bottom: 40px;
}

.chronicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.chronicle-card {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #00ff88;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease backwards;
}

.chronicle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chronicle-card:nth-child(1) { animation-delay: 0.1s; }
.chronicle-card:nth-child(2) { animation-delay: 0.2s; }
.chronicle-card:nth-child(3) { animation-delay: 0.3s; }
.chronicle-card:nth-child(4) { animation-delay: 0.4s; }
.chronicle-card:nth-child(5) { animation-delay: 0.5s; }
.chronicle-card:nth-child(6) { animation-delay: 0.6s; }

.chronicle-inner {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.chronicle-text h3 {
    color: #00ff88;
    margin-bottom: 10px;
}

.chronicle-text p {
    color: #aaa;
    margin-bottom: 15px;
}

.cyber-button {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: 0.3s;
}

.cyber-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px #00ff88;
}

.chronicle-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 15px;
}

/* ===== КИБЕРПАНК-ТОСТЫ ===== */
.cyber-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 280px;
    max-width: 350px;
    background: rgba(10, 15, 10, 0.95);
    border: 1px solid #00ff88;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.cyber-toast.show {
    transform: translateX(0);
}

.toast-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #EE82EE, #00ff88);
    animation: glowMove 2s linear infinite;
}

@keyframes glowMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

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

.neon-text-small {
    color: #00ff88;
    text-shadow: 0 0 5px #00ff88;
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: #EE82EE;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    transition: all 0.2s;
}

.toast-close:hover {
    color: #ff3366;
    transform: scale(1.1);
}

.toast-body {
    padding: 10px 12px;
    color: #ccc;
    font-size: 0.85rem;
    font-family: monospace;
    word-break: break-word;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #EE82EE;
    width: 100%;
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast-message { border-left: 3px solid #00ff88; }
.toast-alert { border-left: 3px solid #ff3366; }
.toast-game { border-left: 3px solid #ffaa00; }
.toast-achievement { border-left: 3px solid #EE82EE; }
.toast-info { border-left: 3px solid #00ccff; }

/* Бейдж уведомлений */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff3366;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: monospace;
    box-shadow: 0 0 10px #ff3366;
}

.notification-badge.pulse {
    animation: badgePulse 1s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* ===== ФУТЕР И МОБИЛЬНОЕ МЕНЮ ===== */
.content {
    flex: 1;
}

.footer {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 20px;
    text-align: center;
    font-size: 12px;
    border-top: 1px solid #00ff88;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.footer a {
    color: #00ff88;
    text-decoration: none;
    margin: 0 10px;
}

.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid #EE82EE;
    padding: 10px;
    z-index: 20;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.mobile-bottom-bar a {
    color: #EE82EE;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: static;
        order: 2;
        margin-bottom: 80px;
    }
    .content {
        order: 1;
    }
    .mobile-bottom-bar {
        display: flex;
    }
    .chronicle-grid {
        grid-template-columns: 1fr;
    }
    .hero-section {
        padding: 20px;
    }
    .neon-title {
        font-size: 1.5rem;
    }
}

/* ===== ПРОФИЛЬ ===== */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    text-align: center;
    color: white;
    border-radius: 30px 30px 0 0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    margin-bottom: 20px;
}

.section {
    background: white;
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a1a2e;
}

.empty-message {
    color: #666;
    font-style: italic;
}

/* ===== АНИМАЦИЯ КАРТОЧЕК ХРОНИКИ ===== */
.game-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease backwards;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержка для каждой карточки (эффект очереди) */
.game-card:nth-child(1) { animation-delay: 0.05s; }
.game-card:nth-child(2) { animation-delay: 0.10s; }
.game-card:nth-child(3) { animation-delay: 0.15s; }
.game-card:nth-child(4) { animation-delay: 0.20s; }
.game-card:nth-child(5) { animation-delay: 0.25s; }
.game-card:nth-child(6) { animation-delay: 0.30s; }
.game-card:nth-child(7) { animation-delay: 0.35s; }
.game-card:nth-child(8) { animation-delay: 0.40s; }
.game-card:nth-child(9) { animation-delay: 0.45s; }
.game-card:nth-child(10) { animation-delay: 0.50s; }