/* styles.css */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background-color: #121212;
    font-family: Arial, sans-serif;
}

/* The canvas is sized to the viewport in JS; keeping it fixed at the origin
   means the document can never exceed the viewport and scroll. */
#gameCanvas {
    position: fixed;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    background-color: black;
    touch-action: none;
}

#currentTrack {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 10;
    color: white;
    font-size: 13px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

#musicControls {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    background-color: rgba(51, 51, 51, 0.8);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: rgba(85, 85, 85, 0.9);
}

.autoplay-notice {
    /* Hidden unless the browser actually refuses playback. Dismissing the
       controls overlay is a user gesture, so normally music just starts and
       this never appears. Shown by the musicAutoplayBlocked handler. */
    display: none;
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    color: white;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 5px;
    padding: 10px 14px;
}

#progressBar {
    background-color: #333;
    height: 10px;
    border-radius: 5px;
    width: 200px;
}

/* --- controls overlay ------------------------------------------------- */

.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 10, 18, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.overlay.hidden {
    display: none;
}

.overlay .panel {
    max-width: 460px;
    width: calc(100% - 48px);
    max-height: calc(100% - 48px);
    overflow-y: auto;
    padding: 28px 32px 24px;
    border-radius: 14px;
    background: rgba(18, 24, 36, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    color: #eaeef6;
    text-align: center;
}

.overlay h1 {
    margin: 0 0 4px;
    font-size: 30px;
    letter-spacing: 0.5px;
}

.overlay .tagline {
    margin: 0 0 22px;
    color: #93a4bf;
    font-size: 14px;
}

.overlay .controls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    margin: 0 0 18px;
    text-align: left;
    align-items: center;
}

.overlay .controls dt {
    justify-self: end;
    white-space: nowrap;
}

.overlay .controls dd {
    margin: 0;
    font-size: 14px;
    color: #c6d2e4;
}

.overlay kbd {
    display: inline-block;
    min-width: 20px;
    padding: 3px 7px;
    border-radius: 5px;
    background: #2b3448;
    border: 1px solid #3d4a63;
    border-bottom-width: 2px;
    font: 12px/1.2 ui-monospace, Menlo, Consolas, monospace;
    color: #fff;
}

.overlay .touch-only {
    margin: 0 0 20px;
    font-size: 13px;
    color: #93a4bf;
}

.start-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: #2f6df6;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.start-btn:hover {
    background: #4680ff;
}

.help-btn {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(51, 51, 51, 0.8);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.help-btn:hover {
    background: rgba(85, 85, 85, 0.95);
}

@media (hover: hover) {
    .overlay .touch-only { display: none; }
}
