/* ============================================================
   BGM Finder Online — Mobile-First Design System (Production CSS)
   ============================================================ */

:root {
    --bg-app: #070a13;
    --bg-card: rgba(14, 18, 32, 0.85);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-hover: rgba(255, 255, 255, 0.05);

    --shazam-blue: #0088ff;
    --shazam-blue-dark: #0062cc;
    --shazam-blue-glow: rgba(0, 136, 255, 0.4);
    --shazam-cyan: #38bdf8;
    --shazam-indigo: #6366f1;

    --success-green: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --error-rose: #f43f5e;
    --error-bg: rgba(244, 63, 94, 0.12);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset & SVG Protection */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

svg {
    display: block;
    max-width: 100%;
    max-height: 100%;
    flex-shrink: 0;
}

body {
    font-family: var(--font);
    background-color: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Backdrops */
.bg-scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
}

.orb-primary {
    width: 500px;
    height: 500px;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--shazam-blue) 0%, rgba(99, 102, 241, 0.2) 60%, transparent 80%);
}

.orb-secondary {
    width: 380px;
    height: 380px;
    bottom: -100px;
    right: 5%;
    background: radial-gradient(circle, var(--shazam-cyan) 0%, transparent 70%);
}

.mesh-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.6;
}

/* App Viewport Container */
.app-viewport {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 540px;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 16px 20px 24px;
    margin: 0 auto;
}

/* Top Navigation Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 20px;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-pill);
    backdrop-filter: blur(16px);
}

.shazam-logo-icon {
    width: 18px;
    height: 18px;
    color: var(--shazam-blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shazam-logo-icon svg {
    width: 18px;
    height: 18px;
}

.brand-title {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.brand-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-green);
    box-shadow: 0 0 8px var(--success-green);
}

/* Main Content Area */
.app-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Panel Switching */
.view-panel {
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.view-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.view-hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(8px);
}

/* ============================================================
   1. Home View
   ============================================================ */
.hero-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.radar-hero-badge {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.radar-badge-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 136, 255, 0.3);
    animation: badge-ripple 2.5s infinite ease-out;
}

@keyframes badge-ripple {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.radar-badge-icon {
    position: relative;
    z-index: 2;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--shazam-blue) 0%, var(--shazam-indigo) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 24px var(--shazam-blue-glow);
}

.radar-badge-icon svg {
    width: 24px;
    height: 24px;
}

.main-heading {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #FFFFFF 30%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-heading {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.45;
    max-width: 420px;
    margin: 0 auto;
}

/* Action Card */
.action-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* URL Input Bar */
.url-bar-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.url-input-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    gap: 10px;
    transition: var(--transition);
}

.url-input-box:focus-within {
    border-color: var(--shazam-blue);
    background: rgba(0, 136, 255, 0.04);
    box-shadow: 0 0 0 3px rgba(0, 136, 255, 0.15);
}

.url-lead-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.url-lead-icon svg {
    width: 18px;
    height: 18px;
}

#url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 500;
    min-width: 0;
}

#url-input::placeholder {
    color: var(--text-muted);
}

/* Shazam Primary Action Button */
.btn-shazam-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--shazam-blue) 0%, var(--shazam-blue-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.94rem;
    font-weight: 700;
    padding: 12px 18px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 18px var(--shazam-blue-glow);
}

.btn-shazam-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 136, 255, 0.5);
}

.btn-shazam-primary:active {
    transform: translateY(0);
}

.btn-shazam-primary svg {
    width: 16px;
    height: 16px;
}

/* Card Divider */
.card-divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-divider::before,
.card-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bg-card-border);
}

.card-divider span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* Dropzone */
.file-dropzone {
    border: 1.5px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.015);
    padding: 18px 14px;
    cursor: pointer;
    transition: var(--transition);
}

.file-dropzone:hover,
.file-dropzone.drag-over {
    border-color: var(--shazam-blue);
    background: rgba(0, 136, 255, 0.04);
}

.dropzone-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.dropzone-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 136, 255, 0.1);
    color: var(--shazam-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropzone-icon svg {
    width: 18px;
    height: 18px;
}

.dropzone-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dropzone-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropzone-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.btn-browse {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bg-card-border);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-browse:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* Supported row */
.supported-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pill-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bg-card-border);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================================
   2. Radar Listening View (Shazam Live Experience)
   ============================================================ */
.radar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 10px;
    gap: 24px;
}

