/* DESIGN SYSTEM & GLOBAL VARIABLES */
:root {
    --bg-dark: #0f1013;
    --bg-deep: #070708;
    --panel-bg: rgba(24, 26, 32, 0.65);
    --panel-border: rgba(255, 255, 255, 0.05);
    
    --primary: #ffbe00;
    --primary-hover: #e5ab00;
    --primary-glow: rgba(255, 190, 0, 0.25);
    
    --accent: #ec4899;
    --accent-hover: #db2777;
    --accent-glow: rgba(236, 72, 153, 0.25);
    
    --emerald: #10b981;
    --emerald-hover: #059669;
    --emerald-glow: rgba(16, 185, 129, 0.3);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #4b5563;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Playout Marker Colors */
    --color-cue-in: #38bdf8;
    --color-intro: #ffbe00;
    --color-extro: #ec4899;
    --color-cue-out: #10b981;

    /* WaveSurfer Colors */
    --wavesurfer-wave: rgba(255, 190, 0, 0.15);
    --wavesurfer-progress: #ffbe00;
    --wavesurfer-cursor: #f3f4f6;
}

[data-theme="light"] {
    --bg-dark: #f3f4f6;
    --bg-deep: #e5e7eb;
    --panel-bg: rgba(255, 255, 255, 0.8);
    --panel-border: rgba(0, 0, 0, 0.08);
    
    --primary: #d99b00;
    --primary-hover: #bf8900;
    --primary-glow: rgba(217, 155, 0, 0.2);
    
    --accent: #db2777;
    --accent-hover: #be185d;
    --accent-glow: rgba(219, 39, 119, 0.2);
    
    --text-main: #111827;
    --text-muted: #4b5563;
    --text-dark: #9ca3af;

    /* WaveSurfer Colors */
    --wavesurfer-wave: rgba(217, 155, 0, 0.15);
    --wavesurfer-progress: #d99b00;
    --wavesurfer-cursor: #111827;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* BACKGROUND EFFECTS */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px);
    background-size: 550px 550px, 350px 350px;
    background-position: 0 0, 40px 60px;
    opacity: 0.25;
    z-index: -2;
}

.glowing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 190, 0, 0.35) 0%, transparent 70%);
    top: -200px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.35) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
}

/* APP CONTAINER & LAYOUT */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

