body {
    margin: 0;
    padding: 0;
    background: #090d16;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, sans-serif;
    color: #fff;
    overflow: hidden;
    user-select: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b2838 0%, #090d16 100%);
    z-index: 2;
}

.hidden {
    display: none !important;
}

/* --- АНИМИРОВАННЫЙ ФОН С ИСКРАМИ --- */
.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #38bdf8;
    border-radius: 50%;
    box-shadow: 0 0 10px #38bdf8, 0 0 20px #38bdf8;
    animation: floatParticle 8s infinite linear;
}

.particle:nth-child(1) { left: 10%; animation-duration: 6s; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; animation-duration: 9s; animation-delay: 2s; }
.particle:nth-child(3) { left: 50%; animation-duration: 7s; animation-delay: 1s; }
.particle:nth-child(4) { left: 70%; animation-duration: 10s; animation-delay: 4s; }
.particle:nth-child(5) { left: 90%; animation-duration: 5s; animation-delay: 3s; }

@keyframes floatParticle {
    0% { transform: translateY(105vh) scale(0.5); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* --- ВЕРХНЯЯ ПАНЕЛЬ СТАТИСТИКИ --- */
.top-bar {
    position: absolute;
    top: 25px;
    display: flex;
    gap: 15px;
    z-index: 10;
}

.stat-box {
    background: rgba(15, 23, 42, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 15px;
    border: 2px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
}

/* КОНТЕЙНЕР МЕНЮ --- */
.menu-container {
    display: flex;
    gap: 30px;
    z-index: 10;
    align-items: center;
}

/* ЛЕВАЯ ЧАСТЬ: ИВЕНТ-БАННЕР --- */
.event-banner-card {
    width: 320px;
    height: 340px;
    background: linear-gradient(135deg, #1e1b4b 0%, #311042 100%);
    border: 2px solid #a855f7;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
    position: relative;
    overflow: hidden;
}

.badge-new {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ec4899;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px #ec4899;
}

.event-banner-card h2 {
    margin: 20px 0 10px 0;
    font-size: 24px;
    color: #f472b6;
    text-shadow: 0 0 10px rgba(244, 114, 182, 0.5);
}

.event-banner-card p {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.banner-img-glow {
    width: 100%;
    height: 110px;
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
    border-radius: 12px;
    box-shadow: inset 0 0 15px rgba(255,255,255,0.3);
    animation: bannerPulse 3s infinite alternate;
}

@keyframes bannerPulse {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); box-shadow: 0 0 20px #ec4899; }
}

/* ПРАВАЯ ЧАСТЬ МЕНЮ --- */
.menu-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ПРОФИЛЬ ИГРОКА --- */
.profile-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: rgba(15, 23, 42, 0.85);
    padding: 15px 25px;
    border-radius: 16px;
    border: 2px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.avatar-wrapper {
    position: relative;
    width: 65px;
    height: 65px;
}

.profile-card img {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3b82f6;
}

.avatar-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px dashed #38bdf8;
    border-radius: 50%;
    animation: rotateRing 10s linear infinite;
}

@keyframes rotateRing {
    100% { transform: rotate(360deg); }
}

.profile-info h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
}

.rank-text {
    margin: 0;
    color: #38bdf8;
    font-size: 13px;
    font-weight: 600;
}

/* КНОПКИ МЕНЮ С ЭФФЕКТАМИ --- */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 320px;
}

.btn {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
}

.btn:active {
    transform: translateY(1px);
}

/* Главная кнопка Играть (Неоново-зеленая пульсирующая) */
.btn-play {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 18px;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    border: 1px solid #34d399;
    animation: playGlow 2s infinite alternate;
}

@keyframes playGlow {
    0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
    100% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.8); }
}

.btn-shop {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    border: 1px solid #fbbf24;
}

.btn-leaderboard {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 1px solid #60a5fa;
}

/* --- ИГРОВОЕ ПОЛЕ И МОДАЛКИ --- */
.game-header {
    position: absolute;
    top: 25px;
    width: 90%;
    max-width: 440px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-back, .btn-boost {
    background: #1e293b;
    border: 1px solid #475569;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

#grid-container {
    display: grid;
    grid-template-columns: repeat(8, 52px);
    grid-template-rows: repeat(8, 52px);
    gap: 6px;
    background: rgba(15, 23, 42, 0.9);
    padding: 15px;
    border-radius: 16px;
    border: 2px solid #334155;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

.tile {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    background: rgba(30, 41, 59, 0.7);
    transition: transform 0.15s, background 0.15s;
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.15);
}

.tile:hover {
    transform: scale(1.08);
    background: rgba(51, 65, 85, 0.9);
}

.tile.selected {
    border: 2px solid #38bdf8;
    box-shadow: 0 0 15px #38bdf8;
}

.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    z-index: 100;
}

.modal-content {
    background: #0f172a;
    padding: 30px;
    border-radius: 20px;
    width: 340px;
    border: 2px solid #3b82f6;
    text-align: center;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.3);
}

.modal-content ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.modal-content li {
    padding: 10px 0;
    border-bottom: 1px solid #1e293b;
    font-weight: 600;
}