/* ===== ОБЩИЙ СТИЛЬ ДЛЯ ИГРОВОЙ КОМНАТЫ ===== */

/* Контейнер игры */
.game-container-unified {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.game-container-unified h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

/* Игровая обёртка */
.game-wrapper {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Панель управления */
.game-controls-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.control-label {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

/* Кнопки сложности/выбора */
.game-btn {
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    background: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #495057;
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.game-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Панель статистики */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-card.primary {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
}

.stat-card.success {
    border-color: #27ae60;
    background: linear-gradient(135deg, #27ae6020 0%, #2ecc7120 100%);
}

.stat-card.warning {
    border-color: #f39c12;
    background: linear-gradient(135deg, #f39c1220 0%, #f1c40f20 100%);
}

.stat-card.danger {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #e74c3c20 0%, #c0392b20 100%);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: #7f8c8d;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.stat-card.primary .stat-value { color: #667eea; }
.stat-card.success .stat-value { color: #27ae60; }
.stat-card.warning .stat-value { color: #f39c12; }
.stat-card.danger .stat-value { color: #e74c3c; }

/* Игровое поле */
.game-board-area {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    min-height: 400px;
}

/* Статус игры */
.game-status-bar {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 10px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.action-btn.secondary {
    background: #fff;
    color: #667eea;
    border: 2px solid #667eea;
}

.action-btn.secondary:hover {
    background: #667eea;
    color: #fff;
}

.action-btn.danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.action-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

/* Мобильное управление */
.mobile-game-controls {
    display: none;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.mobile-ctrl-row {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.mobile-ctrl-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.1s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-ctrl-btn:active {
    transform: scale(0.92);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

/* Оверлей (пауза, конец игры) */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 15px;
    transition: opacity 0.3s ease;
}

.game-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: #fff;
    padding: 40px;
}

.overlay-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #ecf0f1;
}

/* Адаптивность */
@media (max-width: 768px) {
    .game-container-unified h1 {
        font-size: 1.8rem;
    }
    
    .game-wrapper {
        padding: 15px;
    }
    
    .stats-panel {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px 8px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
    
    .mobile-game-controls {
        display: flex;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

/* Тёмная тема */
body.dark-theme .game-wrapper {
    background: #16213e;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body.dark-theme .game-controls-panel {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme .control-label {
    color: #ddd;
}

body.dark-theme .game-btn {
    background: #1a1a2e;
    border-color: #2c3e50;
    color: #ddd;
}

body.dark-theme .stat-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme .stat-label {
    color: #adb5bd;
}

body.dark-theme .stat-value {
    color: #fff;
}

body.dark-theme .game-board-area {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.dark-theme .game-status-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark-theme .action-btn.secondary {
    background: #1a1a2e;
    color: #667eea;
    border-color: #667eea;
}

body.dark-theme .action-btn.secondary:hover {
    background: #667eea;
    color: #fff;
}
