/* Karaoke 3D Studio v5 - Main Stylesheet */
/* Extracted from inline <style> in studio_v5.html */

/* Inherited from v4 CSS */
body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    color: white;
}

/*
    Header */
#step-header {
    background: #1a1a1a;
    padding: 10px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 100;
}

button {
    background: #333;
    color: white;
    border: 1px solid #444;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background: #444;
}

#btn-step-upload {
    background: #00aaaa;
    border: none;
}

#btn-step-upload:hover {
    background: #00cccc;
}

/* Workspace */
#workspace {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #121212;
    position: relative;
}

#monitor {
    width: 1280px;
    height: 720px;
    background: transparent;
    /* ✅ IMPORTANT: Transparent so video shows through */
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Layers
    */
#video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* ✅ Behind everything */
    pointer-events: none;
    display: none;
    /* Controlled by JS */
}

#butterchurn-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* ✅ Behind Three.js renderer (z-index: 10) — shows through transparent areas */
    display: none;
    /* mix-blend-mode removed — transparent renderer lets BC show through naturally */
}

#lyric-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    /* ✅ Top */
    pointer-events: none;
}

/* Timeline */
#timeline-container {
    width: 100%;
    height: 300px;
    background:
        #0a0a0a;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position:
        relative;
    z-index: 10;
}

.timeline-header {
    height: 40px;
    background: #141414;
    border-bottom: 1px solid #222;
    display: flex;
    align-items: center;
    padding: 0 10px;
    justify-content: space-between;
}

.tl-controls button {
    background: #333;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
}

.timeline-body {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: auto;
}

.tl-ruler {
    height: 24px;
    background: #111;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 50;
}

.tl-tracks-container {
    position: relative;
    min-height: 200px;
}

.tl-track {
    height: 64px;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
    background: #0d0d0d;
    display: flex;
    margin-bottom:
        2px;
}

.tl-track-label {
    display: none;
}

.tl-track-content {
    flex: 1;
    position: relative;
    overflow:
        visible;
    background-image: linear-gradient(90deg, #222 1px, transparent 1px);
    background-size: 50px 100%;
}

.tl-element {
    position: absolute;
    height: 56px;
    top: 4px;
    border-radius: 6px;
    overflow: visible;
    cursor:
        pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition:
        border-color 0.1s, transform 0.1s;
}

.tl-element.selected {
    border: 2px solid #00d9ff;
    box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.3);
    z-index: 10;
}

.tl-resize-handle {
    width: 10px;
    height: 100%;
    position: absolute;
    top: 0;
    cursor: col-resize;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0.5;
}

.tl-resize-handle:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

.tl-resize-handle.left {
    left:
        0;
    background: rgba(255, 0, 0, 0.1);
}

.tl-resize-handle.right {
    right: 0;
    background: rgba(0, 255, 0, 0.1);
}

.tl-content {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items:
        center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.tl-label {
    font-size: 11px;
    color:
        white;
    text-shadow: 0 1px 2px black;
    font-weight: bold;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.tl-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ff4444;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 4px #ff0000;
}

/* Global Player */
#global-player {
    height: 90px;
    background: #181818;
    border-top: 1px solid #282828;
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    color: white;
    z-index: 100;
}

.gp-left,
.gp-center,
.gp-right {
    display:
        flex;
    align-items: center;
    gap: 10px;
}

.gp-left {
    width: 25%;
}

.gp-center {
    width: 40%;
    flex-direction:
        column;
    justify-content: center;
}

.gp-right {
    width: 35%;
    justify-content: flex-end;
}

.album-art {
    width:
        56px;
    height: 56px;
    background: #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.track-text h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.track-text p {
    margin: 4px 0 0 0;
    font-size: 11px;
    color: #b3b3b3;
}

.controls-main {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 5px;
}

.btn-icon {
    background: none;
    border: none;
    color:
        #b3b3b3;
    cursor: pointer;
    font-size: 16px;
}

.btn-icon:hover {
    color: white;
}

.btn-play-circle {
    width:
        32px;
    height: 32px;
    background: white;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #b3b3b3;
}

