/* ==========================================================================
   ArtFlow AI - Music Studio Theme (Exact 4-Column Grid Replica)
   ========================================================================== */

:root {
    --bg-dark: #090c15;
    --bg-sidebar: rgba(15, 23, 42, 0.65);
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-input: rgba(11, 17, 32, 0.85);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.18);
    --border-accent: rgba(0, 240, 255, 0.45);

    --accent-cyan: #06b6d4;
    --accent-blue: #2563eb;
    --accent-indigo: #4f46e5;
    --accent-purple: #7c3aed;
    --accent-pink: #ec4899;
    --accent-yellow: #facc15;

    --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);

    --text-main: #f8fafc;
    --text-sub: #94a3b8;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --header-height: 64px;
    --player-height: 74px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(124, 58, 237, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, transparent 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}




/* ==========================================================================
   2. STUDIO LAYOUT (Sidebar + Suno Track List + Right Inspector)
   ========================================================================== */
.studio-layout {
    display: flex;
    height: calc(100vh - var(--header-height));
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

/* ──────────────────────────────────────────────────────────────────────────
   LEFT SIDEBAR: MUSIC SETTINGS
   ────────────────────────────────────────────────────────────────────────── */
.sidebar-panel {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 360px;
    min-width: 360px;
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
}

.sidebar-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 8px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-footer-action {
    flex-shrink: 0;
    padding: 12px 20px 20px 20px;
    background: var(--bg-sidebar);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-counter {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
}

/* Model Select Box */
.model-select-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: var(--transition);
}

.model-select-box:hover {
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

.model-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.model-name-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.model-name-sub {
    font-size: 11px;
    color: var(--text-sub);
}

/* Suno Model Dropdown (Matches Screenshot 3 & 4) */
.model-dropdown-section {
    position: relative;
    width: 100%;
}

.suno-model-dropdown {
    position: relative;
    width: 100%;
}

/* Suno Top Controls Row (Simple/Advanced + Model Dropdown in 1 Row) */
.suno-top-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 6px 0 2px 0;
}

.suno-mode-capsule {
    display: flex;
    align-items: center;
    background: #0f131a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    padding: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.suno-capsule-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    white-space: nowrap;
}

.suno-capsule-btn:hover {
    color: #ffffff;
}

.suno-capsule-btn.active {
    background: #232731;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Model Dropdown Pill */
.suno-model-dropdown {
    position: relative;
}

.suno-model-trigger-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0f131a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.suno-model-trigger-pill:hover {
    background: #182232;
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.suno-model-selected-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.suno-chevron-icon {
    width: 14px;
    height: 14px;
    stroke: #94a3b8;
    stroke-width: 2.2;
    fill: none;
    transition: transform 0.25s ease;
}

.suno-model-dropdown.open .suno-chevron-icon {
    transform: rotate(180deg);
    stroke: #ffffff;
}

/* Dropdown Menu List anchored to right */
.suno-model-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #101927;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 20px rgba(37, 99, 235, 0.15);
    overflow-y: auto;
    max-height: 290px;
    z-index: 300;
    display: none;
    flex-direction: column;
    padding: 4px 0;
}

.suno-model-dropdown.open .suno-model-menu {
    display: flex;
    animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.suno-model-item {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.suno-model-item:last-child {
    border-bottom: none;
}

.suno-model-item:hover {
    background: #1a283e;
}

.suno-model-item.active {
    background: #1f304a;
}

.suno-item-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.suno-item-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.35;
}

/* ── INFO BUTTON + TOOLTIP (ArtFlow Mini App Style) ── */
.info-btn {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    flex-shrink: 0;
    position: relative;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
}

.info-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.info-btn .tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -8px;
    width: 240px;
    background: #141d2e;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 11.5px;
    line-height: 1.45;
    color: #e2e8f0;
    text-align: left;
    font-weight: 400;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(4px);
    z-index: 500;
}

.info-btn:hover .tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ── MORE OPTIONS ACCORDION (ADVANCED MODE) ── */
.more-options-accordion {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    margin-top: 4px;
    margin-bottom: 6px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.more-options-accordion.open {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(16, 24, 39, 0.5);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.accordion-header:hover {
    color: #ffffff;
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.accordion-chevron {
    width: 14px;
    height: 14px;
    stroke: #94a3b8;
    stroke-width: 2.4;
    fill: none;
    transition: transform 0.2s ease;
}

.more-options-accordion.open .accordion-chevron {
    transform: rotate(90deg);
    stroke: #00f0ff;
}

.accordion-badge {
    font-size: 10.5px;
    font-weight: 500;
    color: #64748b;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 9999px;
}

.accordion-content {
    display: none;
    padding: 0 12px 14px 12px;
    flex-direction: column;
    gap: 14px;
}

.more-options-accordion.open .accordion-content {
    display: flex;
}

.opt-field-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opt-label-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.opt-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.opt-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #cbd5e1;
}

.model-feature-tag {
    font-size: 9.5px;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.opt-right-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-val-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 2px 7px;
    border-radius: 6px;
    min-width: 32px;
    text-align: center;
}

.slider-control-wrap {
    display: flex;
    flex-direction: column;
}

.studio-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.studio-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.studio-range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #ffffff;
}

.studio-range-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
    border: none;
    cursor: pointer;
}

.range-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #64748b;
    margin-top: 5px;
}

/* Vocal Gender Switch (inside More Options) */
.vocal-capsule-switch {
    display: flex;
    width: 100%;
    background: #0f131a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 3px;
    box-sizing: border-box;
    gap: 3px;
}

.vocal-capsule-btn {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    white-space: nowrap;
}

.vocal-capsule-btn:hover {
    color: #ffffff;
}

.vocal-capsule-btn.active {
    background: #232731;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Reset Options Button */
.opt-reset-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.btn-opt-reset {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
}

.btn-opt-reset:hover {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

.btn-opt-reset .reset-icon {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.25s ease;
}

.btn-opt-reset:hover .reset-icon {
    transform: rotate(-60deg);
}

/* Toggle Switch Card */
.toggle-row-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.toggle-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    display: block;
}

.toggle-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.toggle-switch {
    width: 38px;
    height: 20px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--accent-gradient);
}
.toggle-switch.active::after {
    left: 20px;
}

/* Inputs & Textareas */
.studio-input, .studio-textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-input::placeholder,
.studio-textarea::placeholder {
    color: #64748b;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.45;
    opacity: 0.85;
    user-select: none;
    -webkit-user-select: none;
}

.studio-input:focus, .studio-textarea:focus {
    border-color: var(--border-accent);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}

.studio-textarea {
    resize: vertical;
    min-height: 220px;
    max-height: 520px;
    line-height: 1.5;
}

/* Prompt Container Wrapper */
.prompt-container {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.prompt-container:focus-within {
    border-color: var(--border-accent);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}

.prompt-container .studio-textarea {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 10px 12px;
    min-height: 220px;
}

.prompt-container .studio-textarea:focus {
    box-shadow: none;
}

/* Inner Footer for Simple Mode (Instrumental inside input field) */
.prompt-inner-footer {
    display: none;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.inner-inst-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inner-inst-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-sub);
    user-select: none;
}

/* Static Simple Mode: Fixed height without reload jumping */
.sidebar-panel.is-simple-mode {
    gap: 14px;
}

.sidebar-panel.is-simple-mode #moreOptionsAccordion,
.sidebar-panel.is-simple-mode #styleFieldGroup,
.sidebar-panel.is-simple-mode #insertStructureBtn {
    display: none !important;
}

