/* 音準挑戰前端樣式 */

.singing-challenge-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #1a1f36 0%, #2d3748 100%);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.singing-challenge-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    min-height: 600px;
}

/* 左側面板 */
.singing-challenge-left {
    background: rgba(45, 55, 72, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
}

.song-selector h3 {
    margin-top: 0;
    color: #00ff88;
    font-size: 16px;
    font-weight: 600;
}

.song-item {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.song-item:hover {
    border-color: #00ff88;
    background: rgba(30, 41, 59, 1);
}

.song-item h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.song-item p {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #94a3b8;
}

.song-item button {
    width: 100%;
    padding: 6px 12px;
    background: #00ff88;
    color: #1a1f36;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.song-item button:hover {
    background: #00dd77;
    transform: translateY(-2px);
}

/* 中央面板 */
.singing-challenge-center {
    background: rgba(45, 55, 72, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.piano-roll-container {
    flex: 1;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(226, 232, 240, 0.1);
    overflow: hidden;
    position: relative;
}

#piano-roll-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* 右側面板 */
.singing-challenge-right {
    background: rgba(45, 55, 72, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 8px;
    padding: 20px;
}

.score-display h3 {
    margin-top: 0;
    color: #00ff88;
    font-size: 16px;
    font-weight: 600;
}

#score-result {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .singing-challenge-wrapper {
        grid-template-columns: 1fr;
    }

    .singing-challenge-left,
    .singing-challenge-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .singing-challenge-container {
        padding: 10px;
    }

    .singing-challenge-wrapper {
        gap: 10px;
    }
}

/* 加載狀態 */
.singing-challenge-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #00ff88;
    font-size: 16px;
}

.singing-challenge-loading p {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