.progress-bar-bg {
    flex: 1;
    height: 12px;
    background: #4d4d4d;
    border-radius: 6px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 2px;
}

.tool-btn {
    background: #2a2a2a;
    color: white;
    border: 1px solid #3e3e3e;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
}

.tool-btn:hover {
    background: #3e3e3e;
    border-color: #555;
}

.btn-rec {
    color: #ff5555;
    border-color: #ff5555;
    background:
        rgba(255, 85, 85, 0.1);
}

.btn-rec:hover {
    background: #ff5555;
    color: white;
}

#rec-settings-menu {
    display: none;
    position: absolute;
    bottom: 90px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    width: 220px;
    z-index: 200;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

#rec-settings-menu.active {
    display: block;
}

.rs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    color: #ccc;
}

.rs-row select,
.rs-row input {
    background: #333;
    border: 1px solid #444;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    width: 80px;
}

/* --- Countdown Overlay Styles --- */
#countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.countdown-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Glassmorphism tint */
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 25vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.5);
    transform: translateX(100%);
    /* Start off-screen right */
    will-change: transform;
}

/* Animation: Slide In from Right -> Pause -> Slide Out Left */
/* Total duration 1s per number */
.countdown-slide-right {
    animation: slidePanel 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes slidePanel {
    0% {
        transform: translateX(100%);
        opacity: 1;
    }

    15% {
        transform: translateX(0%);
    }

    85% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
        opacity: 1;
    }
}

