:root {
    --bg: #1a1a2e;
    --panel-bg: rgba(20, 20, 40, 0.92);
    --text: #e0e0e0;
    --accent: #ff6b6b;
    --gold: #d4a574;
    --led-bg: #0a0a0f;
    --led-glow: #ff3333;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius: 16px;
}

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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

canvas {
    display: block;
}

#led-panel {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel-bg);
    padding: 10px 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
}

#led-display {
    background: var(--led-bg);
    padding: 5px 12px;
    font-size: 28px;
    font-weight: 700;
    color: #ff3020;
    text-shadow: 0 0 14px #ff3020, 0 0 28px #ff2010;
    letter-spacing: 0.04em;
    min-width: 70px;
    text-align: center;
    border: 2px solid #1a0000;
    box-shadow: inset 0 0 12px rgba(255, 30, 10, 0.25);
}

#led-unit {
    color: #ff7060;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(255, 60, 40, 0.6);
}

#current-title-display {
    font-weight: 700;
    font-size: 15px;
    color: #ffcc00;
    text-shadow: 0 0 12px rgba(255, 180, 30, 0.7);
    min-width: 50px;
    text-align: center;
}

#bgm-status {
    font-size: 10px;
    color: #8ef;
    text-align: center;
    letter-spacing: 0.03em;
    min-width: 55px;
    text-shadow: 0 0 6px rgba(100, 180, 255, 0.5);
}

#hint-text {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    letter-spacing: 0.05em;
    pointer-events: none;
    transition: opacity 0.6s;
}

@media (max-width: 768px) {
    #led-panel {
        bottom: 12px;
        padding: 7px 12px;
        gap: 6px;
        border-radius: 14px;
    }
    #led-display {
        font-size: 20px;
        min-width: 48px;
        padding: 3px 8px;
    }
    #current-title-display {
        font-size: 12px;
    }
    #led-unit {
        font-size: 12px;
    }
    #bgm-status {
        font-size: 8px;
        min-width: 40px;
    }
    #hint-text {
        font-size: 8px;
    }
}