:root {
    --bg: #050505;
    --panel: rgba(18, 18, 18, 0.7);
    --accent: #1fb5ff;
    --accent-alt: #a855f7;
    --text: #ffffff;
    --text-dim: #555555;
    --glass-border: rgba(255, 255, 255, 0.05);
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Atmospheric Glow */
.atmosphere {
    position: fixed;
    inset: 0;
    background-color: #050308;
    background: url('../img/finale-bg.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    filter: brightness(0.4) saturate(1.2);
}

.atmosphere::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(5,3,8,0.6) 100%);
}

.main-app {
    width: 1200px;
    height: 800px;
    background: var(--panel);
    backdrop-filter: blur(100px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    position: relative;
    box-shadow: 0 100px 200px rgba(0,0,0,0.8);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(10, 10, 10, 0.4);
    border-right: 1px solid var(--glass-border);
    padding: 60px 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-branding {
    padding: 0 10px; /* Reduced padding for larger logo */
    margin-bottom: 80px;
    display: flex;
    justify-content: center;
}

.sidebar-branding img {
    width: 260px; /* Even larger logo */
    height: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(31, 181, 255, 0.3));
}

.nav-item {
    padding: 18px 40px;
    margin-bottom: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
}

.nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.6;
}

.nav-item .chevron {
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0;
    transition: 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.nav-item:hover .chevron {
    opacity: 0.5;
}

.nav-item.active {
    background: rgba(31, 181, 255, 0.08);
    color: var(--text);
    border-left: 4px solid var(--accent); /* Blue accent */
}

.nav-item.active .chevron {
    opacity: 1;
}

/* The Sphere (Aura Core) */
.aura-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Prevent top-cutoff on tall content */
    padding: 60px;
    overflow-y: auto;
}

.aura-core {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31, 181, 255, 0.1) 0%, transparent 70%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.aura-glow {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 100px rgba(31, 181, 255, 0.1), inset 0 0 50px rgba(31, 181, 255, 0.05);
    animation: aura-pulse 4s infinite alternate ease-in-out;
}

@keyframes aura-pulse {
    from { transform: scale(0.98); opacity: 0.4; }
    to { transform: scale(1.05); opacity: 0.8; }
}

.aura-rings {
    position: absolute;
    width: 110%; height: 110%;
    border: 2px solid rgba(31, 181, 255, 0.25);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(31, 181, 255, 0.15);
    pointer-events: none;
}

/* Modern Typography */
h1 {
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -2px;
    margin: 0;
}

.status-line {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-top: 20px;
    padding-left: 40px; /* Moved away from left edge */
    opacity: 0.8;
}

/* Actions */
.footer-actions {
    position: absolute;
    bottom: 60px;
    right: 60px;
    display: flex;
    gap: 20px;
}

.btn-aura {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-aura:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: black;
}

/* Settings & Track Config */
.settings-panel {
    background: rgba(10, 10, 10, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    width: 100%;
    max-width: 800px;
}

.track-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.8rem;
    color: var(--text-dim);
    transition: 0.2s;
}

.track-item:hover {
    background: rgba(255,255,255,0.02);
    color: var(--text);
}

.track-type-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Outfit';
    cursor: pointer;
}

.track-name {
    flex: 1;
    margin: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-track {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 10px;
}

.remove-track:hover {
    color: #ff4444;
}

#qspP2Terminal {
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 181, 255, 0.2) transparent;
}

#qspP2Terminal::-webkit-scrollbar { width: 4px; }
#qspP2Terminal::-webkit-scrollbar-thumb { background: rgba(31, 181, 255, 0.2); border-radius: 10px; }

/* ── Selection Matrix ── */
.selection-matrix {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 15px;
    margin-top: 15px;
}

.selection-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.selection-row:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(31, 181, 255, 0.2);
    transform: translateX(8px);
}

.selection-row.active {
    background: rgba(31, 181, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(31, 181, 255, 0.15);
}

.selection-row.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent);
}