/* Animation: Zoom Pulse - Scale up then down */
.countdown-zoom-pulse {
    animation: zoomPulse 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes zoomPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    20% {
        transform: scale(1.3);
        opacity: 1;
    }

    40% {
        transform: scale(0.95);
    }

    60% {
        transform: scale(1.05);
    }

    80% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Animation: Fade & Bounce - Drop from top with bounce */
.countdown-fade-bounce {
    animation: fadeBounce 0.95s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeBounce {
    0% {
        transform: translateY(-100%) scale(1.2);
        opacity: 0;
    }

    25% {
        transform: translateY(10%) scale(1);
        opacity: 1;
    }

    40% {
        transform: translateY(-8%);
    }

    55% {
        transform: translateY(4%);
    }

    70% {
        transform: translateY(0%);
    }

    85% {
        transform: translateY(0%);
        opacity: 1;
    }

    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Animation: Spin In - Rotate while scaling */
.countdown-spin-in {
    animation: spinIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes spinIn {
    0% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }

    30% {
        transform: rotate(15deg) scale(1.1);
        opacity: 1;
    }

    50% {
        transform: rotate(-5deg) scale(1);
    }

    70% {
        transform: rotate(0deg);
    }

    85% {
        transform: rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: rotate(180deg) scale(0);
        opacity: 0;
    }
}

/* Animation: Neon Flash - Flicker with glow */
.countdown-neon-flash {
    animation: neonFlash 0.95s ease-out forwards;
}

@keyframes neonFlash {
    0% {
        transform: scale(2);
        opacity: 0;
        filter: blur(20px) brightness(3);
    }

    15% {
        transform: scale(1);
        opacity: 1;
        filter: blur(0) brightness(1);
    }

    25% {
        filter: brightness(2);
    }

    35% {
        filter: brightness(1);
    }

    45% {
        filter: brightness(1.5);
    }

    55% {
        filter: brightness(1);
    }

    85% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
        filter: blur(10px);
    }
}

/* ========== MOTION EFFECTS PACK ========== */

/* Spiral In - Numbers spiral from corner */
.countdown-spiral-in {
    animation: spiralIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes spiralIn {
    0% {
        transform: translate(-100%, -100%) rotate(-360deg) scale(0);
        opacity: 0;
    }

    25% {
        transform: translate(5%, 5%) rotate(15deg) scale(1.1);
        opacity: 1;
    }

    50% {
        transform: translate(-2%, -2%) rotate(-5deg) scale(1);
    }

    75% {
        transform: translate(0, 0) rotate(0deg);
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translate(100%, 100%) rotate(360deg) scale(0);
        opacity: 0;
    }
}

/* Glitch / VHS - Digital distortion */
.countdown-glitch {
    animation: glitchIn 0.95s steps(1) forwards;
}

@keyframes glitchIn {
    0% {
        transform: translate(0) scale(0);
        opacity: 0;
        clip-path: inset(0 0 100% 0);
    }

    10% {
        transform: translate(-5px, 3px) skewX(5deg) scale(1);
        opacity: 1;
        clip-path: inset(0 0 0 0);
        filter: hue-rotate(90deg);
    }

    20% {
        transform: translate(5px, -3px) skewX(-3deg);
        filter: hue-rotate(0deg);
    }

    30% {
        transform: translate(-3px, 0) skewX(2deg);
        filter: hue-rotate(-60deg);
    }

    40% {
        transform: translate(0) skewX(0);
        filter: hue-rotate(0deg);
    }

    80% {
        transform: translate(0);
        opacity: 1;
    }

    85% {
        transform: translate(3px, -2px) skewX(-5deg);
        filter: hue-rotate(120deg);
    }

    90% {
        transform: translate(-4px, 2px) skewX(3deg);
        clip-path: inset(20% 0 30% 0);
    }

    100% {
        transform: translate(0) scale(0);
        opacity: 0;
        filter: hue-rotate(0deg);
    }
}

/* 3D Flip - Card flip effect */
.countdown-3d-flip {
    animation: flip3D 0.95s ease-in-out forwards;
    transform-style: preserve-3d;
}

@keyframes flip3D {
    0% {
        transform: perspective(1000px) rotateY(-90deg) scale(0.5);
        opacity: 0;
    }

    30% {
        transform: perspective(1000px) rotateY(10deg) scale(1.05);
        opacity: 1;
    }

    50% {
        transform: perspective(1000px) rotateY(-5deg) scale(1);
    }

    70% {
        transform: perspective(1000px) rotateY(0deg);
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: perspective(1000px) rotateY(90deg) scale(0.5);
        opacity: 0;
    }
}

/* Shatter - Appear then shatter */
.countdown-shatter {
    animation: shatterIn 0.95s ease-out forwards;
}

@keyframes shatterIn {
    0% {
        transform: scale(0);
        opacity: 0;
        filter: blur(10px);
    }

    20% {
        transform: scale(1.2);
        opacity: 1;
        filter: blur(0);
    }

    40% {
        transform: scale(1);
    }

    75% {
        transform: scale(1);
        opacity: 1;
    }

    85% {
        transform: scale(1.1);
        filter: contrast(2);
    }

    100% {
        transform: scale(3) rotate(15deg);
        opacity: 0;
        filter: blur(20px) brightness(3);
    }
}

/* ========== VISUAL EFFECTS PACK ========== */

/* Fire Glow - Animated fire effect */
.countdown-fire {
    animation: fireGlow 0.95s ease-out forwards;
    text-shadow: 0 0 20px #ff4400, 0 0 40px #ff6600, 0 0 60px #ff8800;
}

@keyframes fireGlow {
    0% {
        transform: scale(0) translateY(50px);
        opacity: 0;
        filter: brightness(2);
    }

    25% {
        transform: scale(1.1) translateY(-10px);
        opacity: 1;
    }

    50% {
        transform: scale(1) translateY(5px);
    }

    60% {
        transform: translateY(-3px);
    }

    70% {
        transform: translateY(2px);
    }

    80% {
        transform: translateY(0);
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: scale(0) translateY(-100px);
        opacity: 0;
    }
}

/* Electric Spark - Lightning effect */
.countdown-electric {
    animation: electricSpark 0.95s steps(2) forwards;
    text-shadow: 0 0 10px #00ffff, 0 0 20px #0088ff, 0 0 40px #00ffff;
}

@keyframes electricSpark {
    0% {
        transform: scale(0);
        opacity: 0;
        filter: brightness(5);
    }

    10% {
        transform: scale(1.3) skewX(5deg);
        opacity: 1;
        filter: brightness(2);
    }

    15% {
        transform: scale(0.95) skewX(-3deg);
        filter: brightness(0.5);
    }

    20% {
        transform: scale(1.1) skewX(2deg);
        filter: brightness(3);
    }

    25% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        filter: brightness(2);
    }

    55% {
        filter: brightness(0.8);
    }

    60% {
        filter: brightness(1.5);
    }

    80% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        transform: scale(0.5);
        opacity: 0;
        filter: brightness(5) blur(10px);
    }
}

/* Ripple - Water ripple effect */
.countdown-ripple {
    animation: rippleIn 0.95s ease-out forwards;
}

@keyframes rippleIn {
    0% {
        transform: scale(3);
        opacity: 0;
        filter: blur(20px);
    }

    20% {
        transform: scale(0.9);
        opacity: 1;
        filter: blur(0);
    }

    40% {
        transform: scale(1.1);
    }

    55% {
        transform: scale(0.95);
    }

    70% {
        transform: scale(1.02);
    }

    85% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
        filter: blur(15px);
    }
}

