/* 音游练习游戏样式 */

#game-container {
    max-width: 800px;
    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: 1.5rem;
    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 1.5rem;
    min-width: 100px;
    box-shadow: var(--shadow-sm);
}

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

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

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

.mode-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);
}

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

.mode-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;
}

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

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

#feedback-display.hit { color: #22c55e; }
#feedback-display.miss { color: #ef4444; }

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

/* 响应式设计 */
@media (max-width: 768px) {
    #score-container {
        gap: 0.75rem;
    }

    .score-box {
        padding: 0.5rem 1rem;
        min-width: 80px;
    }

    #score, #accuracy, #best {
        font-size: 1.2rem;
    }

    #mode-selector {
        gap: 0.5rem;
    }

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

@media (max-width: 520px) {
    #game-container h1 {
        font-size: 1.5rem;
    }

    #feedback-display {
        font-size: 1.5rem;
    }
}
