@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

* { 
    margin: 0; padding: 0; box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    font-family: 'Space Mono', monospace;
    background: #0d1117;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    color: white;
    overflow: hidden;
}

.topbar { 
    height: 50px; display: flex; align-items: center; 
    justify-content: space-between; padding: 0 15px; 
}

.title { font-size: 18px; color: #00e5ff; font-weight: bold; text-shadow: 0 0 10px #00e5ff; }
.music-btn { font-size: 20px; cursor: pointer; width: 40px; text-align: center; }
.back-btn { color: #555; font-size: 10px; text-decoration: none; border: 1px solid #222; padding: 4px 10px; border-radius: 20px; }

.main-game-area { 
    flex: 1; display: flex; justify-content: center; 
    align-items: center; padding: 10px; overflow: hidden;
}

.game-layout { display: flex; gap: 10px; height: 100%; max-height: 520px; }

.board-wrap {
    position: relative;
    border: 3px solid #00e5ff;
    background: #000;
    border-radius: 8px;
    height: 100%;
    aspect-ratio: 10 / 20;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

#board { width: 100%; height: 100%; display: block; }

.side-info { display: flex; flex-direction: column; gap: 10px; width: 75px; }

.info-box { 
    background: #161b22; border: 1px solid #30363d; 
    padding: 8px 4px; border-radius: 8px; text-align: center; 
}

.next-container { min-height: 200px; flex: 1; position: relative; }
.info-label { font-size: 9px; color: #8b949e; display: block; margin-bottom: 5px; }
.info-val { font-size: 14px; font-weight: bold; color: #00e5ff; }

#next { width: 100%; height: 180px; background: transparent; }

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

.controls-area { height: 160px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 12px; }
.ctrl-row { display: flex; justify-content: center; gap: 15px; }

.btn {
    width: 65px; height: 55px; background: #21262d; border: 1px solid #30363d;
    border-radius: 15px; color: white; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.05s;
}

.btn:active { background: #00e5ff; color: #000; transform: scale(0.9); }
.btn-pause { background: #d29922; border: none; }

.start-btn { 
    background: #00e5ff; color:#000; padding: 12px 25px; border:none; 
    border-radius:8px; font-weight:bold; margin-top:15px; font-family: inherit;
    cursor: pointer;
}