/* ========== STYLIZED EFFECTS PACK ========== */

/* Cinematic Bars - Letterbox style */
.countdown-cinematic {
    animation: cinematicIn 0.95s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cinematicIn {
    0% {
        transform: scaleX(0);
        opacity: 0;
    }

    20% {
        transform: scaleX(1.1);
        opacity: 1;
    }

    40% {
        transform: scaleX(1);
    }

    80% {
        transform: scaleX(1);
        opacity: 1;
    }

    100% {
        transform: scaleX(0);
        opacity: 0;
    }
}

/* Retro Pixelate - 8-bit style */
.countdown-retro {
    animation: retroPixel 0.95s steps(8) forwards;
    image-rendering: pixelated;
    font-family: 'Courier New', monospace;
}

@keyframes retroPixel {
    0% {
        transform: scale(0);
        opacity: 0;
        filter: contrast(2) saturate(2);
    }

    15% {
        transform: scale(1.2);
        opacity: 1;
    }

    30% {
        transform: scale(1);
    }

    70% {
        transform: scale(1);
        opacity: 1;
    }

    85% {
        filter: contrast(3) saturate(3) brightness(1.5);
    }

    100% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
}

/* Rainbow Wave - Color cycling */
.countdown-rainbow {
    animation: rainbowWave 0.95s linear forwards;
}

@keyframes rainbowWave {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
        filter: hue-rotate(0deg);
    }

    20% {
        transform: scale(1.1) rotate(5deg);
        opacity: 1;
        filter: hue-rotate(60deg);
    }

    40% {
        transform: scale(1) rotate(-3deg);
        filter: hue-rotate(120deg);
    }

    60% {
        transform: scale(1.02) rotate(0deg);
        filter: hue-rotate(180deg);
    }

    80% {
        transform: scale(1);
        opacity: 1;
        filter: hue-rotate(240deg);
    }

    100% {
        transform: scale(0) rotate(30deg);
        opacity: 0;
        filter: hue-rotate(360deg);
    }
}

/* Starburst - Radiating glow */
.countdown-starburst {
    animation: starburstIn 0.95s ease-out forwards;
}

@keyframes starburstIn {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
        filter: brightness(0);
    }

    15% {
        transform: scale(1.3) rotate(10deg);
        opacity: 1;
        filter: brightness(3) drop-shadow(0 0 30px white);
    }

    30% {
        transform: scale(0.95) rotate(-5deg);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05) rotate(2deg);
    }

    70% {
        transform: scale(1) rotate(0deg);
    }

    85% {
        opacity: 1;
        filter: drop-shadow(0 0 20px currentColor);
    }

    100% {
        transform: scale(2) rotate(45deg);
        opacity: 0;
        filter: brightness(5) blur(10px);
    }
}

