/* SDM Suno Web Studio - Responsive Fluent Design System */
:root {
    --bg-main: #070911;
    --bg-elevated: rgba(15, 20, 34, 0.86);
    --bg-card-solid: #101626;
    --bg-inner: rgba(10, 14, 24, 0.78);
    --bg-pill: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --accent: #7C3AED;
    --accent-hover: #6D28D9;
    --accent-soft: rgba(124, 58, 237, 0.16);
    --accent-fg: #C4B5FD;
    --accent-glow: rgba(124, 58, 237, 0.35);
    --success: #10B981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --danger: #F43F5E;
    --danger-soft: rgba(244, 63, 94, 0.15);
    --warning: #F59E0B;
    --shadow-card: 0 20px 50px -15px rgba(0, 0, 0, 0.55);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

[data-theme="light"] {
    --bg-main: #F3F6FC;
    --bg-elevated: rgba(255, 255, 255, 0.92);
    --bg-card-solid: #FFFFFF;
    --bg-inner: #F8FAFC;
    --bg-pill: rgba(15, 23, 42, 0.05);
    --border-subtle: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    --shadow-card: 0 18px 40px -15px rgba(15, 23, 42, 0.12);
}

[data-accent="purple"] { --accent: #7C3AED; --accent-hover: #6D28D9; --accent-soft: rgba(124, 58, 237, 0.16); --accent-fg: #A78BFA; --accent-glow: rgba(124, 58, 237, 0.35); }
[data-accent="green"]  { --accent: #059669; --accent-hover: #047857; --accent-soft: rgba(5, 150, 105, 0.16);  --accent-fg: #34D399; --accent-glow: rgba(5, 150, 105, 0.35); }
[data-accent="blue"]   { --accent: #2563EB; --accent-hover: #1D4ED8; --accent-soft: rgba(37, 99, 235, 0.16);  --accent-fg: #60A5FA; --accent-glow: rgba(37, 99, 235, 0.35); }
[data-accent="orange"] { --accent: #EA580C; --accent-hover: #C2410C; --accent-soft: rgba(234, 88, 12, 0.16);  --accent-fg: #FB923C; --accent-glow: rgba(234, 88, 12, 0.35); }
[data-accent="red"]    { --accent: #E11D48; --accent-hover: #BE123C; --accent-soft: rgba(225, 29, 72, 0.16);  --accent-fg: #FB7185; --accent-glow: rgba(225, 29, 72, 0.35); }

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Ambient Studio Backdrop */
.studio-backdrop {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.studio-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.28;
    transition: background 0.35s ease;
}

.studio-orb-1 {
    width: 520px;
    height: 520px;
    top: -170px;
    left: -120px;
    background: var(--accent);
}

.studio-orb-2 {
    width: 440px;
    height: 440px;
    bottom: -140px;
    right: -110px;
    background: #06B6D4;
    opacity: 0.18;
}

.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Navbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: color-mix(in srgb, var(--bg-main) 78%, transparent);
    border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.brand-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 20px var(--accent-glow);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-title {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.brand-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-fg);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    white-space: nowrap;
}

.brand-subtitle {
    font-size: 0.76rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn, .pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 13px;
    border-radius: 11px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-pill);
    color: var(--text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.icon-btn {
    width: 38px;
    padding: 0;
}

.icon-btn:hover, .pill-btn:hover {
    border-color: var(--border-strong);
    background: color-mix(in srgb, var(--accent) 14%, var(--bg-pill));
    transform: translateY(-1px);
}

/* Theme Popover */
.theme-wrapper {
    position: relative;
}

.theme-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 248px;
    padding: 14px;
    border-radius: 16px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-card);
    z-index: 60;
    display: none;
}

.theme-popover.open {
    display: block;
    animation: fadeSlideDown 0.16s ease;
}

.popover-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 14px;
}

.mode-opt {
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-inner);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mode-opt.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.accent-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.accent-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.accent-dot:hover {
    transform: scale(1.1);
}

.accent-dot.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Main Content */
main.main-content {
    flex: 1;
    padding: 32px 0 48px;
}

/* Hero Section */
.hero-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 24px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    color: var(--accent-fg);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.eq-bars span {
    width: 2.5px;
    border-radius: 2px;
    background: currentColor;
    animation: eqPulse 1.1s ease-in-out infinite;
}

.eq-bars span:nth-child(1) { height: 5px; animation-delay: 0s; }
.eq-bars span:nth-child(2) { height: 11px; animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { height: 7px; animation-delay: 0.4s; }
.eq-bars span:nth-child(4) { height: 12px; animation-delay: 0.15s; }

.hero-title {
    margin: 0 0 10px;
    font-size: clamp(1.65rem, 3.8vw, 2.5rem);
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero-title .gradient-text {
    background: linear-gradient(125deg, var(--accent-fg), #38BDF8 55%, #34D399);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    margin: 0;
    font-size: 0.98rem;
    color: var(--text-secondary);
}

/* Studio Card */
.studio-card {
    background: var(--bg-elevated);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
}

.input-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.input-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.input-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.url-input-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
    background: var(--bg-inner);
    border: 1.5px solid var(--border-subtle);
    border-radius: 15px;
    padding: 6px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.url-input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.url-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.96rem;
    padding: 10px 12px;
}

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

.url-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ghost-btn {
    height: 40px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-pill);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ghost-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}

/* Format + Action Row */
.controls-row {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}

.format-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    padding: 6px;
    border-radius: 14px;
}

.format-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    transition: all 0.18s ease;
}

.format-option:hover {
    color: var(--text-primary);
    background: var(--bg-pill);
}

.format-option.active {
    background: var(--accent);
    color: #FFFFFF;
    box-shadow: 0 8px 22px var(--accent-glow);
}

.format-title {
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.format-sub {
    font-size: 0.73rem;
    opacity: 0.84;
    margin-top: 2px;
}

.primary-cta {
    height: 60px;
    padding: 0 28px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #06B6D4));
    color: #FFFFFF;
    font-size: 0.96rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 12px 28px var(--accent-glow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    white-space: nowrap;
}

.primary-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px var(--accent-glow);
}

.primary-cta:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Inline Alert / Preview Box */
.inline-alert {
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 10px;
}

.inline-alert.show {
    display: flex;
    animation: fadeSlideDown 0.18s ease;
}

.inline-alert.error {
    background: var(--danger-soft);
    border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
    color: #FDA4AF;
}

[data-theme="light"] .inline-alert.error {
    color: #BE123C;
}

.preview-strip {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--bg-inner);
    border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border-subtle));
    display: none;
    align-items: center;
    gap: 14px;
}

