* {
    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;
}

.game-container {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.game-header h1 {
    color: #ffd700;
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.player-info input {
    padding: 8px 15px;
    font-size: 16px;
    border: 2px solid #ffd700;
    border-radius: 5px;
    background: rgba(255,255,255,0.9);
}

.game-main {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.game-area canvas {
    background: #111;
    border: 3px solid #ffd700;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.game-info {
    width: 200px;
}

.info-panel {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.info-panel h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 18px;
}

.score, .level, .lines {
    font-size: 32px;
    font-weight: bold;
    color: white;
}

#nextCanvas {
    background: #111;
    border: 2px solid #ffd700;
    border-radius: 5px;
    margin-top: 10px;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.controls button {
    flex: 1;
    padding: 8px;
    background: #ffd700;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

.controls button:hover:not(:disabled) {
    transform: scale(1.05);
}

.controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.instructions {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
}

.instructions h4 {
    color: #ffd700;
    margin-bottom: 10px;
}

.instructions p {
    color: white;
    font-size: 12px;
    margin: 5px 0;
}

.scoreboard {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 15px;
}

.scoreboard h2 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

.score-list {
    max-height: 300px;
    overflow-y: auto;
}

.score-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    margin: 5px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    color: white;
}

.rank {
    font-weight: bold;
    color: #ffd700;
    width: 40px;
}

.player {
    flex: 1;
}

.score-value {
    font-weight: bold;
    color: #4caf50;
}

.refresh-btn {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.game-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-popup {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.game-over-popup h2 {
    color: #764ba2;
    margin-bottom: 20px;
}

.game-over-popup button {
    margin: 10px;
    padding: 10px 20px;
    background: #764ba2;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.game-over-popup button:hover {
    background: #667eea;
}