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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.game-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 120px;
}

.side-panel h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #00d4ff;
}

.hold-box,
.next-box,
.score-box,
.level-box,
.lines-box,
.controls {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.hold-box canvas,
.next-box canvas {
    display: block;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.score-box p,
.level-box p,
.lines-box p {
    font-size: 24px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.controls p {
    font-size: 12px;
    margin: 5px 0;
    color: #aaa;
}

.main-game {
    position: relative;
}

#gameCanvas {
    display: block;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #00d4ff;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
}

.overlay-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.overlay-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #aaa;
}

#startBtn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#startBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.5);
}

#startBtn:active {
    transform: scale(0.98);
}

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

    .side-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: auto;
    }

    .side-panel.left {
        order: 2;
    }

    .main-game {
        order: 1;
    }

    .side-panel.right {
        order: 3;
    }

    #gameCanvas {
        width: 250px;
        height: 500px;
    }
}