.preview-strip.show {
    display: flex;
    animation: fadeSlideDown 0.2s ease;
}

.preview-cover {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-pill);
    flex-shrink: 0;
}

.preview-meta {
    flex: 1;
    min-width: 0;
}

.preview-title {
    font-size: 0.94rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-sub {
    font-size: 0.79rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.preview-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    white-space: nowrap;
}

/* Stats + Queue Section */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-pills {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stat-chip {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.stat-chip strong {
    color: var(--text-primary);
}

.stat-chip.ok {
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, transparent);
    background: var(--success-soft);
}

.stat-chip.warn {
    color: var(--warning);
}

/* Task Cards */
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    background: var(--bg-elevated);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 36px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.empty-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.empty-sub {
    font-size: 0.85rem;
}

.task-card {
    background: var(--bg-elevated);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    transition: border-color 0.2s ease, transform 0.2s ease;
    animation: fadeSlideDown 0.22s ease;
}

.task-card:hover {
    border-color: var(--border-strong);
}

.task-card.is-completed {
    border-color: color-mix(in srgb, var(--success) 36%, var(--border-subtle));
}

.task-card.is-error {
    border-color: color-mix(in srgb, var(--danger) 40%, var(--border-subtle));
}

.task-cover {
    width: 76px;
    height: 76px;
    border-radius: 13px;
    object-fit: cover;
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    overflow: hidden;
}

.task-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.task-body {
    min-width: 0;
}

.task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.task-title {
    font-size: 0.98rem;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.format-pill {
    font-size: 0.71rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-fg);
    border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
    flex-shrink: 0;
}

.format-pill.wav {
    background: rgba(6, 182, 212, 0.15);
    color: #22D3EE;
    border-color: rgba(6, 182, 212, 0.35);
}

[data-theme="light"] .format-pill.wav {
    color: #0E7490;
}

.task-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 9px;
}

.progress-track {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: var(--bg-inner);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), #06B6D4);
    transition: width 0.3s ease;
}

.task-card.is-completed .progress-fill {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.task-card.is-error .progress-fill {
    background: var(--danger);
}

.task-status-row {
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.task-card.is-error .task-status-text {
    color: #FB7185;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn {
    height: 42px;
    padding: 0 18px;
    border-radius: 11px;
    border: none;
    background: var(--success);
    color: #FFFFFF;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
    transition: all 0.16s ease;
    white-space: nowrap;
}

.download-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.download-btn.is-ready {
    animation: readyDownloadPulse 1.8s ease-in-out infinite;
}

@keyframes readyDownloadPulse {
    0%, 100% { box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.22), 0 10px 26px rgba(16, 185, 129, 0.45); }
}

.download-btn.disabled {
    background: var(--bg-pill);
    color: var(--text-muted);
    box-shadow: none;
    pointer-events: none;
    border: 1px solid var(--border-subtle);
}

.remove-btn {
    width: 38px;
    height: 42px;
    border-radius: 11px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-pill);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.remove-btn:hover {
    color: var(--danger);
    border-color: color-mix(in srgb, var(--danger) 40%, transparent);
    background: var(--danger-soft);
}

/* Feature Grid + Footer */
.feature-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}