/* Concentric Radar Rings */
.shazam-radar-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-echo {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--shazam-cyan);
    animation: radar-burst 2.4s infinite cubic-bezier(0.1, 0.8, 0.3, 1);
}

.echo-1 { width: 90px; height: 90px; animation-delay: 0s; }
.echo-2 { width: 120px; height: 120px; animation-delay: 0.8s; }
.echo-3 { width: 150px; height: 150px; animation-delay: 1.6s; }

@keyframes radar-burst {
    0% { transform: scale(0.6); opacity: 0.9; border-color: rgba(56, 189, 248, 0.8); }
    100% { transform: scale(1.35); opacity: 0; border-color: rgba(0, 136, 255, 0); }
}

.radar-core {
    position: relative;
    z-index: 5;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--shazam-blue) 0%, var(--shazam-indigo) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 35px var(--shazam-blue-glow);
    animation: pulse-core 2s ease-in-out infinite;
}

.radar-core svg {
    width: 36px;
    height: 36px;
}

@keyframes pulse-core {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px var(--shazam-blue-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 50px rgba(0, 136, 255, 0.6); }
}

.radar-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 440px;
}

.live-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(0, 136, 255, 0.12);
    border: 1px solid rgba(0, 136, 255, 0.3);
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--shazam-cyan);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--shazam-cyan);
    box-shadow: 0 0 6px var(--shazam-cyan);
    animation: blink-dot 1.2s infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-headline {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

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

/* Audio Spectrum */
.audio-spectrum {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 28px;
}

.eq-bar {
    width: 3.5px;
    background: linear-gradient(to top, var(--shazam-blue), var(--shazam-cyan));
    border-radius: 2px;
    animation: eq-dance 1.1s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 18px; animation-delay: 0.25s; }
.eq-bar:nth-child(3) { height: 12px; animation-delay: 0.15s; }
.eq-bar:nth-child(4) { height: 24px; animation-delay: 0.4s; }
.eq-bar:nth-child(5) { height: 16px; animation-delay: 0.2s; }
.eq-bar:nth-child(6) { height: 22px; animation-delay: 0.5s; }
.eq-bar:nth-child(7) { height: 10px; animation-delay: 0.3s; }
.eq-bar:nth-child(8) { height: 15px; animation-delay: 0.45s; }
.eq-bar:nth-child(9) { height: 7px; animation-delay: 0.15s; }

@keyframes eq-dance {
    0% { transform: scaleY(0.3); opacity: 0.4; }
    100% { transform: scaleY(1.2); opacity: 1; }
}

.btn-cancel {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    transition: var(--transition);
}

.btn-cancel:hover {
    color: var(--text-primary);
}

/* ============================================================
   3. Result View (Track Detail Experience)
   ============================================================ */
.result-card-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.track-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: card-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes card-appear {
    0% { opacity: 0; transform: scale(0.96) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.track-tag-bar {
    display: flex;
    align-items: center;
}

.badge-matched {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-pill);
    color: var(--success-green);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.badge-matched svg {
    width: 14px;
    height: 14px;
}

/* Artwork & Track Metadata */
.track-header-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.track-art-box {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.track-art-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.track-art-ambient {
    position: absolute;
    inset: -6px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    opacity: 0.5;
    z-index: 1;
}

.track-meta-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-song-title {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.22;
    color: var(--text-primary);
}

.track-artist-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--shazam-cyan);
}

.track-album-name {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.track-genre-pill {
    margin-top: 4px;
    display: inline-block;
    align-self: flex-start;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Listen On Section */
.listen-on-section {
    border-top: 1px solid var(--bg-card-border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.listen-on-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.streaming-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.streaming-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bg-card-border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    font-family: var(--font);
    transition: var(--transition);
}

.streaming-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.streaming-pill svg {
    width: 15px;
    height: 15px;
}

.pill-shazam {
    background: rgba(0, 136, 255, 0.12);
    border-color: rgba(0, 136, 255, 0.3);
    color: #60a5fa;
}

.pill-shazam:hover {
    background: var(--shazam-blue);
    color: white;
    box-shadow: 0 4px 16px var(--shazam-blue-glow);
}

.pill-spotify {
    background: rgba(30, 215, 96, 0.1);
    border-color: rgba(30, 215, 96, 0.25);
    color: #4ade80;
}

.pill-spotify:hover {
    background: #1ed760;
    color: #000;
}

.pill-apple {
    background: rgba(250, 45, 72, 0.1);
    border-color: rgba(250, 45, 72, 0.25);
    color: #fb7185;
}

.pill-apple:hover {
    background: #fa2d48;
    color: white;
}

.pill-youtube {
    background: rgba(255, 0, 0, 0.08);
    border-color: rgba(255, 0, 0, 0.2);
    color: #f87171;
}

.pill-youtube:hover {
    background: #ef4444;
    color: white;
}

.pill-amazon {
    background: rgba(255, 153, 0, 0.1);
    border-color: rgba(255, 153, 0, 0.25);
    color: #ffb84d;
}

.pill-amazon:hover {
    background: #ff9900;
    color: #000;
}

/* Header Support / Buy Me a Coffee Button */
.btn-support-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 221, 0, 0.12);
    border: 1px solid rgba(255, 221, 0, 0.35);
    color: #ffd700;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-support-pill:hover {
    background: #ffd700;
    color: #000;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.35);
    transform: translateY(-1px);
}

/* Result Share & Copy Quick Actions */
.result-quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
}

.btn-quick-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bg-card-border);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.btn-quick-action:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-quick-action svg {
    width: 15px;
    height: 15px;
}

/* Also Detected Section (Multi-segment) */
.also-detected-box {
    border-top: 1px solid var(--bg-card-border);
    padding-top: 18px;
    text-align: left;
}

.also-detected-heading {
    margin-bottom: 10px;
}

.also-detected-heading span {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--shazam-cyan);
}

