/* 节奏大师游戏样式 */

#game-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

#game-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

#score-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.score-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    min-width: 80px;
    box-shadow: var(--shadow-sm);
}

.score-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

#score, #combo, #best {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

#difficulty-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.diff-btn {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.diff-btn:hover {
    border-color: var(--primary);
}

.diff-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: #fff;
}

#game-header {
    margin-bottom: 1.5rem;
}

#game-header .instructions {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

#start-btn {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--glow-blue);
}

#start-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#canvas-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

#game-canvas {
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
}

#game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 2rem 3rem;
    border-radius: var(--radius);
    font-size: 1.5rem;
    font-weight: 600;
    display: none;
    text-align: center;
    white-space: pre-line;
    z-index: 10;
}

#game-message.show {
    display: block;
}

#judge-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 0 20px currentColor;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

#judge-display.show {
    opacity: 1;
}

#judge-display.perfect { color: #22c55e; }
#judge-display.good { color: #f59e0b; }
#judge-display.miss { color: #ef4444; }

.game-footer {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 响应式设计 */
@media (max-width: 520px) {
    #game-container h1 {
        font-size: 1.5rem;
    }

    #score-container {
        gap: 0.5rem;
    }

    .score-box {
        padding: 0.5rem 0.75rem;
        min-width: 60px;
    }

    #score, #combo, #best {
        font-size: 1.1rem;
    }

    #difficulty-selector {
        gap: 0.5rem;
    }

    .diff-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
}