/* Lyric Entry Animation */
.lyric-slide-in {
    animation: lyricEntry 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lyricEntry {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#step-header button {
    background: #222;
    border: 1px solid #444;
    color: #ddd;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 4px;
    margin-right: 5px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

#user-info {
    position: absolute;
    right: 20px;
    top: 15px;
    display: flex;
    align-items:
        center;
    gap: 12px;
    color: #ccc;
    font-size: 13px;
}

.lrc-dropdown-item:hover {
    background: #333 !important;
}

/* ========== MOBILE RESPONSIVE ========== */
@media screen and (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Header - clean single row */
    #step-header {
        padding: 4px 6px;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    #step-header::-webkit-scrollbar {
        display: none;
    }

    #step-header button {
        padding: 4px 8px;
        font-size: 10px;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 28px;
    }

    /* Hide non-essential header buttons on mobile */
    #btn-suno-import,
    #btn-add-effect,
    #btn-add-threejs,
    #btn-add-vanta,
    #btn-add-bg-effects,
    #btn-audio-viz,
    #btn-download-lrc-menu {
        display: none !important;
    }

    /* Hide channel selector in player bar on mobile */
    #btn-chan-prev,
    #btn-chan-next,
    #channel-search-wrapper {
        display: none !important;
    }

    #step-header>div[style*="flex:1"] {
        display: none;
    }

    #btn-step-upload {
        min-width: 100px !important;
        font-size: 11px !important;
    }

    /* Workspace */
    #workspace {
        flex: none;
        height: auto;
        min-height: 0;
    }

    /* Monitor - 9:16 portrait */
    #monitor {
        width: 100vw !important;
        height: calc(100vw * 16 / 9) !important;
        max-height: 65vh;
        box-shadow: none;
    }

    /* Timeline - compact */
    #timeline-container {
        height: 120px;
        min-height: 100px;
    }

    .tl-track {
        height: 40px;
    }

    .tl-element {
        height: 34px;
        top: 3px;
    }

    .timeline-header {
        height: 28px;
        padding: 0 6px;
        font-size: 11px;
    }

    .tl-ruler {
        height: 18px;
    }

    /* Global Player - compact */
    #global-player {
        height: auto;
        min-height: 50px;
        padding: 4px 8px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .gp-left {
        width: auto;
        flex: 0 0 auto;
    }

    .gp-center {
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .gp-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }

    .album-art {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .track-text h4 {
        font-size: 10px;
    }

    .track-text p {
        font-size: 8px;
    }

    .controls-main {
        gap: 10px;
        margin-bottom: 0;
    }

    .btn-play-circle {
        width: 26px;
        height: 26px;
    }

    .progress-container {
        font-size: 9px;
        gap: 4px;
    }

    .progress-bar-bg {
        height: 6px;
    }

    .tool-btn {
        padding: 3px 6px;
        font-size: 9px;
    }

    #welcome-msg {
        font-size: 14px !important;
        padding: 0 16px;
        text-align: center;
    }

    #demo-dropdown-menu {
        font-size: 11px;
    }

    #demo-dropdown-menu button {
        padding: 6px 10px;
        font-size: 11px;
    }

    .props-panel,
    #lyric-props-panel {
        width: 90vw !important;
        max-width: 350px;
        left: 50% !important;
        transform: translateX(-50%);
    }

    #rec-settings-menu {
        right: 5px;
        bottom: 60px;
        width: 180px;
    }

    #user-info {
        position: static;
        justify-content: center;
        padding: 2px;
        font-size: 10px;
    }
}

/* Extra small mobile */
@media screen and (max-width: 480px) {
    #step-header button {
        padding: 3px 5px;
        font-size: 9px;
        min-height: 24px;
    }

    #btn-step-upload {
        min-width: 80px !important;
    }

    #monitor {
        max-height: 60vh;
    }

    #timeline-container {
        height: 100px;
    }

    .tl-track {
        height: 32px;
    }

    .tl-element {
        height: 26px;
        top: 3px;
        border-radius: 4px;
    }

    .gp-right {
        gap: 3px;
    }

    .tool-btn {
        padding: 2px 5px;
        font-size: 8px;
    }

    /* Lyric properties panel - position below timeline, not over canvas */
    #lyric-props-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 50vh;
        overflow-y: auto;
        border-radius: 12px 12px 0 0 !important;
        z-index: 2000 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8) !important;
    }
}