.also-detected-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.also-detected-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.also-detected-row:hover {
    background: rgba(0, 136, 255, 0.06);
    border-color: rgba(0, 136, 255, 0.2);
    transform: translateX(2px);
}

.also-detected-art {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-xs);
    object-fit: cover;
    flex-shrink: 0;
}

.also-detected-placeholder {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-xs);
    background: rgba(0, 136, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.also-detected-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.also-detected-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.also-detected-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.also-detected-badge {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--shazam-cyan);
    background: rgba(56, 189, 248, 0.12);
    border-radius: 4px;
    padding: 1px 5px;
    flex-shrink: 0;
}

.also-detected-artist-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.also-detected-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.also-detected-link:hover {
    background: var(--shazam-blue);
    color: white;
    transform: scale(1.06);
}

.also-detected-link svg {
    width: 14px;
    height: 14px;
}

/* Error Card */
.error-card {
    border-color: rgba(244, 63, 94, 0.25);
    text-align: center;
    align-items: center;
    padding: 36px 20px;
}

.error-circle-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--error-bg);
    color: var(--error-rose);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.error-circle-icon svg {
    width: 28px;
    height: 28px;
}

.error-heading {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.error-message-text {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 360px;
}

/* Bottom Action Bar */
.bottom-action-bar {
    margin-top: 8px;
}

.btn-shazam-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, var(--shazam-blue) 0%, var(--shazam-blue-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-family: var(--font);
    font-size: 0.96rem;
    font-weight: 700;
    padding: 14px 24px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 18px var(--shazam-blue-glow);
}

.btn-shazam-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 136, 255, 0.5);
}

.btn-shazam-large svg {
    width: 18px;
    height: 18px;
}

/* Footer */
.app-footer {
    padding: 20px 0 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.74rem;
}

/* Responsive adjustments */
@media (max-width: 440px) {
    .app-viewport {
        padding: 12px 14px 20px;
    }

    .main-heading {
        font-size: 1.6rem;
    }

    .action-card {
        padding: 14px;
    }

    .track-header-hero {
        flex-direction: column;
        text-align: center;
    }

    .track-art-box {
        width: 110px;
        height: 110px;
    }

    .track-meta-box {
        align-items: center;
    }

    .track-song-title {
        font-size: 1.3rem;
    }

    .streaming-pill-grid {
        justify-content: center;
    }
}

/* ============================================================
   New Components — Phase 0
   ============================================================ */

/* Limits Info Text */
.limits-info {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 2px;
    letter-spacing: 0.01em;
}

/* ============================================================
   How It Works (SEO Content Section)
   ============================================================ */
.how-it-works {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--bg-card-border);
}

.hiw-heading {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hiw-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.hiw-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 10px;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    transition: var(--transition);
}

.hiw-step:hover {
    border-color: rgba(0, 136, 255, 0.25);
    transform: translateY(-2px);
}

.hiw-step-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--shazam-blue), var(--shazam-indigo));
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shazam-blue-glow);
}

