/* ═══════════════════════════════════════════════════════
   MelodyForge — Component-specific styles
   (Shared styles are in common.css)
   ═══════════════════════════════════════════════════════ */

/* ── Wizard Steps ───────────────────────────────────── */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: default;
    transition: var(--transition);
    opacity: 0.4;
}

.wizard-step.active {
    opacity: 1;
}

.wizard-step.completed {
    opacity: 0.7;
}

.step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--bg-secondary);
    border: 2px solid var(--border-subtle);
    transition: var(--transition);
}

.wizard-step.active .step-number {
    background: var(--gradient-accent);
    border-color: transparent;
    color: #0F0F1A;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.wizard-step.completed .step-number {
    background: var(--green);
    border-color: transparent;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.wizard-step.active .step-label {
    color: var(--text-primary);
}

.wizard-connector {
    width: 40px;
    height: 2px;
    background: var(--border-subtle);
    flex-shrink: 0;
}

/* ── Wizard Panel ───────────────────────────────────── */
.wizard-panel {
    display: none;
    animation: panelIn 0.4s ease-out;
}

.wizard-panel.active {
    display: block;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    margin-bottom: 28px;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

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

.panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

/* ── Style Tags ─────────────────────────────────────── */
.style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.style-tag {
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.style-tag:hover {
    border-color: var(--border-active);
    color: var(--text-primary);
}

.style-tag.active {
    background: var(--gradient-accent-soft);
    border-color: var(--gold);
    color: var(--gold);
}

/* ── Artist Slots ───────────────────────────────────── */
.artists-section {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.artist-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.artist-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.artist-divider {
    display: flex;
    align-items: center;
    padding-bottom: 12px;
}

.divider-text {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
}

/* ── Upload Zone ────────────────────────────────────── */
.upload-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.upload-zone:hover {
    border-color: var(--gold);
    color: var(--text-secondary);
    background: rgba(245, 158, 11, 0.03);
}

.upload-zone.drag-over {
    border-color: var(--gold);
    background: rgba(245, 158, 11, 0.08);
}

/* ── Lyrics Display ─────────────────────────────────── */
.lyrics-display {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lyrics-section {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    transition: var(--transition);
    position: relative;
}

.lyrics-section:hover {
    border-color: var(--border-active);
}

.lyrics-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-badge.artist-1 {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.section-badge.artist-2 {
    background: rgba(236, 72, 153, 0.15);
    color: var(--pink);
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.section-badge.duet {
    background: var(--gradient-accent-soft);
    color: var(--text-primary);
    border: 1px solid var(--border-active);
}

.section-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lyrics-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.lyrics-actions {
    display: flex;
    gap: 8px;
}

/* ── Music Controls ─────────────────────────────────── */
.music-controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
}

.control-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.radio-pills {
    display: flex;
    gap: 8px;
}

.pill {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pill:hover {
    border-color: var(--border-active);
    color: var(--text-primary);
}

.pill.active {
    background: var(--gradient-accent-soft);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 600;
}

/* ── Processing Section ─────────────────────────────── */
.processing-section {
    margin-top: 24px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-align: center;
    backdrop-filter: blur(20px);
}

.progress-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.progress-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-accent);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.processing-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.pipeline-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.pipe-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.pipe-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
    transition: var(--transition);
}

.pipe-step.active .pipe-dot {
    background: var(--gold);
    opacity: 1;
    box-shadow: 0 0 8px var(--gold);
    animation: pulse 1.5s ease-in-out infinite;
}

.pipe-step.active {
    color: var(--gold);
}

.pipe-step.done .pipe-dot {
    background: var(--green);
    opacity: 1;
}

.pipe-step.done {
    color: var(--green);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* ── Audio Player ───────────────────────────────────── */
.audio-player-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    margin-bottom: 20px;
}

.audio-player-card audio {
    width: 100%;
    margin-top: 16px;
    border-radius: var(--radius-sm);
}

/* ── Result Actions ─────────────────────────────────── */
.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.result-lyrics {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-secondary);
}

/* ── Backend Model Selector ─────────────────────────── */
.backend-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: 12px;
}

.backend-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
}

.backend-option {
    cursor: pointer;
}

.backend-option input[type="checkbox"] {
    display: none;
}

.backend-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    transition: var(--transition);
    user-select: none;
}

.backend-pill:hover {
    border-color: var(--border-active);
    color: var(--text-secondary);
}

.backend-option input:checked + .backend-pill {
    background: var(--gradient-accent-soft);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.1);
}

/* ── Variant Selector ───────────────────────────────── */
.variant-selector {
    margin-bottom: 16px;
}

.variant-tabs {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
}

.variant-tab {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.variant-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.variant-tab.active {
    background: var(--gradient-accent-soft);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
}

.variant-choose-bar {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
}

.btn-choose-variant {
    padding: 10px 28px;
    background: var(--gradient-accent);
    color: #0F0F1A;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.2);
}

.btn-choose-variant:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.3);
}

/* ── Lyrics Translation ────────────────────────────── */
.lyrics-translation {
    margin-top: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.translation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.translation-header:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.translation-toggle {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.lyrics-translation.collapsed .translation-toggle {
    transform: rotate(-90deg);
}

.translation-body {
    padding: 0 20px 20px;
    transition: var(--transition);
}

.lyrics-translation.collapsed .translation-body {
    display: none;
}

.translation-text {
    font-family: var(--font);
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-muted);
    white-space: pre-wrap;
    margin: 0;
}

.translation-loading {
    color: var(--text-muted);
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

.translation-error {
    color: var(--red);
    font-size: 0.85rem;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
    .artists-section { flex-direction: column; }
    .artist-divider { transform: rotate(90deg); padding: 0; }
    .wizard-steps { flex-wrap: wrap; gap: 4px; padding: 12px; }
    .wizard-connector { width: 20px; }
    .step-label { display: none; }
    .pipeline-steps { flex-wrap: wrap; gap: 12px; }
    .result-actions { flex-direction: column; }
    .radio-pills { flex-wrap: wrap; }
    .panel-actions { flex-direction: column; }
    .panel-actions .btn-primary { width: 100%; justify-content: center; }
}
