/* ========================================== */
/* MegaOke Karaoke Player - Stylesheet        */
/* Premium Dark Theme with Cyan Accents       */
/* ========================================== */

/* --- IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Outfit:wght@400;600;700;900&display=swap');

/* --- DESIGN TOKENS --- */
:root {
    --bg-color: #000000;
    --bg-surface: #0a0a0f;
    --bg-card: rgba(10, 10, 20, 0.95);
    --text-color: #ffffff;
    --text-muted: #a1a1aa;
    --accent-color: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --accent-secondary: #7c3aed;
    --score-gold: #ffd700;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --setup-bg: rgba(0, 0, 80, 0.92);
    --setup-highlight: #c8c832;
    --setup-active: #ff3232;

    --font-main: 'Outfit', 'Inter', Arial, sans-serif;
    --font-code: 'Courier New', monospace;
    --font-lyrics: 'Segoe UI', 'Arial Black', sans-serif;

    /* Font sizes - calibrated for 1080p fullscreen */
    --fs-huge: 21.3vh;
    --fs-big: 14.8vh;
    --fs-meta: 12.8vh;
    --fs-widget: 5.5vh;
    --fs-lyric: 10vh;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    user-select: none;
    -webkit-user-select: none;
}

/* --- VIEWPORT / MAIN CONTAINER --- */
#viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

/* --- BACKGROUND LAYERS --- */
#bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

#bg-animation {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #0a0015 0%, #000020 30%, #001a2e 60%, #0a0015 100%);
    overflow: hidden;
}

#bg-animation::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(0, 229, 255, 0.05) 0%, transparent 50%);
    animation: bg-drift 20s ease-in-out infinite;
}

#bg-animation::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300e5ff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

@keyframes bg-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-2%, 1%) rotate(0.5deg); }
    50% { transform: translate(1%, -1%) rotate(-0.3deg); }
    75% { transform: translate(-1%, 2%) rotate(0.2deg); }
}

/* Particle canvas for animated background */
#particles-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- UI LAYER (Z: 10) --- */
#ui-layer {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    pointer-events: none;
}

.hidden { display: none !important; }
.active { display: block !important; }

/* --- WIDGETS (Z: 15) --- */
.ui-widget {
    position: absolute;
    z-index: 15;
    pointer-events: auto;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: var(--fs-widget);
    text-align: left;
    white-space: pre;
    line-height: 1;
}

/* Widget: Queue */
#widget-queue {
    top: 5.5vh;
    left: 3.1vw;
    display: flex;
    align-items: center;
}

.queue-row {
    display: flex;
    align-items: center;
    gap: 1vw;
}

#queue-count {
    color: yellow;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
}

#queue-list-text {
    display: flex;
    gap: 1.5vw;
    margin-left: 2vw;
}

.q-code {
    font-family: var(--font-main);
    color: white;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
}

.q-code.playing {
    color: red;
}

/* Widget: Input Display */
#widget-input {
    top: 11.5vh;
    left: 3.1vw;
    display: flex;
    align-items: center;
}

#input-display {
    color: var(--accent-color);
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
}

/* --- SCREENS (Z: 10) --- */
.ui-screen {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    display: none;
    z-index: 10;
}

/* --- SCREEN: IDLE --- */
#screen-idle {
    display: none;
    text-align: center;
}

.idle-content {
    position: absolute;
    width: 100%; height: 100%;
}

.idle-text {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--fs-big);
    font-weight: 900;
    color: white;
    -webkit-text-stroke: 0.4vh black;
    paint-order: stroke fill;
    white-space: nowrap;
    text-shadow: 0 0 3vh rgba(255,255,255,0.3);
}

.idle-code {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-code);
    font-size: var(--fs-huge);
    font-weight: bold;
    color: var(--accent-color);
    -webkit-text-stroke: 0.5vh black;
    paint-order: stroke fill;
    text-shadow: 0 0 5vh var(--accent-glow);
}