.hiw-step-icon {
    width: 32px;
    height: 32px;
    color: var(--shazam-cyan);
    margin-bottom: 8px;
    margin-top: 6px;
}

.hiw-step-icon svg {
    width: 32px;
    height: 32px;
}

.hiw-step-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.hiw-step-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ============================================================
   Recheck Button
   ============================================================ */
.btn-recheck {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bg-card-border);
    color: var(--shazam-cyan);
    border-radius: var(--radius-pill);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

.btn-recheck:hover:not(:disabled) {
    background: rgba(0, 136, 255, 0.1);
    border-color: rgba(0, 136, 255, 0.3);
    transform: translateY(-1px);
}

.btn-recheck:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-recheck svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.recheck-count-badge {
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.15);
    color: var(--shazam-cyan);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    flex-shrink: 0;
}

/* ============================================================
   Feedback Section
   ============================================================ */
.feedback-section {
    border-top: 1px solid var(--bg-card-border);
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feedback-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.feedback-buttons {
    display: flex;
    gap: 8px;
}

.btn-feedback {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--bg-card-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-feedback:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-feedback:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-feedback svg {
    width: 14px;
    height: 14px;
}

.btn-feedback-yes:hover:not(:disabled) {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-green);
}

.btn-feedback-no:hover:not(:disabled) {
    background: var(--error-bg);
    border-color: rgba(244, 63, 94, 0.3);
    color: var(--error-rose);
}

/* Feedback Toast */
.feedback-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--success-green);
    color: white;
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    z-index: 1000;
    animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
    0% { opacity: 0; transform: translateX(-50%) translateY(12px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   Status Banners (Demucs Paused / Shazam Down)
   ============================================================ */
.status-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.45;
    animation: card-appear 0.3s ease;
}

.status-banner svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.status-banner p {
    margin: 0;
    color: inherit;
}

.banner-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.25);
    color: #fbbf24;
}

.banner-error {
    background: var(--error-bg);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: var(--error-rose);
}

/* ============================================================
   Ad Slot Placeholder (Phase 1 — empty until AdSense)
   ============================================================ */
.ad-slot-placeholder {
    min-height: 0;
    /* Reserve space when ad is loaded later:
       min-height: 90px;
       background: rgba(255,255,255,0.02);
       border-radius: var(--radius-sm);
    */
}

/* ============================================================
   Footer Links
   ============================================================ */
.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--shazam-cyan);
}

.footer-dot {
    color: var(--text-muted);
    font-size: 0.6rem;
}

/* ============================================================
   Responsive — New Components
   ============================================================ */
@media (max-width: 440px) {
    .hiw-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hiw-step {
        flex-direction: row;
        text-align: left;
        padding: 12px 14px;
        gap: 12px;
    }

    .hiw-step-number {
        position: static;
        transform: none;
        flex-shrink: 0;
    }

    .hiw-step-icon {
        display: none;
    }

    .feedback-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* ============================================================
   Ad Container Styles — Blend with dark glassmorphism design
   ============================================================ */

.ad-container {
    width: 100%;
    margin: 16px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 0;
    /* Only show border/bg when ad is loaded */
}

.ad-container:has(ins[data-ad-status="filled"]) {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    padding: 12px;
    backdrop-filter: blur(16px);
}

/* Empty ad containers take no space */
.ad-container:empty,
.ad-container:not(:has(ins)) {
    margin: 0;
    padding: 0;
}

/* AdSense responsive sizing */
.ad-container ins.adsbygoogle {
    display: block;
    width: 100%;
}

/* Subtle "Ad" label when filled */
.ad-container:has(ins[data-ad-status="filled"])::before {
    content: 'Sponsored';
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    opacity: 0.6;
}


/* ============================================================
   Backend Offline Banner (for frontend/backend split)
   ============================================================ */

.backend-offline-banner {
    display: none;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 12px 0;
    color: var(--error-rose);
    font-size: 13px;
    text-align: center;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.backend-offline-banner.visible {
    display: flex;
}

.backend-offline-banner svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


/* ============================================================
   Streaming Link Affiliate Tracking Styles
   ============================================================ */

.streaming-pill-grid a[data-affiliate="true"]::after {
    /* Subtle indicator for affiliate links — invisible to users */
    content: '';
}

/* Track hover on streaming links for analytics */
.streaming-pill-grid a {
    position: relative;
    overflow: hidden;
}

.streaming-pill-grid a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.streaming-pill-grid a:hover::after {
    opacity: 1;
}