.logo-img {
    width: 3.2rem;
    height: 3.2rem;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 0 15px var(--primary-glow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.logo-img:hover {
    transform: rotate(5deg) scale(1.08);
    box-shadow: 0 0 22px rgba(255, 190, 0, 0.45);
}

.logo-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.logo h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

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

.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* GLASS PANEL */
.panel {
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    margin-bottom: 2rem;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.panel-header {
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.panel-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.panel-body {
    padding: 2.5rem;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: #0c0d0e;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 190, 0, 0.35);
    color: #0c0d0e;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-emerald {
    background: var(--emerald);
    color: white;
    box-shadow: 0 4px 14px var(--emerald-glow);
    text-decoration: none;
}

.btn-emerald:hover {
    background: var(--emerald-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    padding: 0;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
}

.btn-close:hover {
    color: var(--text-main);
}

/* FORMS & INPUTS */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="number"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
    font-family: var(--font-body);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(15, 23, 42, 0.8);
}

.input-readonly {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* CATEGORY SELECTOR CARD */
.category-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .category-selector {
        grid-template-columns: 1fr;
    }
}

.category-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.selector-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.selector-icon {
    font-size: 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.selector-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.selector-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.selector-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.category-option input[type="radio"]:checked + .selector-card {
    border-color: var(--primary);
    background: rgba(255, 190, 0, 0.08);
    box-shadow: 0 0 20px var(--primary-glow);
}

.category-option input[type="radio"]:checked + .selector-card .selector-icon {
    background: var(--primary);
    color: #0c0d0e;
    filter: drop-shadow(0 0 8px var(--primary));
}

/* DROP ZONE */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.25);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(255, 190, 0, 0.04);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.drop-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.drop-zone h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
}

.drop-zone p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.file-limits {
    font-size: 0.8rem;
    color: var(--text-dark);
    margin-top: 0.5rem;
}

/* SELECTED FILE CARD */
.selected-file-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.3s ease-in-out;
}

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

.file-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow: hidden;
}

.file-name {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.file-size {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* STATUS / LOADING PANEL */
.text-center {
    text-align: center;
}

.text-highlight {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    font-family: monospace;
    color: var(--primary);
    font-size: 0.9rem;
    word-break: break-all;
}

.loader-container {
    position: relative;
    width: 6rem;
    height: 6rem;
    margin: 2rem auto;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 190, 0, 0.15);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    background: var(--primary-glow);
    border-radius: 50%;
    animation: pulse 2s infinite ease-in-out;
}

.loading-status-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.status-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* ALERTS */
.alert {
    padding: 1.5rem;
    border-radius: 1rem;
    margin-top: 2rem;
    text-align: left;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-danger h4 {
    color: var(--danger);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.alert-danger p {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* EDITOR LAYOUT */
.panel-header-editor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 1rem;
}

.editor-header-actions {
    display: flex;
    gap: 1rem;
}

.editor-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2.5rem;
    padding: 2.5rem;
}

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

/* Waveform Section */
.waveform-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.waveform-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    padding: 2rem;
}

#waveform {
    width: 100%;
    margin-bottom: 1.5rem;
    background: rgba(2, 6, 23, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.time-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.time-display span:first-child {
    color: var(--text-main);
    font-weight: 600;
}

.markers-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.legend-item::before {
    content: '';
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.tag-cue-in::before { background: var(--color-cue-in); }
.tag-intro::before { background: var(--color-intro); }
.tag-extro::before { background: var(--color-extro); }
.tag-cue-out::before { background: var(--color-cue-out); }

/* Metadata Section */
.metadata-section {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    padding: 2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
    border-left: 3px solid var(--primary);
    padding-left: 0.75rem;
}

.margin-top {
    margin-top: 2rem;
}

/* Marker inputs custom layout */
.form-group-marker {
    display: flex;
    flex-direction: column;
}

.marker-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-action-group {
    display: flex;
    gap: 0.5rem;
}

.input-action-group input {
    flex-grow: 1;
    width: 50px;
}

.input-action-group .btn-icon {
    font-size: 1.1rem;
    padding: 0 0.85rem;
    cursor: pointer;
}

.save-status-text {
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.save-status-text.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
}

.save-status-text.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

/* UTILITY CLASSES */
.hidden { display: none !important; }
.visible { display: block !important; }
.margin-bottom { margin-bottom: 1.5rem; }
.font-bold { font-weight: 700; }

/* ANIMATIONS */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.6; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* BATCH UPLOAD - SELECTED FILES STAGING */
.selected-files-container {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
}

.selected-files-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.selected-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.selected-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.selected-file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.file-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.file-info-compact .file-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info-compact .file-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-remove-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.file-remove-btn:hover {
    color: var(--danger);
}

/* BATCH PROCESSING - QUEUE DASHBOARD */
.queue-container {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(24, 26, 32, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    gap: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.queue-item:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 190, 0, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.queue-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.queue-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.queue-item-category {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-weight: 500;
}

.queue-item-status-text {
    font-style: italic;
    color: var(--primary);
}

.queue-item-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.status-badge.pending {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-muted);
}

.status-badge.processing {
    background: rgba(255, 190, 0, 0.1);
    color: var(--primary);
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-spinner {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid rgba(255, 190, 0, 0.2);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* LIGHT MODE OVERRIDES */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"] {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #111827;
}

[data-theme="light"] input[type="text"]:focus,
[data-theme="light"] input[type="password"]:focus,
[data-theme="light"] input[type="number"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: white;
}

[data-theme="light"] .input-readonly {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--text-muted) !important;
}

[data-theme="light"] .selector-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .category-option input[type="radio"]:checked + .selector-card {
    background: rgba(255, 190, 0, 0.1);
    border-color: var(--primary);
}

[data-theme="light"] .drop-zone {
    border: 2px dashed rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.4);
}

[data-theme="light"] .drop-zone:hover, [data-theme="light"] .drop-zone.dragover {
    background: rgba(255, 190, 0, 0.05);
}

[data-theme="light"] .selected-file-card,
[data-theme="light"] .selected-files-container,
[data-theme="light"] .selected-file-item {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .selected-file-item:hover {
    background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .waveform-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .metadata-section {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .queue-item {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .queue-item:hover {
    border-color: rgba(217, 155, 0, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .queue-item-category {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .orb-1 {
    background: radial-gradient(circle, rgba(255, 190, 0, 0.15) 0%, transparent 70%);
}

[data-theme="light"] .orb-2 {
    background: radial-gradient(circle, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
}

[data-theme="light"] .stars {
    opacity: 0.04;
}

[data-theme="light"] .btn-outline {
    color: var(--text-main);
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .logo-img {
    box-shadow: 0 0 15px rgba(217, 155, 0, 0.2);
}

[data-theme="light"] .logo-img:hover {
    box-shadow: 0 0 20px rgba(217, 155, 0, 0.35);
}

/* MUSICBRAINZ MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    transition: opacity 0.25s ease;
}

.modal-content {
    width: 100%;
    max-width: 600px;
    border-radius: 1.25rem;
    overflow: hidden;
    animation: modal-fade-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--panel-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
}

/* Results Container */
.mb-results-container {
    max-height: 280px;
    overflow-y: auto;
    margin-top: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s;
}

[data-theme="light"] .mb-results-container {
    background: rgba(0, 0, 0, 0.03);
}

.mb-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--panel-border);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
}

.mb-result-item:last-child {
    border-bottom: none;
}

.mb-result-item:hover {
    background: var(--primary-glow);
}

.mb-result-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
    padding-right: 5rem;
}

.mb-result-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mb-result-score {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 0.15rem 0.5rem;
    border-radius: var(--border-radius-badge, 9999px);
    border: 1px solid rgba(255, 190, 0, 0.2);
}

.mb-no-results {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.mb-loader {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}


