/* ==========================================================================
   MUSIC DNA STUDIO - MODERN DARK GLASSMORPHISM STYLESHEET
   ========================================================================== */

:root {
    --bg-dark: #090a0f;
    --bg-surface: rgba(18, 22, 36, 0.75);
    --bg-surface-elevated: rgba(26, 32, 53, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(139, 92, 246, 0.5);

    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-glow: rgba(139, 92, 246, 0.35);

    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-coral: #f43f5e;
    --accent-amber: #f59e0b;

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

    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

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

body.studio-body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Ambient Orbs */
.glow-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.22;
}

.orb-primary {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-secondary {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    bottom: -150px;
    right: -150px;
}

/* Header */
.studio-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 2rem;
}

.header-container {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--primary);
}

.badge-tag {
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s, transform 0.2s;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
}

.nav-item.active {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
}

.btn-demo {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--accent-cyan);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-demo:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
}

/* Main Layout */
.studio-main {
    flex: 1;
    max-width: 1560px;
    width: 100%;
    margin: 1.25rem auto 2.5rem;
    padding: 0 2rem;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.25rem 0.85rem;
    border-radius: 30px;
    margin-bottom: 0.6rem;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--primary) 50%, var(--accent-coral) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 880px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.5;
}

/* Studio Cards (Glassmorphism) */
.studio-card {
    background: var(--bg-surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-header h3, .card-header h4 {
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* 2-Column Studio Upload Layout */
.upload-layout-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.75rem;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .upload-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.upload-left-col {
    display: flex;
    flex-direction: column;
}

.upload-left-col .dropzone {
    flex: 1;
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.2rem 1.5rem;
}

.upload-right-col {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
}

.upload-right-col .controls-grid {
    margin-bottom: 0;
    gap: 1.25rem;
}

.upload-right-col .genre-selector-section {
    margin-bottom: 0;
}

/* Dropzone */
.dropzone {
    border: 2px dashed rgba(139, 92, 246, 0.35);
    border-radius: var(--radius-md);
    background: rgba(139, 92, 246, 0.03);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.dropzone-icon {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
}

.dropzone-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dropzone-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.btn-browse {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-browse:hover {
    background: rgba(255, 255, 255, 0.15);
}

.selected-file-info {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    color: var(--accent-emerald);
    font-weight: 600;
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: var(--accent-emerald);
    cursor: pointer;
    font-weight: 700;
    margin-left: 0.3rem;
}

/* Controls Grid */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
}

.control-group {
    background: var(--bg-surface-elevated);
    padding: 1.2rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.control-label {
    font-weight: 700;
    font-size: 0.95rem;
}

.control-value {
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-weight: 700;
}

.custom-slider {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.control-desc {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.custom-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    outline: none;
    transition: border-color 0.2s;
}

.custom-input:focus {
    border-color: var(--primary);
}

.btn-dice {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 0.85rem 1.85rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--primary-glow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

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

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 10, 15, 0.92);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 2rem;
}

.spinner-radar {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 1.5rem;
}

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

.processing-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.processing-step {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.processing-progress-bar {
    width: 320px;
    max-width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--primary));
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Tech Badges Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

.tech-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.tech-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.tech-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.tech-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.stat-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.chord-tag {
    color: var(--accent-cyan);
    font-size: 1.3rem;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.3rem;
}

/* Structure Timeline */
.structure-timeline {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sec-block {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sec-intro { background: rgba(139, 92, 246, 0.25); color: #c4b5fd; }
.sec-verse { background: rgba(6, 182, 212, 0.25); color: #67e8f9; }
.sec-pre_chorus { background: rgba(245, 158, 11, 0.25); color: #fde68a; }
.sec-chorus { background: rgba(244, 63, 94, 0.35); color: #fda4af; }
.sec-outro { background: rgba(100, 116, 139, 0.35); color: #cbd5e1; }

.canvas-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
}

#energy-canvas {
    width: 100%;
    display: block;
}

/* Metrics Row */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.metric-val {
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.metric-bar-wrap {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 3px;
}

.metric-pct {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    width: 45px;
    text-align: right;
}

/* Raw JSON Code Block */
.json-code-block {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    max-height: 350px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #a7f3d0;
}

/* Tracks Selection Cards */
.tracks-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.track-checkbox-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.track-checkbox-card:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.track-checkbox-card input[type="checkbox"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.track-card-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.track-icon {
    font-size: 1.4rem;
}

.track-details strong {
    display: block;
    font-size: 0.95rem;
}

.track-details small {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* DNA Summary Pills */
.dna-summary-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dna-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.dna-pill strong {
    color: var(--accent-cyan);
}

/* MIDI Player Console */
.player-top {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.track-artwork {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 8px 25px var(--primary-glow);
}

.meta-tag {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    font-weight: 600;
}

.track-title {
    font-size: 1.6rem;
    font-weight: 800;
}

.track-specs {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.player-controls {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.transport-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-transport {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-transport:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.timeline-bar-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.time-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-scrubber {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.scrubber-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--primary));
    border-radius: 4px;
}

/* Genre Presets Pills */
.genre-selector-section {
    margin-bottom: 1.5rem;
}

.genre-pills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 0.75rem;
}

.genre-pill-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.genre-pill-card:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.08);
}

.genre-pill-card input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.genre-pill-card:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.genre-pill-content {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.genre-icon {
    font-size: 1.3rem;
}

.genre-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.genre-info small {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.25;
    display: block;
    margin-top: 0.2rem;
}

/* Stems Synthesizer Console */
.stem-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s;
}

.stem-control-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.stem-label-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 240px;
}

.stem-glyph {
    font-size: 1.15rem;
}

.stem-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.stem-actions-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    justify-content: flex-end;
}

.btn-stem-mute, .btn-stem-solo {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.btn-stem-mute.active {
    background: var(--accent-coral);
    border-color: var(--accent-coral);
    color: white;
    box-shadow: 0 0 10px rgba(244, 63, 94, 0.4);
}

.btn-stem-solo.active {
    background: var(--accent-amber);
    border-color: var(--accent-amber);
    color: black;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.stem-vol-wrap {
    width: 130px;
}

.stem-vol-slider {
    width: 100%;
    accent-color: var(--accent-cyan);
    cursor: pointer;
}

.stem-vu-meter {
    width: 220px;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.vu-bar {
    height: 100%;
    transition: width 0.08s ease-out;
}

/* ==========================================================================
   INTERACTIVE DNA MODIFIER (Analysis Screen)
   ========================================================================== */
.modifier-card {
    background: var(--bg-surface);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 20px rgba(6, 182, 212, 0.08);
    position: relative;
    overflow: hidden;
}

.modifier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--primary), var(--accent-emerald));
}

.modifier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modifier-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.modifier-icon {
    font-size: 1.8rem;
    background: rgba(6, 182, 212, 0.12);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(6, 182, 212, 0.25);
}

.modifier-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modifier-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .modifier-grid {
        grid-template-columns: 1fr;
    }
}

.mod-wide-cell {
    grid-column: 1 / -1;
}

.mod-dual-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.select-inline {
    width: 100%;
}

.prog-quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.prog-pill-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.prog-pill-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.modifier-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   REAL-TIME PIANO ROLL VISUALIZER (Result Screen)
   ========================================================================== */
.piano-roll-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.piano-roll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.roll-title-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.roll-icon {
    font-size: 1.8rem;
    background: rgba(139, 92, 246, 0.12);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.roll-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.roll-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.roll-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px currentColor;
}

.piano-roll-canvas-wrap {
    width: 100%;
    background: #0a0d14;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.6);
}

#piano-roll-canvas {
    display: block;
    width: 100%;
    height: 240px;
}

/* ==========================================================================
   ORIGINAL AUDIO COMPARISON CARD (Result Screen)
   ========================================================================== */
.original-audio-card {
    background: rgba(18, 22, 36, 0.6);
    border: 1px dashed rgba(6, 182, 212, 0.4);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.orig-audio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.orig-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.orig-icon {
    font-size: 1.5rem;
    background: rgba(6, 182, 212, 0.15);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.orig-audio-player-wrap {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   AI PROMPTS HUB & DNA DASHBOARD
   ========================================================================== */
.section-title-wrap {
    margin-bottom: 1.5rem;
}

.section-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.25);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.section-title-wrap h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.ai-prompts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .ai-prompts-grid {
        grid-template-columns: 1fr;
    }
}

.prompt-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.prompt-card:hover {
    border-color: rgba(6, 182, 212, 0.35);
    transform: translateY(-2px);
}

.prompt-card.wide-card {
    grid-column: 1 / -1;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.prompt-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.prompt-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.prompt-brand h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.prompt-brand small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.btn-copy-prompt {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-prompt:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-cyan);
    color: white;
}

.prompt-content-box {
    flex: 1;
}

.prompt-textarea {
    width: 100%;
    background: rgba(9, 10, 15, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    color: #e2e8f0;
    font-size: 0.88rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.prompt-textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.prompt-textarea.font-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.stat-desc {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.btn-large {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary));
    color: white !important;
    border: none;
}

/* Footer */
.studio-footer {
    border-top: 1px solid var(--border-subtle);
    background: rgba(9, 10, 15, 0.9);
    padding: 2rem;
    margin-top: auto;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stateless-notice {
    margin-top: 0.5rem;
    color: var(--accent-emerald);
    font-size: 0.8rem;
}