.sidebar-panel.is-simple-mode .prompt-inner-footer {
    display: flex !important;
}

.sidebar-panel.is-simple-mode #lyricsFieldGroup {
    margin-bottom: 20px;
}

.sidebar-panel.is-simple-mode #lyricsFieldGroup .prompt-container {
    height: 420px;
}

.sidebar-panel.is-simple-mode #lyricsFieldGroup .studio-textarea {
    height: calc(420px - 44px);
    resize: none;
    box-sizing: border-box;
}

.sidebar-panel.is-simple-mode .generate-btn {
    margin-top: 0;
}

.req-star {
    color: #f43f5e;
    font-weight: 800;
    font-size: 13px;
    margin-left: 2px;
}

.studio-input.input-error,
.studio-textarea.input-error,
.prompt-container.input-error {
    border-color: #f43f5e !important;
    box-shadow: 0 0 14px rgba(244, 63, 94, 0.4) !important;
    animation: fieldShake 0.35s ease;
}

.field-error-text {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f87171;
    font-size: 12px;
    font-weight: 500;
    margin-top: 6px;
    padding-left: 2px;
    animation: fadeInDown 0.2s ease;
}

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

@keyframes fieldShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}



.lyrics-header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-tool-link {
    background: transparent;
    border: none;
    color: var(--accent-cyan);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.btn-tool-link:hover {
    text-decoration: underline;
}

/* Quick Tags */
.quick-style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.q-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 3px 9px;
    font-size: 10px;
    color: var(--text-sub);
    cursor: pointer;
    transition: var(--transition);
}
.q-tag:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    color: #fff;
}

