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

body {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    font-family: 'Arial', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 150, 255, 0.3);
    border: 2px solid rgba(0, 150, 255, 0.5);
}

header h1 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    letter-spacing: 3px;
}

.game-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.main-game {
    position: relative;
}

#gameCanvas {
    border: 3px solid #00ff88;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.game-over-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.game-over-content {
    text-align: center;
    background: rgba(255, 0, 0, 0.1);
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #ff0044;
}

.game-over-content h2 {
    color: #ff0044;
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 0, 68, 0.5);
}

.game-over-content button {
    background: #00ff88;
    color: #000;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.game-over-content button:hover {
    background: #00cc6a;
    transform: scale(1.05);
}

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

.score-section,
.level-section,
.lines-section,
.next-piece-section,
.controls-section {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 150, 255, 0.3);
}

.score-section h3,
.level-section h3,
.lines-section h3,
.next-piece-section h3,
.controls-section h3 {
    color: #00aaff;
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.1em;
}

.score-value,
.level-value,
.lines-value {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    color: #00ff88;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

#nextPieceCanvas {
    display: block;
    margin: 0 auto;
    border: 2px solid #444;
    border-radius: 5px;
    background: #000;
}

.controls-info {
    font-size: 0.9em;
    line-height: 1.4;
}

.controls-info p {
    margin: 5px 0;
    text-align: center;
    color: #ccc;
}

/* Responsive design */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: 300px;
    }
    
    .score-section,
    .level-section,
    .lines-section {
        flex: 1;
        min-width: 80px;
    }
    
    .next-piece-section,
    .controls-section {
        flex: 1;
        min-width: 140px;
    }
    
    header h1 {
        font-size: 2em;
    }
}

/* Animazioni */
@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    }
}

#gameCanvas {
    animation: glow 2s ease-in-out infinite;
}