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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    margin-bottom: 20px;
}

.score-section {
    display: flex;
    justify-content: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #333;
}

.score-item {
    text-align: center;
}

.score-item .label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.score-item .value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.game-main {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-start;
}

.side-panel {
    width: 140px;
}

.panel-section {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.panel-section h3 {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
    text-align: center;
}

.game-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

#holdCanvas, #nextCanvas {
    border: 2px solid #555;
    border-radius: 4px;
    background: #000;
    display: block;
    margin: 0 auto;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.screen {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    display: none;
    pointer-events: all;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.screen.active {
    display: block;
}

.screen h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

.game-button {
    background: linear-gradient(135deg, #00ffff 0%, #0080ff 100%);
    border: none;
    color: #000;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    margin: 10px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

.game-button:active {
    transform: translateY(0);
}

.controls {
    margin-top: 20px;
    font-size: 12px;
    color: #aaa;
    line-height: 1.4;
}

.controls p {
    margin: 5px 0;
}

@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }

    .game-main {
        flex-direction: column;
        align-items: center;
    }

    .side-panel {
        width: 100%;
        max-width: 300px;
    }

    .score-section {
        gap: 20px;
        flex-wrap: wrap;
    }

    #gameCanvas {
        width: 280px;
        height: 560px;
    }

    .screen {
        padding: 20px;
        margin: 10px;
    }

    .screen h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .score-section {
        gap: 15px;
    }

    .score-item .value {
        font-size: 18px;
    }

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

    .side-panel {
        display: flex;
        gap: 10px;
    }

    .panel-section {
        flex: 1;
    }

    #holdCanvas, #nextCanvas {
        width: 100px;
        height: 100px;
    }

    #nextCanvas {
        height: 300px;
    }
}

.tetrimino-i { color: #00ffff; }
.tetrimino-o { color: #ffff00; }
.tetrimino-t { color: #800080; }
.tetrimino-s { color: #00ff00; }
.tetrimino-z { color: #ff0000; }
.tetrimino-j { color: #0000ff; }
.tetrimino-l { color: #ffa500; }