.idle-sub-container {
    position: absolute;
    top: 82%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.idle-sub {
    font-weight: bold;
    font-size: 6vh;
    color: yellow;
    -webkit-text-stroke: 0.25vh black;
    paint-order: stroke fill;
    text-align: center;
    line-height: 1.2;
    animation: idle-pulse 3s ease-in-out infinite;
}

@keyframes idle-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.02); }
}

/* --- SCREEN: PLAYING --- */
#screen-playing {
    display: none;
    z-index: 11;
}

/* Overlay: Metadata (Song Title + Artist) */
#overlay-metadata {
    position: absolute;
    top: 25%;
    left: 0;
    width: 100%;
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4vh;
    z-index: 12;
    animation: meta-fade-in 1s ease-out;
}

@keyframes meta-fade-in {
    from { opacity: 0; transform: translateY(3vh); }
    to { opacity: 1; transform: translateY(0); }
}

.meta-title {
    font-size: var(--fs-meta);
    font-weight: 900;
    color: var(--accent-color);
    -webkit-text-stroke: 0.25vh black;
    paint-order: stroke fill;
    line-height: 1.2;
    padding: 0 5vw;
    text-shadow: 0 0 3vh var(--accent-glow);
}

.meta-singer {
    font-size: 10.4vh;
    font-weight: bold;
    color: white;
    -webkit-text-stroke: 0.2vh black;
    paint-order: stroke fill;
}

/* Overlay: Countdown */
#overlay-countdown {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    white-space: nowrap;
    z-index: 14;
}

.cd-number {
    font-size: 23vh;
    font-weight: bold;
    -webkit-text-stroke: 1vh black;
    paint-order: stroke fill;
    color: var(--accent-color);
    text-shadow: 0 0 5vh var(--accent-glow);
}

.cd-text {
    font-size: 7.5vh;
    font-weight: bold;
    color: #00ffff;
    -webkit-text-stroke: 0.4vh black;
    paint-order: stroke fill;
}

/* Overlay: Status Bar (Loading) */
#overlay-status {
    position: absolute;
    top: 9vh;
    left: 50%;
    transform: translateX(-50%);
    width: 42vw;
    height: 7.5vh;
    background: rgba(0,0,0,0.8);
    border: 0.3vh solid white;
    display: flex;
    align-items: center;
    padding: 0 1.5vw;
    z-index: 16;
    backdrop-filter: blur(5px);
}

.status-label {
    font-size: 3.7vh;
    font-weight: bold;
    color: white;
    margin-right: 1.5vw;
    min-width: 13vw;
}

.status-bar-bg {
    flex: 1;
    height: 3.7vh;
    background: #333;
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}

.status-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #7c3aed);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* Overlay: Paused */
#overlay-paused {
    position: absolute;
    top: 5.5vh;
    left: 3.1vw;
    z-index: 20;
}

.pause-box {
    background: rgba(200, 0, 0, 0.85);
    color: white;
    font-size: var(--fs-widget);
    font-weight: bold;
    padding: 1vh 2vw;
    text-align: center;
    border-radius: var(--radius-sm);
    animation: pause-blink 1.5s ease-in-out infinite;
}

@keyframes pause-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* --- LYRICS OVERLAY (Z: 20) --- */
#lyrics-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none;
    padding-bottom: 16vh; /* Raised from 4vh to give room for bottom playback controls */
}

.lyric-line {
    width: 95%;
    text-align: center;
    font-family: var(--font-lyrics);
    font-weight: 900;
    font-size: var(--fs-lyric);
    line-height: 1.25;
    white-space: pre;
    min-height: 1.2em;
    display: block;
    -webkit-text-stroke: 0.55vh #000;
    paint-order: stroke fill;
    color: white;
    transition: none;
}

.syllable {
    display: inline-block;
    position: relative;
    padding: 0;
}

.syllable .base-text {
    visibility: visible;
    z-index: 1;
    -webkit-text-stroke: 0.55vh #000;
    paint-order: stroke fill;
    color: white;
}