.selection-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.8rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.selection-row:hover .selection-icon {
    background: rgba(31, 181, 255, 0.1);
    transform: scale(1.05);
}

.selection-row.active .selection-icon {
    background: rgba(31, 181, 255, 0.15);
    border-color: rgba(31, 181, 255, 0.3);
}

.selection-info {
    flex: 1;
}

.selection-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.selection-sub {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.selection-check {
    opacity: 0;
    color: var(--accent);
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.selection-row.active .selection-check {
    opacity: 1;
    transform: scale(1);
}

.selection-matrix::-webkit-scrollbar { width: 4px; }
.selection-matrix::-webkit-scrollbar-thumb { background: rgba(31, 181, 255, 0.15); border-radius: 10px; }




/* ==========================================
   Animated Black Hole & Lucide Icon Orbitals
   ========================================== */
.orbit-spin-1 {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    border: 1px solid transparent;
    border-top-color: rgba(168, 85, 247, 0.5);
    border-left-color: rgba(167, 139, 250, 0.4);
    animation: spin-clockwise 10s linear infinite;
    pointer-events: none;
}

.orbit-spin-2 {
    position: absolute;
    width: 95%;
    height: 95%;
    border-radius: 50%;
    border: 1px solid transparent;
    border-bottom-color: rgba(31, 181, 255, 0.4);
    border-right-color: rgba(31, 181, 255, 0.3);
    animation: spin-clockwise 15s linear infinite reverse;
    pointer-events: none;
}

@keyframes spin-clockwise { 
    100% { transform: rotate(360deg); } 
}

.dropzone-outer-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: inset 0 0 30px rgba(139, 92, 246, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.dropzone-inner-ring {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    border: 4px solid var(--accent, #8b5cf6);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3), inset 0 0 30px rgba(139, 92, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

.upload-zone.drag-over .dropzone-inner-ring, .dropzone-inner-ring:hover {
    transform: scale(1.05);
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    box-shadow: 0 0 45px rgba(139, 92, 246, 0.6), inset 0 0 45px rgba(139, 92, 246, 0.3);
    border-color: var(--accent, #a78bfa);
}

.icon-wrapper {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    animation: suck-in linear infinite;
    z-index: 5;
    pointer-events: none;
}

@keyframes suck-in {
    0% { transform: translate(var(--startX), var(--startY)) scale(0.5); opacity: 0; }
    20% { opacity: 1; transform: translate(calc(var(--startX) * 0.8), calc(var(--startY) * 0.8)) scale(1.2); }
    80% { opacity: 0.8; transform: translate(calc(var(--startX) * 0.2), calc(var(--startY) * 0.2)) scale(0.8); }
    100% { transform: translate(0, 0) scale(0); opacity: 0; }
}

.w-1 { --startX: -150px; --startY: -100px; animation-duration: 4s; animation-delay: 0s; }
.w-2 { --startX: 150px;  --startY: -120px; animation-duration: 5s; animation-delay: 1.5s; }
.w-3 { --startX: -180px; --startY: 80px;   animation-duration: 4.5s; animation-delay: 0.7s; }
.w-4 { --startX: 160px;  --startY: 100px;  animation-duration: 5.5s; animation-delay: 2.1s; }
.w-5 { --startX: -100px; --startY: 160px;  animation-duration: 4.2s; animation-delay: 3s; }
.w-6 { --startX: 120px;  --startY: 140px;  animation-duration: 4.8s; animation-delay: 0.4s; }
.w-7 { --startX: -50px;  --startY: -180px; animation-duration: 5.2s; animation-delay: 1.8s; }
.w-8 { --startX: 60px;   --startY: -160px; animation-duration: 4.6s; animation-delay: 2.7s; }



/* ==========================================
   Session Setup (Stage 2) Layout Styles
   ========================================== */
#stage-2.active {
    display: flex !important;
}

.obsidian-panel { 
    background: rgba(13, 15, 24, 0.7); 
    backdrop-filter: blur(40px); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 16px; 
    padding: 16px; 
}

.btn {
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    padding: 8px 16px;
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 0.8rem; 
    cursor: pointer;
    transition: 0.3s; 
    text-decoration: none; 
    border: 1px solid transparent;
}
.btn-primary { 
    background: var(--accent); 
    color: #000; 
}
.btn-primary:hover { 
    background: #5ed2ff; 
    box-shadow: 0 0 20px rgba(31, 181, 255, 0.3); 
}
.btn-ghost { 
    background: rgba(255,255,255,0.05); 
    color: #fff; 
    border-color: rgba(255,255,255,0.1); 
}
.btn-ghost:hover { 
    background: rgba(255,255,255,0.1); 
}

.stat-block { 
    text-align: center; 
}
.stat-value { 
    font-family: 'Space Mono', monospace; 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: #fff; 
}
.stat-label { 
    font-size: 0.55rem; 
    color: rgba(255,255,255,0.4); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-top: 2px; 
}

.status-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.78rem; 
    color: rgba(255,255,255,0.8); 
    margin-bottom: 8px; 
}
.status-item i { 
    font-size: 0.8rem; 
}
.status-success { 
    color: #4ade80; 
}
.status-warning { 
    color: #fbbf24; 
}
.status-info { 
    color: var(--accent); 
}

.tracks-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 10px; 
}
.tracks-table th { 
    text-align: left; 
    font-size: 0.6rem; 
    color: rgba(255, 255, 255, 0.4); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    padding: 8px 10px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
}
.tracks-table td { 
    padding: 8px 10px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.03); 
    font-size: 0.78rem; 
    vertical-align: middle; 
}
.tracks-table tr:hover { 
    background: rgba(255,255,255,0.02); 
}
.track-row.selected { 
    background: rgba(31, 181, 255, 0.08) !important; 
}

.tag-pill { 
    background: rgba(31, 181, 255, 0.1); 
    color: var(--accent); 
    padding: 3px 8px; 
    border-radius: 6px; 
    font-size: 0.7rem; 
    border: 1px solid rgba(31, 181, 255, 0.2); 
}
.status-dot { 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 0.65rem; 
}
.status-dot.check { 
    border: 1.5px solid #4ade80; 
    color: #4ade80; 
}
.status-dot.warn { 
    border: 1.5px solid #fbbf24; 
    color: #fbbf24; 
}

.tag-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 6px; 
    margin-top: 10px; 
}
.tag-btn { 
    background: rgba(255,255,255,0.03); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 8px; 
    padding: 8px 10px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    color: rgba(255,255,255,0.6); 
    font-size: 0.7rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.2s; 
}
.tag-btn:hover { 
    background: rgba(255,255,255,0.08); 
    color: #fff; 
}
.tag-btn.active { 
    background: rgba(31, 181, 255, 0.1); 
    border-color: var(--accent); 
    color: var(--accent); 
}
.tag-btn i { 
    font-size: 0.85rem; 
    width: 16px; 
}

.radio-circle { 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    border: 2px solid rgba(255,255,255,0.2); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
}
.radio-circle.active { 
    border-color: var(--accent); 
}
.radio-circle.active::after { 
    content: ''; 
    width: 6px; 
    height: 6px; 
    background: var(--accent); 
    border-radius: 50%; 
}

.waveform-preview { 
    height: 25px; 
    background: rgba(31, 181, 255, 0.05); 
    border-radius: 8px; 
    position: relative; 
    overflow: hidden; 
    margin-top: 8px; 
    border: 1px solid rgba(31, 181, 255, 0.1); 
}
.waveform-bar { 
    position: absolute; 
    bottom: 0; 
    background: var(--accent); 
    opacity: 0.4; 
}

.tag-pill.untagged {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.06);
}

