:root {
    --tetris-bg: #050505;
    --grid-bg: #0a0a0a;
    --border-color: #1a1a1a;
    --primary-neon: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.4);
    
    /* Peças */
    --color-I: #00f0f0;
    --color-J: #0000f0;
    --color-L: #f0a000;
    --color-O: #f0f000;
    --color-S: #00f000;
    --color-T: #a000f0;
    --color-Z: #f00000;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--tetris-bg);
    font-family: 'Outfit', sans-serif;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
}

.header-controls {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.back-btn:hover {
    color: #fff;
    transform: translateX(-5px);
}

.main-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
}

.game-area {
    position: relative;
    background: var(--grid-bg);
    border: 4px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(0,0,0,0.8), 0 0 20px rgba(168, 85, 247, 0.1);
    overflow: hidden;
}

#tetrisCanvas {
    display: block;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 250px;
}

.info-box {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #71717a;
    margin-bottom: 0.5rem;
}

.info-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.2);
}

.next-piece-box {
    width: 120px;
    height: 120px;
    margin: 1rem auto 0;
    background: rgba(0,0,0,0.3);
    border-radius: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.controls-hint {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.5rem;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #a1a1aa;
}

.controls-hint p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

.key {
    background: #27272a;
    padding: 0.1rem 0.5rem;
    border-radius: 0.3rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom: 2px solid #000;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: all 0.5s;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--primary-neon) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.primary-btn {
    background: var(--primary-neon);
    color: #000;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    box-shadow: 0 0 20px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 40px var(--primary-glow);
}

@media (max-width: 800px) {
    .main-layout {
        flex-direction: column;
        align-items: center;
    }
    .sidebar {
        width: 100%;
        max-width: 400px;
    }
}
