/* Game Section Styles */
.game-section {
    padding: 120px 15px 50px;
    background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-container {
    background-color: rgba(33, 33, 33, 0.9);
    border-radius: 15px;
    border: 3px solid var(--border-color);
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Game Info Panel */
.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.info-item {
    text-align: center;
    flex: 1;
}

.info-item h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.score-value,
.high-score-value,
.level-value {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(255, 87, 34, 0.5);
}

/* Game Board */
.game-board-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background-color: #000000;
    border-radius: 10px;
    border: 3px solid var(--border-color);
    padding: 10px;
    position: relative;
}

.game-canvas {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 4/3;
    border-radius: 5px;
    background-color: #000000;
    display: block;
    margin: 0 auto;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-controls .btn {
    min-width: 120px;
}

.game-controls .btn:disabled {
    background-color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-controls .btn:disabled:hover {
    background-color: #666666;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 10px;
    margin: 20px auto;
    max-width: 300px;
    aspect-ratio: 1/1;
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.control-btn {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover,
.control-btn:active {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

/* Game Settings */
.game-settings {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.game-settings h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.settings-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group label {
    font-weight: bold;
    color: var(--text-color);
}

.settings-group select {
    padding: 5px 10px;
    background-color: var(--dark-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
}

.settings-group select:hover {
    border-color: var(--primary-color);
}

.settings-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--dark-color);
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.3s ease;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Instructions Modal */
.instructions-content {
    margin-bottom: 20px;
}

.instruction-group {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.instruction-group:last-child {
    margin-bottom: 0;
}

.instruction-group h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.instruction-group ul {
    list-style: none;
    padding-left: 0;
}

.instruction-group ul li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.instruction-group ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2em;
}

.instruction-group ul li strong {
    color: var(--accent-color);
}

/* Game Over Modal */
.game-over-stats {
    margin-bottom: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stat-row:last-child {
    margin-bottom: 0;
}

.stat-row span:first-child {
    color: var(--secondary-color);
}

.stat-row span:last-child {
    font-weight: bold;
    color: var(--accent-color);
    font-family: var(--font-primary);
}

/* Game Board Overlays */
.game-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 30px;
    border-radius: 10px;
    border: 3px solid var(--accent-color);
    display: none;
}

.game-overlay.active {
    display: block;
}

.overlay-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.overlay-message {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

/* Power-ups */
.power-up-indicator {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive Game Styles */
@media (max-width: 992px) {
    .game-canvas {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .game-container {
        padding: 20px;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-item {
        margin-bottom: 10px;
    }
    
    .info-item:last-child {
        margin-bottom: 0;
    }
    
    .info-item h3 {
        font-size: 0.8rem;
    }
    
    .score-value,
    .high-score-value,
    .level-value {
        font-size: 1.2rem;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-controls .btn {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 8px 16px;
        width: 100%;
        max-width: 200px;
    }
    
    .game-canvas {
        max-width: 100%;
    }
    
    .mobile-controls {
        display: grid;
    }
    
    .control-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .settings-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .settings-group select {
        width: 100%;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .game-section {
        padding: 80px 10px 30px;
    }
    
    .game-container {
        padding: 15px;
    }
    
    .game-info {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .control-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .game-settings h3 {
        font-size: 1rem;
    }
    
    .stat-row {
        font-size: 1rem;
    }
}

/* Theme Variations */
.theme-modern .game-canvas {
    background-color: #1a1a2e;
}

.theme-dark .game-canvas {
    background-color: #121212;
}

.theme-colorful .game-canvas {
    background-color: #2a2a2a;
    background-image: linear-gradient(45deg, rgba(76, 175, 80, 0.1) 25%, transparent 25%),
                      linear-gradient(-45deg, rgba(76, 175, 80, 0.1) 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, rgba(76, 175, 80, 0.1) 75%),
                      linear-gradient(-45deg, transparent 75%, rgba(76, 175, 80, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Difficulty Visual Indicators */
.difficulty-indicator {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.difficulty-indicator.easy {
    background-color: #4CAF50;
    color: white;
}

.difficulty-indicator.medium {
    background-color: #FF9800;
    color: white;
}

.difficulty-indicator.hard {
    background-color: #FF5722;
    color: white;
}

.difficulty-indicator.expert {
    background-color: #F44336;
    color: white;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}