* {
    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;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 1000px;
    width: 100%;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 2.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
}

.game-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.info-box h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #FFD700;
}

.info-box p {
    font-size: 2rem;
    font-weight: bold;
}

#tetris {
    border: 3px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: #000;
    border-radius: 5px;
}

.next-piece-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.next-piece-container h3 {
    margin-bottom: 15px;
    color: #FFD700;
}

#next-piece {
    background: #000;
    border: 2px solid #fff;
    border-radius: 5px;
}

.controls {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.controls h3 {
    margin-bottom: 20px;
    color: #FFD700;
    font-size: 1.5rem;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    text-align: left;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.key {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    min-width: 70px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.game-over, .pause-overlay {
    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-content, .pause-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid #FFD700;
}

.game-over-content h2, .pause-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-over-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.game-over-content button {
    background: #FFD700;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-over-content button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

.hidden {
    display: none !important;
}

.sound-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sound-toggle.muted {
    opacity: 0.5;
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .game-container {
        flex-direction: column;
        align-items: center;
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
}