.feature-icon {
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.feature-title {
    font-size: 0.9rem;
    font-weight: 750;
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 18px 0 26px;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer a {
    color: var(--accent-fg);
    text-decoration: none;
    font-weight: 700;
}

.footer a:hover {
    text-decoration: underline;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(6px);
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-backdrop.open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow-card);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2.2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes eqPulse {
    0%, 100% { transform: scaleY(0.55); opacity: 0.7; }
    50% { transform: scaleY(1.1); opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 780px) {
    .controls-row {
        grid-template-columns: 1fr;
    }

    .primary-cta {
        width: 100%;
        height: 52px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .task-card {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .task-cover {
        width: 60px;
        height: 60px;
    }

    .task-actions {
        grid-column: 1 / -1;
        width: 100%;
    }

    .download-btn {
        flex: 1;
        height: 44px;
    }
}

@media (max-width: 520px) {
    .container {
        padding: 0 14px;
    }

    .topbar-inner {
        height: 64px;
    }

    .brand-subtitle {
        display: none;
    }

    .pill-btn span.btn-label {
        display: none;
    }

    .studio-card {
        padding: 16px;
        border-radius: 18px;
    }

    .url-input-group {
        flex-direction: column;
        gap: 6px;
    }

    .url-tools {
        justify-content: flex-end;
    }

    .format-segmented {
        grid-template-columns: 1fr;
    }

    .input-hint {
        display: none;
    }
}

/* Live KPI Stat Boxes (MP3, WAV, Online) */
.live-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.kpi-card {
    position: relative;
    background: var(--bg-elevated);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

.kpi-card.kpi-mp3 {
    border-color: color-mix(in srgb, var(--accent) 32%, var(--border-subtle));
    background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 12%, var(--bg-card-solid)), var(--bg-elevated));
}

.kpi-card.kpi-wav {
    border-color: rgba(6, 182, 212, 0.3);
    background: linear-gradient(155deg, rgba(6, 182, 212, 0.11), var(--bg-elevated));
}

.kpi-card.kpi-online {
    border-color: rgba(16, 185, 129, 0.38);
    background: linear-gradient(155deg, rgba(16, 185, 129, 0.12), var(--bg-elevated));
}

.kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.kpi-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.kpi-card.kpi-online .kpi-label {
    color: #34D399;
}

[data-theme="light"] .kpi-card.kpi-online .kpi-label {
    color: #059669;
}

.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg-pill);
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.kpi-unit {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.kpi-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #34D399;
}

[data-theme="light"] .kpi-live-badge {
    color: #059669;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseLive 1.6s infinite;
}

.kpi-foot {
    font-size: 0.76rem;
    color: var(--text-muted);
}

@keyframes pulseLive {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 780px) {
    .live-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Desktop Program Wide Showcase & Download Table */
.desktop-showcase-card {
    margin-top: 26px;
    background: var(--bg-elevated);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border-subtle));
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.desktop-showcase-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at 10% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
    pointer-events: none;
}

.desktop-showcase-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.desktop-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.desktop-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    padding: 6px;
    background: var(--bg-inner);
    border: 1px solid var(--border-strong);
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.desktop-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 11px;
    display: block;
}

.desktop-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.desktop-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.desktop-ver-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-fg);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.desktop-sub {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.desktop-dl-btn {
    height: 50px;
    padding: 0 22px;
    text-decoration: none;
    font-size: 0.9rem;
}

.desktop-table-wrap {
    position: relative;
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-inner);
}

.desktop-spec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    font-size: 0.86rem;
}

.desktop-spec-table th,
.desktop-spec-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.desktop-spec-table thead th {
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--bg-pill) 70%, transparent);
}

.desktop-spec-table tbody tr:last-child td {
    border-bottom: none;
}

.desktop-spec-table tbody tr:hover {
    background: color-mix(in srgb, var(--bg-pill) 55%, transparent);
}

.spec-label {
    font-weight: 750;
    color: var(--text-primary);
    white-space: nowrap;
}

.spec-value {
    color: var(--text-secondary);
}

.spec-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 750;
    background: var(--bg-pill);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    margin: 2px 4px 2px 0;
}

.spec-tag.ok {
    background: var(--success-soft);
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, transparent);
}

.spec-link-dl {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-fg);
    font-weight: 750;
    text-decoration: none;
}

.spec-link-dl:hover {
    text-decoration: underline;
}

@media (max-width: 780px) {
    .desktop-showcase-card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .desktop-showcase-head {
        flex-direction: column;
        align-items: stretch;
    }

    .desktop-dl-btn {
        width: 100%;
    }
}


