* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1a1a2e;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.top-nav {
    width: 100%;
    padding: 12px 24px;
    background: #16213e;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.nav-home {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
}
.nav-home:hover { text-decoration: underline; }
.nav-sep { color: #555; }
.nav-current { color: #aaa; }

.game-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-top: 24px;
}

.board-wrapper {
    position: relative;
}

canvas#board {
    border: 3px solid #16213e;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
    background: #0f0f1a;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 160px;
}

.panel-box {
    background: #16213e;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.panel-box h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00d4ff;
    margin-bottom: 10px;
}

.panel-box .value {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
}

canvas#next-piece {
    display: block;
    margin: 0 auto;
    background: #0f0f1a;
    border-radius: 4px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.controls button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#start-btn {
    background: #00d4ff;
    color: #1a1a2e;
}
#start-btn:hover {
    background: #00b8d9;
    transform: translateY(-1px);
}

#pause-btn {
    background: #e94560;
    color: #fff;
}
#pause-btn:hover {
    background: #c73e54;
    transform: translateY(-1px);
}

.key-guide {
    font-size: 11px;
    color: #888;
    line-height: 1.8;
}
.key-guide kbd {
    background: #2a2a4a;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 11px;
    border: 1px solid #444;
}

.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 4px;
    z-index: 10;
}
.overlay h2 { font-size: 32px; color: #e94560; margin-bottom: 8px; }
.overlay p { font-size: 16px; color: #ccc; }
.hidden { display: none !important; }

.ad-box {
    margin-top: 8px;
    min-height: 100px;
    background: #16213e;
    border-radius: 8px;
    overflow: hidden;
}
