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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 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 {
    display: flex;
    gap: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.game-info h1 {
    font-size: 2.5em;
    text-align: center;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}

.stat label {
    font-weight: bold;
    color: #ffd93d;
}

.stat span {
    font-weight: bold;
    font-size: 1.2em;
    color: #6bcf7f;
}

.next-piece {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.next-piece label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #ffd93d;
}

#next {
    border: 2px solid #ffd93d;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.controls button {
    padding: 12px 20px;
    font-size: 1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

#start-btn {
    background: linear-gradient(45deg, #6bcf7f, #4a9d5f);
    color: white;
}

#start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 207, 127, 0.4);
}

#pause-btn {
    background: linear-gradient(45deg, #ffd93d, #ffb347);
    color: #333;
}

#pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 217, 61, 0.4);
}

#reset-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff5252);
    color: white;
}

#reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

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

.instructions h3 {
    margin-bottom: 10px;
    color: #ffd93d;
    text-align: center;
}

.instructions p {
    margin: 5px 0;
    color: #e0e0e0;
}

.game-board {
    position: relative;
}

#game {
    border: 3px solid #ffd93d;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over.hidden {
    display: none;
}

.game-over-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.game-over-content p {
    font-size: 1.2em;
    margin: 10px 0;
    color: #ffd93d;
}

#restart-btn {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.1em;
    background: linear-gradient(45deg, #6bcf7f, #4a9d5f);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
}

#restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 207, 127, 0.4);
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .game-info {
        min-width: auto;
        width: 100%;
    }
    
    #game {
        width: 250px;
        height: 500px;
    }
}