.syllable .fill {
    position: absolute;
    top: -20%;
    left: 0;
    height: 140%;
    width: 0%;
    overflow: hidden;
    white-space: pre;
    z-index: 2;
    -webkit-text-stroke: 0.55vh #fff;
    paint-order: stroke fill;
    color: #00e5ff;
    display: flex;
    align-items: center;
    transition: width 0.05s linear;
}

/* --- SCREEN: SEARCH (Z: 2000) --- */
#screen-search {
    background: transparent;
    z-index: 2000;
}

.search-box {
    position: absolute;
    top: 11.5vh;
    left: 4vw;
    right: 4vw;
    bottom: 7.5vh;
    background: rgba(0, 0, 0, 0.88);
    border: 0.4vh solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    padding: 2vh 4vh;
    backdrop-filter: blur(10px);
    transition: bottom 0.3s ease;
}

.search-box.playing-mode {
    bottom: 30vh;
}

.search-header {
    font-size: 4vh;
    font-weight: bold;
    color: white;
    padding-bottom: 2vh;
    margin-bottom: 2vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 0.2vh solid #555;
}

#search-input {
    order: 2;
    width: 35%;
}

.search-bar-styled {
    display: flex;
    align-items: center;
    background: #222;
    border: 0.3vh solid rgba(255, 255, 255, 0.6);
    border-radius: 1vh;
    padding: 1vh 2vh;
    width: 100%;
    overflow: hidden;
}

.search-text {
    font-family: var(--font-main);
    color: var(--accent-color);
    font-size: 4vh;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
    padding-left: 0.5vw;
    padding-right: 1vw;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

#search-count {
    color: yellow;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
    font-size: 3.5vh;
    order: 1;
}

.search-results-wrapper {
    flex: 1;
    overflow-y: hidden;
    position: relative;
    margin-top: 1vh;
}

#search-results {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.search-row {
    display: flex;
    justify-content: space-between;
    font-size: 3.5vh;
    font-weight: bold;
    padding: 1vh 2vh;
    color: yellow;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
    cursor: pointer;
    transition: background 0.1s ease;
}

.search-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-row.selected {
    background: #b71c1c;
    color: white;
    border: 0.2vh solid white;
}

.search-row .sr-code {
    width: 12vw;
    text-align: left;
    color: inherit;
    -webkit-text-stroke: inherit;
    paint-order: stroke fill;
}

.search-row .sr-title {
    flex: 1;
    text-align: left;
    margin-left: 2vw;
    color: white !important;
    -webkit-text-stroke: inherit;
    paint-order: stroke fill;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-row .sr-artist {
    width: 30vw;
    text-align: left;
    color: #69f0ae !important;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 1vw;
}

.search-row.selected .sr-title,
.search-row.selected .sr-artist {
    color: white !important;
}

/* --- SCREEN: NEW SONGS --- */
.ns-box {
    position: absolute;
    top: 11.5vh;
    left: 4vw;
    right: 4vw;
    bottom: 7.5vh;
    background: rgba(0, 0, 0, 0.88);
    border: 0.4vh solid white;
    display: flex;
    flex-direction: column;
    padding: 2vh 4vh;
    margin-bottom: 2vh;
    backdrop-filter: blur(10px);
}

.ns-header {
    font-size: 4vh;
    font-weight: bold;
    color: white;
    padding-bottom: 2vh;
    margin-bottom: 2vh;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 0.2vh solid #555;
}

.ns-title {
    color: yellow;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
}

.ns-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
}

.ns-row {
    display: flex;
    justify-content: space-between;
    font-size: 3.5vh;
    font-weight: bold;
    padding: 1vh 2vh;
    color: yellow;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
}

.col-code {
    width: 12vw;
    text-align: left;
    color: inherit;
}

.col-title {
    flex: 1;
    text-align: left;
    margin-left: 2vw;
    color: white !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-artist {
    width: 30vw;
    text-align: left;
    color: #69f0ae !important;
    -webkit-text-stroke: 0.1vh black;
    paint-order: stroke fill;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 1vw;
}

/* --- SCREEN: SCORE --- */
#screen-score {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.score-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    border: 1.2vh solid gold;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 8vh rgba(255, 215, 0, 0.3);
    animation: score-appear 0.5s ease-out;
}