/* Generate Button */
.generate-btn {
    margin-top: auto;
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.35), 0 2px 8px rgba(6, 182, 212, 0.25);
    transition: var(--transition);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(79, 70, 229, 0.45);
}

.cost-tag {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
}

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ──────────────────────────────────────────────────────────────────────────
   RIGHT MAIN WORKSPACE: 4-COLUMN MUSIC GRID
   ────────────────────────────────────────────────────────────────────────── */
/* ──────────────────────────────────────────────────────────────────────────
   CENTER MAIN WORKSPACE: SUNO TRACK LIST
   ────────────────────────────────────────────────────────────────────────── */
.main-workspace {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: transparent;
    padding: 0;
}

.main-workspace-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px calc(var(--player-height) + 36px) 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Hero Promo Card */
.hero-promo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.hero-title {
    font-size: 16.5px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #FFFFFF 0%, #CBD5E1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   SUNO-STYLE TRACK LIST (HORIZONTAL ROWS)
   ========================================================================== */
.suno-tracks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 50px;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.suno-track-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    position: relative;
}

.suno-track-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.suno-track-row.active-selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.suno-track-row.playing {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.12);
}

/* Square Thumbnail with duration tag & play overlay */
.suno-thumb-box {
    position: relative;
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 8px;
    overflow: hidden;
    background: #090d16;
    flex-shrink: 0;
}

.suno-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.suno-track-row:hover .suno-thumb-img {
    transform: scale(1.06);
}

.suno-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.suno-track-row:hover .suno-play-overlay,
.suno-track-row.playing .suno-play-overlay {
    opacity: 1;
}

.suno-play-overlay svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.suno-duration-tag {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.suno-track-row:hover .suno-duration-tag {
    opacity: 0;
}

/* Generating State for Suno Track Row */
.suno-track-row.is-generating {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.25);
}

.suno-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 29, 0.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.suno-spinner-icon {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #a855f7;
    border-right-color: #38bdf8;
    border-radius: 50%;
    animation: sunoSpin 0.9s linear infinite;
}

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

.suno-generating-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
    animation: sunoPulse 1.8s ease-in-out infinite;
}

@keyframes sunoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.suno-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c084fc;
    box-shadow: 0 0 6px #c084fc;
}

.suno-failed-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Track Main Info */
.suno-track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.suno-track-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suno-model-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.suno-model-badge.v6-mini {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}

.suno-model-badge.v6 {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.suno-model-badge.v6-wild {
    background: rgba(244, 114, 182, 0.12);
    border: 1px solid rgba(244, 114, 182, 0.25);
    color: #f472b6;
}

.suno-style-text {
    font-size: 11.5px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Actions in row */
.suno-actions-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.suno-act-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.suno-act-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.suno-act-btn svg {
    width: 15px;
    height: 15px;
}

.suno-inspect-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.suno-inspect-pill-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    color: #ffffff;
}

/* ==========================================================================
   RIGHT TRACK INSPECTOR PANEL (SLIDE-OVER DRAWER)
   ========================================================================== */
.track-inspector-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    width: 420px;
    min-width: 420px;
    height: auto;
    z-index: 500;
    background: #0b0f19;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.track-inspector-panel.open {
    transform: translateX(0);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    top: var(--header-height);
    bottom: 0;
    background: rgba(5, 8, 15, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 490;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    display: block;
}

.drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
}

.inspector-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
}

.inspector-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.18s ease;
}

.inspector-close-btn:hover {
    color: #ffffff;
}

.inspector-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Inspector Hero Card */
.inspector-hero {
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px;
}

.inspector-cover-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #090d16;
}

