* {
    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 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}
.container {
    max-width: 786px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
header {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}
h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #4cc9f0, #f72585);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(76, 201, 240, 0.3);
}
.subtitle {
    font-size: 1.2rem;
    color: #a9b7d6;
    margin-bottom: 30px;
}
.control-panel {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 30px;
    background: rgba(13, 27, 42, 0.7);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #4cc9f0;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.2);
}
.game-stats {
    display: flex;
    gap: 30px;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-label {
    font-size: 1rem;
    color: #a9b7d6;
    margin-bottom: 5px;
}
.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #4cc9f0;
}
.game-controls {
    display: flex;
    gap: 15px;
}
button {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #4895ef 0%, #4361ee 100%);
}
button:active {
    transform: translateY(0);
}
.game-content {
    display: flex;
    gap: 30px;
    width: 100%;
    margin-bottom: 30px;
}
.game-area {
    flex: 1;
    display: flex;
    justify-content: center;
}
#gameCanvas {
    border: 3px solid #4cc9f0;
    border-radius: 8px;
    box-shadow: 0 0 25px rgba(76, 201, 240, 0.4);
    background: #0d1b2a;
}
.side-panel {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.panel {
    background: rgba(13, 27, 42, 0.7);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #4cc9f0;
    box-shadow: 0 0 10px rgba(76, 201, 240, 0.2);
}
.panel h2 {
    color: #4cc9f0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-align: center;
}
#nextPieceCanvas {
    background: #0d1b2a;
    border-radius: 4px;
    margin: 0 auto;
    display: block;
}
.instructions {
    text-align: left;
}
.instructions ul {
    list-style-type: none;
    padding-left: 10px;
}
.instructions li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}
.instructions li:before {
    content: "▶";
    color: #f72585;
    position: absolute;
    left: 0;
}
#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 8px;
}
.screen-content {
    text-align: center;
    max-width: 600px;
    padding: 30px;
}
.screen-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #4cc9f0, #f72585);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.game-over {
    color: #f72585;
    font-size: 1.5rem;
    margin: 15px 0;
}
footer {
    margin-top: 30px;
    text-align: center;
    color: #a9b7d6;
    font-size: 0.9rem;
    width: 100%;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 768px) {
    .control-panel {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .game-content {
        flex-direction: column;
    }
    .side-panel {
        flex: 1;
        width: 100%;
    }
    #gameCanvas {
        width: 100%;
        max-width: 450px;
        height: auto;
    }
}