@keyframes score-appear {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.score-val {
    font-size: var(--fs-huge);
    font-weight: bold;
    color: yellow;
    -webkit-text-stroke: 1vh black;
    paint-order: stroke fill;
    text-shadow: 0 0 5vh rgba(255, 215, 0, 0.5);
}

#score-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    margin-top: 1vh;
    margin-bottom: 2vh;
    min-height: 8vh;
}

.s-icon {
    font-size: 6vh;
    line-height: 1;
    transition: all 0.2s ease-out;
}

.s-icon.gray {
    color: #666;
    filter: grayscale(100%);
}

.s-icon.gold {
    color: var(--score-gold);
}

.s-icon.glowing {
    color: var(--score-gold);
    text-shadow: 0 0 0.5vh #fff, 0 0 1.5vh #ffd700, 0 0 3vh #ff8c00, 0 0 5vh #ff4500;
}

.s-icon.shimmer {
    color: var(--score-gold);
    animation: score-shimmer 0.6s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes score-shimmer {
    0% { transform: scale(1); color: #ffd700; text-shadow: 0 0 1vh #ffd700, 0 0 2vh #ff8c00; }
    100% { transform: scale(1.15); color: #fff; text-shadow: 0 0 2vh #fff, 0 0 4vh #ffd700, 0 0 6vh #ff8c00, 0 0 8vh #ff0000; }
}

.score-msg {
    font-size: 7vh;
    font-weight: bold;
    color: var(--accent-color);
    -webkit-text-stroke: 0.4vh black;
    paint-order: stroke fill;
    margin-top: 2vh;
    text-shadow: 0 0 2vh var(--accent-glow);
}

/* --- SCREEN: SETUP (Z: 2001) --- */
#screen-setup {
    z-index: 2001;
}

.setup-layout {
    position: absolute;
    top: 12.5%;
    left: 12.5%;
    width: 75%;
    height: 75%;
    background: var(--setup-bg);
    border: 0.4vh solid var(--accent-color);
    display: flex;
    outline: 1.2vh solid var(--accent-color);
    outline-offset: -1.2vh;
    backdrop-filter: blur(15px);
    z-index: 2001;
}

.setup-col {
    flex: 1;
    padding: 4vh;
    display: flex;
    flex-direction: column;
    gap: 1vh;
    overflow-y: auto;
}

.setup-col.left {
    border-right: 2px solid rgba(0, 255, 255, 0.4);
}

.setup-item {
    font-size: 3.5vh;
    font-weight: bold;
    padding: 0.5vh 1vw;
    color: white;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 4px;
}

.setup-item.selected {
    background: var(--setup-highlight);
    color: black;
}

.setup-item.active-col {
    background: var(--setup-active);
    color: black;
}

.setup-opt-item {
    font-size: 3.5vh;
    padding: 0.5vh 1vw;
    color: white;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 4px;
}

.setup-opt-item.highlight {
    background: yellow;
    color: black;
}

.setup-opt-item.current {
    color: #00ff00;
}

/* Toggle switch in setup */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    margin-left: auto;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 30px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(30px);
}

/* Setup buttons */
.setup-btn {
    display: block;
    width: 100%;
    padding: 1.5vh 2vw;
    background: transparent;
    border: 0.3vh solid rgba(255,255,255,0.3);
    color: white;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 2.5vh;
    text-align: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    transition: all 0.2s ease;
    margin-bottom: 1vh;
}

.setup-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--accent-color);
}

/* --- STARTUP OVERLAY (Z: 100) --- */
#startup-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.97);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.loader-box {
    width: 520px;
    max-width: 90vw;
    background: linear-gradient(145deg, #1a1a2e, #16162a);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.1), 0 20px 60px rgba(0, 0, 0, 0.8);
    text-align: center;
    color: white;
}

.loader-logo {
    font-size: 52px;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 20px var(--accent-glow);
    margin-bottom: 5px;
    letter-spacing: 3px;
}

