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

body {
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    background: linear-gradient(45deg, #000000, #1a0f3c);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #00ff88;
}

.game-container {
    background: rgba(16, 16, 32, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2),
                inset 0 0 15px rgba(0, 255, 136, 0.1);
    max-width: 100%;
    overflow: auto;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

#reset-button {
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 20px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

#reset-button:hover {
    transform: scale(1.2);
    text-shadow: 0 0 20px rgba(0, 255, 136, 1);
}

.mines-count, .timer {
    font-size: 22px;
    font-weight: 600;
    color: #00ff88;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 10px rgba(9, 223, 123, 0.5);
}

#game-board {
    display: grid;
    gap: 2px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 5px;
    margin-bottom: 25px;
    padding: 3px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
    max-width: 100%;
    overflow-x: auto;
}

.cell {
    width: 35px;
    height: 35px;
    background: linear-gradient(145deg, #1a1a2e, #0d0d1a);
    border: 1px solid rgba(0, 255, 136, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    border-radius: 3px;
    color: #00ff88;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    position: relative;
    overflow: hidden;
}

.cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.1), transparent);
    opacity: 0.5;
}

.cell:hover {
    background: linear-gradient(145deg, #2a2a4e, #1a1a2e);
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    border-color: rgba(0, 255, 136, 0.5);
}

.cell.revealed {
    background: linear-gradient(145deg, #000000, #0a0a14);
    border: 1px solid rgba(0, 255, 136, 0.15);
    box-shadow: inset 0 0 8px rgba(0, 255, 136, 0.15);
}

.cell.revealed::before {
    display: none;
}

.cell.mine {
    background: linear-gradient(145deg, #ff1744, #d50000);
    border-color: #ff1744;
    color: white;
    animation: neonPulse 1.5s infinite;
    box-shadow: 0 0 20px rgba(255, 23, 68, 0.6);
}

.cell.mine::before {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent);
}

.cell.flagged {
    background: linear-gradient(145deg, #4a148c, #311b92);
    border-color: rgba(255, 0, 255, 0.5);
    color: #ff00ff;
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.7);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.4);
}

.cell.flagged::before {
    background: linear-gradient(145deg, rgba(255, 0, 255, 0.15), transparent);
}

/* Неоновые цвета для цифр с улучшенным контрастом */
.cell[data-number="1"] { 
    color: #00ffff; 
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8),
                 0 0 20px rgba(0, 255, 255, 0.4);
}
.cell[data-number="2"] { 
    color: #00ff88; 
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.8),
                 0 0 20px rgba(0, 255, 136, 0.4);
}
.cell[data-number="3"] { 
    color: #ff3377; 
    text-shadow: 0 0 10px rgba(255, 51, 119, 0.8),
                 0 0 20px rgba(255, 51, 119, 0.4);
}
.cell[data-number="4"] { 
    color: #bb86fc; 
    text-shadow: 0 0 10px rgba(187, 134, 252, 0.8),
                 0 0 20px rgba(187, 134, 252, 0.4);
}
.cell[data-number="5"] { 
    color: #ff0844; 
    text-shadow: 0 0 10px rgba(255, 8, 68, 0.8),
                 0 0 20px rgba(255, 8, 68, 0.4);
}
.cell[data-number="6"] { 
    color: #03dac6; 
    text-shadow: 0 0 10px rgba(3, 218, 198, 0.8),
                 0 0 20px rgba(3, 218, 198, 0.4);
}
.cell[data-number="7"] { 
    color: #ff00ff; 
    text-shadow: 0 0 10px rgba(255, 0, 255, 0.8),
                 0 0 20px rgba(255, 0, 255, 0.4);
}
.cell[data-number="8"] { 
    color: #ff9e80; 
    text-shadow: 0 0 10px rgba(255, 158, 128, 0.8),
                 0 0 20px rgba(255, 158, 128, 0.4);
}

/* Адаптивность для маленьких экранов */
@media (max-width: 600px) {
    .game-container {
        padding: 15px;
    }

    .cell {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .controls button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .game-header {
        padding: 10px;
    }

    .mines-count, .timer {
        font-size: 18px;
        padding: 6px 12px;
    }
}

/* Бургер-меню */
.burger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    cursor: pointer;
    padding: 10px;
    background: rgba(16, 16, 32, 0.9);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
    transition: all 0.3s ease;
}

.burger-menu:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.burger-icon {
    width: 30px;
    height: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.burger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #00ff88, #00ffcc);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Анимация бургер-меню при открытии */
.sidebar.active ~ .burger-menu {
    transform: translateX(280px);
}

.sidebar.active ~ .burger-menu .burger-icon span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.sidebar.active ~ .burger-menu .burger-icon span:nth-child(2) {
    opacity: 0;
}

.sidebar.active ~ .burger-menu .burger-icon span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Боковая панель */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(16, 16, 32, 0.95);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
    transition: left 0.3s ease;
    z-index: 999;
    border-right: 1px solid rgba(0, 255, 136, 0.3);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.sidebar-header h2 {
    color: #00ff88;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    font-size: 24px;
}

.close-sidebar {
    background: none;
    border: none;
    color: #00ff88;
    font-size: 28px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.close-sidebar:hover {
    transform: scale(1.2);
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.games-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.games-list::-webkit-scrollbar {
    width: 8px;
}

.games-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.games-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

.games-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

.games-list li {
    padding: 0;
    margin: 5px 0;
    border-left: 4px solid transparent;
    background: rgba(0, 0, 0, 0.4);
    position: relative;
}

.games-list li:hover {
    background: rgba(0, 255, 136, 0.1);
}

.games-list li.active {
    background: rgba(0, 255, 136, 0.15);
    border-left: 4px solid #00ff88;
}

.games-list li.active button {
    color: #00ffcc;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.games-list li.coming-soon button {
    color: #666;
    cursor: default;
    text-shadow: none;
}

.games-list li.coming-soon::after {
    content: '🔒';
    font-size: 14px;
    opacity: 0.7;
}

/* Затемнение фона при открытом меню */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    z-index: 998;
}

.overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.games-list li button {
    width: 100%;
    padding: 15px 20px;
    color: #00ff88;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    background: none;
    border: none;
    text-align: left;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
    outline: none;
    position: relative;
    z-index: 1;
}

.games-list li button:hover {
    color: #00ffcc;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

.games-list li button:active {
    transform: scale(0.98);
}

/* Единый стиль заголовков игр */
.game-title {
    color: #ff3366;
    font-family: 'Orbitron', sans-serif;
    font-size: 42px;
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
    text-align: center;
}


