:root {
    --bg-dark: #0f172a;
    --bg-panel: rgba(30, 41, 59, 0.7);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --accent: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    
    --track-h: 55px; /* Reduced from 80px to fit 10 tracks */
    --ruler-h: 30px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #1e1b4b, var(--bg-dark));
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* VIEWS */
.studio-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.view {
    display: none;
    height: 100%;
    width: 100%;
}
.view.active {
    display: flex;
    flex-direction: column;
}

/* =========================================
   UPLOAD VIEW (LANDING PAGE)
   ========================================= */
#upload-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #0f172a; /* Deep dark blue */
    position: relative;
    overflow: hidden;
}

#upload-view.active {
    display: flex;
}

/* BRAND LOGO */
.brand-logo {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 100;
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #a78bfa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.4);
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px rgba(167, 139, 250, 0.2)); }
    100% { filter: drop-shadow(0 0 15px rgba(52, 211, 153, 0.6)); }
}

/* DYNAMIC BACKGROUND */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    animation: floatOrb 10s infinite alternate ease-in-out;
}

.orb-1 {
    width: 400px; height: 400px;
    background: rgba(139, 92, 246, 0.4);
    top: -100px; left: -100px;
}

.orb-2 {
    width: 500px; height: 500px;
    background: rgba(16, 185, 129, 0.2);
    bottom: -150px; right: -100px;
    animation-delay: -5s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* PREMIUM CARD */
.premium-card {
    position: relative;
    z-index: 10;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    padding: 4rem 3rem;
    border-radius: 24px;
    max-width: 550px;
    width: 90%;
    text-align: center;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* INTERACTIVE BUTTON */
.interactive-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.interactive-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.interactive-btn:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 15px 30px -10px rgba(139, 92, 246, 0.3);
}

.interactive-btn:hover::before {
    transform: translateX(100%);
}

.interactive-btn .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s;
}

.interactive-btn:hover .icon {
    transform: scale(1.2) rotate(-5deg);
}

.loading-state {
    display: none;
    margin-top: 2rem;
}

.loading-state.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* =========================================
   STUDIO VIEW
   ========================================= */
.studio-header {
    height: 70px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.brand-text-sm {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #a78bfa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(167, 139, 250, 0.3);
}

.header-divider {
    width: 2px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    margin: 0 15px;
    border-radius: 2px;
}

#song-title {
    font-size: 0.95rem; /* Smaller font for song title */
    font-weight: 500;
    color: var(--text-muted); /* Less prominent color */
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-left { display: flex; align-items: center; }
.controls { display: flex; gap: 1rem; }

.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.secondary { background: rgba(255,255,255,0.1); color: white; }
.btn.secondary:hover { background: rgba(255,255,255,0.2); }
.btn.success { background: var(--accent); color: white; }



