/* static/css/shared/music_theme.css */

/* ═══════════════════════════════════════════════════════════
   PitchFit Music Theme — shared across all pages
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--pf-font);
    background: var(--pf-bg);
    color: var(--pf-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Music loader (pulsing notes) ── */
.music-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: var(--pf-space-xl);
}

.note-pulse {
    font-size: 2rem;
    animation: noteBounce 1.2s ease-in-out infinite;
    color: var(--pf-primary-light);
}
.note-pulse.delay-1 { animation-delay: 0.2s; }
.note-pulse.delay-2 { animation-delay: 0.4s; }

@keyframes noteBounce {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50%      { transform: translateY(-12px) scale(1.15); opacity: 1; }
}

.loader-text {
    text-align: center;
    color: var(--pf-text-muted);
    font-size: 0.9rem;
    margin-top: var(--pf-space-sm);
}

/* ── Sound wave animation ── */
.sound-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin: var(--pf-space-md) 0;
    opacity: 0;
    transition: opacity 0.2s;
}
.sound-wave.active { opacity: 1; }

.wave-bar {
    width: 4px;
    height: 8px;
    background: var(--pf-accent);
    border-radius: var(--pf-radius-full);
    transition: height 0.1s;
}
.sound-wave.active .wave-bar {
    animation: waveBar 0.6s ease-in-out infinite alternate;
}
.sound-wave.active .wave-bar:nth-child(1) { animation-delay: 0s; }
.sound-wave.active .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.sound-wave.active .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.sound-wave.active .wave-bar:nth-child(4) { animation-delay: 0.15s; }
.sound-wave.active .wave-bar:nth-child(5) { animation-delay: 0.25s; }
.sound-wave.active .wave-bar:nth-child(6) { animation-delay: 0.05s; }
.sound-wave.active .wave-bar:nth-child(7) { animation-delay: 0.2s; }

@keyframes waveBar {
    0%   { height: 8px; }
    100% { height: 36px; }
}

/* ── Primary button ── */
.btn-primary-music {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--pf-primary), var(--pf-primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--pf-radius-full);
    font-family: var(--pf-font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pf-duration) var(--pf-ease);
    box-shadow: var(--pf-shadow-md);
    width: 100%;
    max-width: 320px;
    margin-top: var(--pf-space-lg);
}
.btn-primary-music:hover {
    transform: translateY(-2px);
    box-shadow: var(--pf-shadow-glow);
}
.btn-primary-music:active {
    transform: translateY(0);
}
.btn-primary-music.btn-lg {
    padding: 18px 40px;
    font-size: 1.1rem;
}

/* ── Skip/secondary button ── */
.btn-skip {
    display: block;
    margin: var(--pf-space-md) auto 0;
    background: none;
    border: none;
    color: var(--pf-text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 16px;
    transition: color var(--pf-duration);
}
.btn-skip:hover { color: var(--pf-text-muted); }

/* ── Info highlight box ── */
.info-highlight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    padding: var(--pf-space-md);
    margin: var(--pf-space-lg) 0;
    font-size: 0.9rem;
    color: var(--pf-text-muted);
    line-height: 1.5;
}
.highlight-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Input styling ── */
.input-group-music {
    width: 100%;
    max-width: 360px;
    margin: var(--pf-space-lg) auto 0;
}

.input-music {
    width: 100%;
    padding: 14px 18px;
    background: var(--pf-bg-input);
    border: 2px solid var(--pf-border);
    border-radius: var(--pf-radius-md);
    color: var(--pf-text);
    font-family: var(--pf-font);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--pf-duration);
}
.input-music:focus {
    border-color: var(--pf-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}
.input-music.input-error {
    border-color: var(--pf-error);
    animation: shake 0.4s ease;
}
.input-music::placeholder {
    color: var(--pf-text-dim);
}

.select-music {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%239B8FC4'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

/* ── Step error toast ── */
.step-error {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pf-error);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--pf-radius-full);
    font-size: 0.9rem;
    z-index: 100;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateX(-50%) translateY(20px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}