.loader-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 35px;
    letter-spacing: 1px;
}

.status-message {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 14px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    margin: 25px 0;
    border-radius: 3px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #7c3aed, var(--accent-color));
    background-size: 200% 100%;
    animation: progress-glow 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 3px;
}

@keyframes progress-glow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

#btn-launch {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #006064 0%, #00acc1 50%, #006064 100%);
    background-size: 200% 100%;
    color: white;
    border: none;
    font-weight: 700;
    cursor: pointer;
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-family: var(--font-main);
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}

#btn-launch:hover:not([disabled]) {
    background-position: 100% 0%;
    box-shadow: 0 4px 30px rgba(0, 229, 255, 0.5);
    transform: translateY(-2px);
}

#btn-launch[disabled] {
    opacity: 0.4;
    cursor: default;
}

/* --- SETTINGS TOGGLE BUTTON --- */
#settings-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

#settings-toggle-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- NOTIFICATION TOAST --- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: white;
    padding: 16px 30px;
    border-radius: var(--radius-xl);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 16px;
    z-index: 99999;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* --- LANDING PAGE STYLES --- */
.landing-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0015 0%, #000020 30%, #001a2e 60%, #0a0015 100%);
}

.landing-container::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: 
        radial-gradient(circle at 30% 40%, rgba(0, 229, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
    animation: landing-drift 15s ease-in-out infinite;
}

@keyframes landing-drift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-3%, 2%); }
}

.landing-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    padding: 40px;
}

.landing-logo {
    font-size: 72px;
    font-weight: 900;
    color: white;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 10px;
    text-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(0, 229, 255, 0.2);
}

.landing-tagline {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 50px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.landing-features {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 25px 20px;
    width: 180px;
    text-align: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(0, 229, 255, 0.3);
    background: rgba(0, 229, 255, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.1);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.feature-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

.btn-launch-main {
    display: inline-block;
    padding: 18px 60px;
    background: linear-gradient(135deg, #006064, #00acc1);
    color: white;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: var(--radius-xl);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 30px rgba(0, 229, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn-launch-main:hover {
    box-shadow: 0 6px 40px rgba(0, 229, 255, 0.6);
    transform: translateY(-3px);
}

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

/* Floating particles on landing */
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0;
    pointer-events: none;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 1000px) {
    :root {
        --fs-lyric: 7vh;
        --fs-meta: 8vh;
        --fs-big: 10vh;
        --fs-huge: 15vh;
    }

    #lyrics-overlay {
        padding-bottom: 3vh;
    }

    .setup-layout {
        top: 5%;
        left: 5%;
        width: 90%;
        height: 90%;
    }

    .landing-logo {
        font-size: 48px;
        letter-spacing: 4px;
    }

    .landing-features {
        gap: 15px;
    }

    .feature-card {
        width: 140px;
        padding: 18px 15px;
    }
}

@media screen and (max-width: 600px) {
    :root {
        --fs-lyric: 5vh;
        --fs-widget: 4vh;
    }

    .search-box {
        left: 2vw;
        right: 2vw;
        padding: 1.5vh 2vh;
    }

    .search-row {
        font-size: 2.5vh;
    }

    .landing-logo {
        font-size: 36px;
    }

    .landing-tagline {
        font-size: 14px;
    }

    .landing-features {
        flex-direction: column;
        align-items: center;
    }

    .btn-launch-main {
        padding: 15px 40px;
        font-size: 15px;
    }
}

/* --- SCROLLBAR STYLING --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.5);
}

/* --- FILE INPUT HIDDEN --- */
.file-input-hidden {
    display: none;
}

/* --- PLAYBACK CONTROLS --- */
#playback-controls {
    position: absolute;
    bottom: 3.5vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2vw;
    z-index: 20;
    pointer-events: auto;
}

.ctrl-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 229, 255, 0.4);
    color: var(--accent-color);
    font-size: 3vh;
    padding: 1.5vh 3vh;
    border-radius: var(--radius-md);
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctrl-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.ctrl-btn:active {
    transform: translateY(0);
}
