* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.game-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-item span:first-child {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.score-item span:last-child {
    font-size: 1.5em;
    font-weight: bold;
    color: #4ecdc4;
}

.game-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.game-board {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

#gameCanvas {
    border: 2px solid #4ecdc4;
    border-radius: 10px;
    background: #000;
    display: block;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
}

.next-piece {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.next-piece h3 {
    margin-bottom: 10px;
    color: #4ecdc4;
}

#nextCanvas {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: #000;
    display: block;
    margin: 0 auto;
}

.controls {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.controls h3 {
    margin-bottom: 15px;
    color: #4ecdc4;
    text-align: center;
}

.control-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-item span:first-child {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 5px;
    font-family: monospace;
    font-weight: bold;
}

.game-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-controls button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-controls button:active {
    transform: translateY(0);
}

.game-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over.show {
    display: flex;
}

.game-over div {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.game-over h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.game-over p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.game-over button {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-over button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .side-panel {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: auto;
    }
    
    .score-board {
        gap: 15px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
}
