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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    display: flex;
    gap: 20px;
    background: rgba(44, 62, 80, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

#game-area {
    position: relative;
}

#gameCanvas {
    border: 3px solid #7f8c8d;
    background: #2c3e50;
    display: block;
    border-radius: 8px;
}

#sidebar {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#score-panel, #level-panel, #lines-panel, #next-panel, #controls {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#score-panel h3, #level-panel h3, #lines-panel h3, #next-panel h3, #controls h3 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #ffd700;
}

#score, #level, #lines {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #00ff00;
}

#nextCanvas {
    display: block;
    margin: 0 auto;
    background: #2c3e50;
    border: 2px solid #5a6c7d;
    border-radius: 6px;
}

#controls p {
    font-size: 12px;
    margin: 5px 0;
    text-align: center;
}

#game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#game-over-content {
    background: rgba(30, 60, 114, 0.95);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 3px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
}

#game-over-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #ff4444;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#game-over-content p {
    font-size: 18px;
    margin: 10px 0;
    color: #fff;
}

#restart-btn {
    background: #ffd700;
    color: #000;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

#restart-btn:hover {
    background: #ffed4e;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    #game-container {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    #gameCanvas {
        width: 300px;
        height: 600px;
    }

    #sidebar {
        width: 300px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    #score-panel, #level-panel, #lines-panel {
        flex: 1;
        min-width: 80px;
    }

    #next-panel, #controls {
        flex: 1;
        min-width: 140px;
    }
}