.inspector-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inspector-cover-play {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.inspector-cover-wrap:hover .inspector-cover-play,
.inspector-cover-wrap.playing .inspector-cover-play {
    opacity: 1;
}

.inspector-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inspector-track-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.inspector-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
}

/* Inspector Quick Actions */
.inspector-actions-row {
    display: flex;
    gap: 8px;
}

.btn-inspector-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-inspector-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-inspector-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-inspector-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Inspector Segmented Tabs */
.inspector-tabs-nav {
    display: flex;
    background: #070a12;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}

.inspector-tab-btn {
    flex: 1;
    padding: 6px 10px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}

.inspector-tab-btn.active {
    background: #1e2638;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Tab Panels */
.inspector-tab-panel {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.inspector-tab-panel.active {
    display: flex;
}

/* Lyrics Tab Styling */
.inspector-lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.inspector-lyrics-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.btn-copy-lyrics-sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #38bdf8;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.btn-copy-lyrics-sub:hover {
    background: rgba(56, 189, 248, 0.12);
}

.inspector-lyrics-box {
    background: #070a12;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12.5px;
    line-height: 1.7;
    color: #cbd5e1;
    max-height: 360px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.lyrics-tag {
    color: #38bdf8;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.3px;
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin: 6px 0 2px 0;
}

/* Params Tab Styling */
.params-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.param-card {
    background: #070a12;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.param-card.full-width {
    grid-column: 1 / -1;
}

.param-card-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.param-card-val {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
}

.param-card-val.accent {
    color: #38bdf8;
}

.param-prompt-text {
    font-size: 11.5px;
    color: #cbd5e1;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 1200px) {
    .track-inspector-panel {
        position: fixed;
        top: var(--header-height);
        right: 0;
        bottom: var(--player-height);
        height: auto;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
        z-index: 100;
    }
}

/* ==========================================================================
   LYRICS MODAL POPUP
   ========================================================================== */
.lyrics-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.lyrics-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.lyrics-modal-card {
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
}

.lyrics-modal-backdrop.open .lyrics-modal-card {
    transform: translateY(0) scale(1);
}

.lyrics-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lyrics-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lyrics-modal-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.lyrics-modal-track-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.lyrics-modal-track-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.lyrics-modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}
.lyrics-modal-close-btn:hover { color: #fff; }

.lyrics-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.lyrics-modal-text {
    font-size: 13px;
    line-height: 1.7;
    color: #e2e8f0;
    white-space: pre-wrap;
}

.lyrics-highlight-tag {
    color: var(--accent-cyan);
    font-weight: 700;
}

.lyrics-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.btn-modal-action {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.btn-modal-action:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-modal-action.primary {
    background: var(--accent-gradient);
    border: none;
    box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}
.btn-modal-action.primary:hover {
    filter: brightness(1.1);
}

/* ==========================================================================
   3. BOTTOM AUDIO PLAYER (Inline Floating under Suno Track List)
   ========================================================================== */
.bottom-player-bar {
    position: absolute;
    bottom: 16px;
    left: 24px;
    right: 24px;
    margin: 0 auto;
    width: calc(100% - 48px);
    max-width: 860px;
    height: var(--player-height);
    background: rgba(13, 17, 28, 0.94);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.bottom-player-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 200px;
    min-width: 0;
    flex-shrink: 0;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 10px;
    transition: var(--transition);
}
.player-left:hover {
    background: rgba(255, 255, 255, 0.06);
}
.player-left:hover .player-thumb {
    transform: scale(1.05);
}

.player-thumb {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #1e293b;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.player-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.player-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-sub {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-expand-hint {
    opacity: 0;
    color: var(--text-muted);
    margin-left: auto;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.player-left:hover .player-expand-hint {
    opacity: 1;
    color: var(--accent-cyan);
    transform: scale(1.1);
}

.player-center {
    flex: 1;
    min-width: 0;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-ctrl {
    background: transparent;
    border: none;
    color: var(--text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: var(--transition);
}
.btn-ctrl:hover { color: #fff; transform: scale(1.08); }
.btn-ctrl svg { width: 17px; height: 17px; }

.btn-play-large {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    color: #090c15;
    justify-content: center;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}
.btn-play-large:hover {
    background: var(--accent-cyan);
    color: #090c15;
    box-shadow: 0 0 18px rgba(6, 182, 212, 0.6);
}

/* Waveform Timeline */
.player-waveform-timeline {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 26px;
}

.player-waveform-wrap {
    flex: 1;
    height: 24px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.waveform-bars {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    gap: 2px;
}

.wf-bar {
    flex: 1;
    min-width: 2px;
    max-width: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    transition: height 0.15s ease, background-color 0.15s ease;
}
.player-waveform-wrap:hover .base-bars .wf-bar {
    background: rgba(255, 255, 255, 0.32);
}

.waveform-progress-clip {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    overflow: hidden;
    pointer-events: none;
    transition: width 0.1s linear;
}

.waveform-progress-clip .active-bars {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
}

.waveform-progress-clip .wf-bar {
    background: var(--accent-gradient);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

.waveform-scrubber-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.8);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.player-waveform-wrap:hover .waveform-scrubber-handle {
    opacity: 1;
}

/* Right Section with Quick Actions & Volume */
.player-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    justify-content: flex-end;
}

.player-actions-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.player-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}
.player-action-btn svg {
    flex-shrink: 0;
}

.player-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 1px;
}

.equalizer-bars {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 15px;
}
.eq-bar {
    width: 2.5px;
    height: 2.5px;
    background: var(--accent-cyan);
    border-radius: 1.5px;
}

.equalizer-bars.active .eq-bar:nth-child(1) { animation: eqA 0.6s infinite ease-in-out alternate; }
.equalizer-bars.active .eq-bar:nth-child(2) { animation: eqA 0.8s infinite 0.15s ease-in-out alternate; }
.equalizer-bars.active .eq-bar:nth-child(3) { animation: eqA 0.5s infinite 0.3s ease-in-out alternate; }
.equalizer-bars.active .eq-bar:nth-child(4) { animation: eqA 0.7s infinite 0.2s ease-in-out alternate; }
.equalizer-bars.active .eq-bar:nth-child(5) { animation: eqA 0.9s infinite 0.1s ease-in-out alternate; }

@keyframes eqA {
    0% { height: 2.5px; }
    100% { height: 15px; }
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 5px;
}
.volume-slider {
    width: 50px;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.player-dismiss-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.player-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    animation: toastIn 0.25s ease;
}
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.hidden { display: none !important; }

/* ============================================================================
   MOBILE & RESPONSIVE LAYOUT (MATCHING STUDIO.CSS ACROSS ARTFLOW)
   ============================================================================ */
@media (max-width: 900px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw;
    }

    body {
        min-height: 100dvh;
        height: auto;
        overflow-y: auto;
        background-attachment: scroll;
    }

    .studio-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: calc(100dvh - 112px);
        overflow: visible;
        border: 0;
        margin: 0;
    }

    .sidebar-panel,
    .main-workspace {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        height: auto;
        overflow: visible;
        flex-shrink: 0;
    }

    .sidebar-panel {
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-sidebar);
    }

    .sidebar-scroll-content {
        padding: 16px 14px 12px;
        overflow: visible;
        height: auto;
        gap: 14px;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Top Controls Row: wrap gracefully if narrow */
    .suno-top-controls-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        flex-wrap: wrap;
    }

    .suno-mode-capsule {
        flex: 1 1 auto;
        justify-content: center;
        max-width: 100%;
    }

    .suno-capsule-btn {
        padding: 6px 10px;
        font-size: 12px;
        flex: 1;
        text-align: center;
    }

    .suno-model-dropdown {
        flex: 0 0 auto;
    }

    .suno-model-trigger-pill {
        padding: 6px 12px;
        font-size: 12px;
    }

    .suno-model-menu {
        width: min(300px, calc(100vw - 28px));
        right: 0;
    }

    /* Header labels and counters wrap without clipping */
    .section-label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        width: 100%;
        font-size: 11px;
    }

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

    .btn-tool-link {
        font-size: 11px;
    }

    .field-counter {
        font-size: 10.5px;
    }

    .prompt-container,
    .studio-input,
    .studio-textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .quick-style-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        width: 100%;
    }

    .q-tag {
        padding: 3px 8px;
        font-size: 10.5px;
    }

    .more-options-accordion {
        width: 100%;
        max-width: 100%;
    }

    .accordion-header {
        padding: 10px 12px;
        font-size: 12.5px;
        width: 100%;
        box-sizing: border-box;
    }

    .vocal-capsule-switch {
        display: flex;
        width: 100%;
        gap: 4px;
    }

    .vocal-capsule-btn {
        flex: 1;
        padding: 6px 4px;
        font-size: 11.5px;
        text-align: center;
    }

    .sidebar-footer-action {
        position: sticky;
        bottom: 0;
        padding: 10px 14px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.5);
        z-index: 40;
    }

    .main-workspace {
        padding: 18px 14px calc(var(--player-height) + 60px);
        gap: 14px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .main-workspace-scroll {
        overflow: visible;
        height: auto;
        padding: 0;
        gap: 14px;
    }

    .hero-promo-card {
        min-height: 64px;
        padding: 14px 12px;
        border-radius: var(--radius-md);
    }

    .hero-title {
        font-size: 14.5px;
        line-height: 1.35;
        text-align: center;
    }

    /* Track List Rows */
    .suno-tracks-list {
        gap: 8px;
        padding-bottom: 30px;
    }

    .suno-track-row {
        padding: 8px 10px;
        gap: 8px;
        border-radius: 12px;
    }

    .suno-thumb-box {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .suno-track-info {
        min-width: 0;
        flex: 1;
    }

    .suno-title-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .suno-title-text {
        font-size: 13px;
        max-width: 100%;
        word-break: break-word;
    }

    .suno-style-sub {
        font-size: 10.5px;
        line-height: 1.35;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .suno-actions-cluster {
        gap: 3px;
        flex-shrink: 0;
    }

    .suno-act-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .suno-inspect-pill-btn {
        padding: 5px 8px;
        font-size: 11px;
        min-height: 32px;
    }

    /* Floating Bottom Player on Mobile */
    .bottom-player-bar {
        position: fixed;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 8px;
        right: 8px;
        width: calc(100% - 16px);
        max-width: 100%;
        margin: 0;
        height: auto;
        padding: 8px 12px;
        border-radius: 16px;
        flex-wrap: wrap;
        gap: 6px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
        z-index: 1000;
    }

    .player-left {
        width: auto;
        max-width: calc(100% - 120px);
        gap: 6px;
    }

    .player-thumb {
        width: 36px;
        height: 36px;
    }

    .player-title {
        font-size: 12px;
        max-width: 140px;
    }

    .player-center {
        order: 3;
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .player-timeline-box {
        gap: 5px;
    }

    .timeline-track-bar {
        height: 4px;
    }

    .player-right {
        order: 2;
        margin-left: auto;
        gap: 3px;
    }

    .volume-control {
        display: none;
    }

    /* Track Inspector Drawer on Mobile */
    .track-inspector-panel {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        top: 0;
        bottom: 0;
        z-index: 2000;
    }

    .inspector-header {
        padding: max(12px, env(safe-area-inset-top)) 14px 12px;
    }

    .drawer-backdrop {
        top: 0;
        z-index: 1990;
    }

    /* Touch Friendly Target Sizes (44px standard) */
    .generate-btn,
    .suno-capsule-btn,
    .model-select-box,
    .opt-reset-row .btn-opt-reset,
    .accordion-header {
        min-height: 44px;
    }

    /* Prevent iOS auto-zoom on input focus */
    .studio-input,
    .studio-textarea,
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

@media (max-width: 520px) {
    .sidebar-scroll-content,
    .sidebar-footer-action,
    .main-workspace {
        padding-inline: 12px;
    }

    .hero-title {
        font-size: 13.5px;
    }

    .suno-track-row {
        padding: 8px;
        gap: 8px;
    }

    .suno-thumb-box {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .suno-inspect-pill-btn span {
        display: none;
    }

    .suno-inspect-pill-btn {
        padding: 6px 8px;
    }
}

@media (max-width: 380px) {
    .sidebar-scroll-content,
    .sidebar-footer-action,
    .main-workspace {
        padding-inline: 8px;
    }

    .suno-top-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .suno-mode-capsule {
        width: 100%;
    }

    .suno-model-dropdown {
        width: 100%;
    }

    .suno-model-trigger-pill {
        width: 100%;
        justify-content: space-between;
    }

    .suno-model-menu {
        width: 100%;
    }

    .section-label {
        font-size: 10px;
    }

    .lyrics-header-tools {
        gap: 4px;
    }

    .btn-tool-link {
        font-size: 10px;
    }

    .field-counter {
        font-size: 9.5px;
    }
}
