:root {
    --bg-color: #0a0a0c;
    --panel-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #ffffff;
    --accent-color: #00f2ff;
    --neon-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.tetris-container {
    display: flex;
    gap: 40px;
    padding: 40px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-board-wrapper {
    position: relative;
    border: 3px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

#tetris {
    display: block;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    display: none;
    opacity: 0;
}

.overlay h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: var(--neon-shadow);
}

#restart-btn {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-family: inherit;
    background: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#restart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 200px;
}

.panel-section h2 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.next-piece-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-item {
    margin-bottom: 20px;
}

.stat-item .label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 4px;
}

.stat-item .value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    text-shadow: var(--neon-shadow);
}

.controls-hint {
    margin-top: auto;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.8;
}