:root {
    --primary: #c5a059;
    --primary-glow: rgba(197, 160, 89, 0.4);
    --bg-dark: #08080a; 
    --text-main: #ffffff; 
    --text-dim: #b0b0b8;
    --glass: rgba(255, 255, 255, 0.05); 
    --glass-border: rgba(255, 255, 255, 0.18);
    --player-bg: rgba(12, 12, 15, 0.75); 
    --overlay-brightness: 0.35;
    --glow-intensity: 0.15;
    --bass-impact: 0;
}

* { box-sizing: border-box; outline: none; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow-x: hidden; background: var(--bg-dark); color: var(--text-main); -webkit-font-smoothing: antialiased; }
body.fs-active { overflow: hidden !important; position: fixed; width: 100vw; height: 100dvh; }

/* Typography moved to luxury-fonts.css */

/* --- BEAUTIFUL FULLSCREEN MODE (REDESIGNED) --- */
.fs-beautiful-lyrics-container {
    display: none;
}

/* Grid Layout for Beautiful FS */
body.beautiful-fs .fs-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas: "disc lyrics" !important;
    padding: 0 5vw !important;
    gap: 4vw;
    align-items: center;
    width: 100vw !important;
    transform: none !important;
}

body.beautiful-fs .fs-main-info-column {
    grid-area: disc;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    opacity: 1 !important;
}

body.beautiful-fs .fs-beautiful-lyrics-container {
    grid-area: lyrics;
    display: flex !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 80vh;
    padding: 0 !important;
    text-align: left !important;
    align-items: flex-start !important;
    justify-content: center;
    overflow: visible;
    perspective: 900px; /* Reduced for stronger 3D feel */
}

.fs-lyric-sub, .fs-lyric-main {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    width: 100%;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.fs-lyric-sub {
    font-size: clamp(1.1rem, 2.5vh, 1.6rem);
    color: rgba(255, 255, 255, 0.2);
    filter: blur(5px);
    margin: 12px 0;
    line-height: 1.4;
    transform: scale(0.95);
    font-weight: 400;
}

.fs-lyric-main {
    font-size: clamp(1.8rem, 3.8vh, 4rem);
    font-weight: 900;
    color: #fff;
    margin: 20px 0;
    line-height: 1.2;
    text-shadow: 0 0 40px rgba(0,0,0,0.8);
    position: relative;
    letter-spacing: -0.02em;
    /* Bass Reactive effect using CSS Variable from JS */
    transform: scale(calc(1 + var(--bass-impact) * 0.12));
    filter: drop-shadow(0 0 calc(var(--bass-impact) * 35px) var(--primary-glow));
}

/* Lyric transitions */
.fs-lyric-animate-out {
    transform: translateY(-40px) scale(0.9) rotateX(15deg);
    opacity: 0;
    filter: blur(15px);
}
.fs-lyric-animate-in {
    transform: translateY(40px) scale(1.1) rotateX(-15deg);
    opacity: 0;
    filter: blur(15px);
}

body.beautiful-fs #fullscreen-player { background: #020203; }
body.beautiful-fs .fs-header, 
body.beautiful-fs .fs-view-switcher, 
body.beautiful-fs .fs-list-column, 
body.beautiful-fs .fs-lyrics-column { display: none !important; }
body.beautiful-fs .fs-record-btn { opacity: 0.3; }

body.beautiful-fs .vinyl-wrapper { width: min(550px, 50vh); height: min(550px, 50vh); margin-bottom: 30px; }
body.beautiful-fs .fs-metadata { text-align: center; }
body.beautiful-fs .fs-metadata h2 { font-size: 2.5rem; font-family: 'Playfair Display', serif !important; font-weight: 900; font-style: italic; }
body.beautiful-fs .fs-metadata p { font-size: 1.3rem; }

#stage-smoke-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    opacity: 0.45;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* --- 3D CD PROMO STAGE - ABSOLUTE VECTOR PRECISION --- */
.fs-promo-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    pointer-events: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 10; /* Lowered so it doesn't block lyrics */
    perspective: 2500px;
}

body.beautiful-fs .fs-promo-stage { display: flex !important; }

.stage-contents {
    position: absolute;
    bottom: 10vh;
    left: 50%;
    width: 1px; height: 1px;
    transform-style: preserve-3d;
}

/* Mega 128-facet Pedestal */
.stage-platform-3d {
    position: absolute;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%) rotateX(75deg);
    transform-style: preserve-3d;
    z-index: 1;
}

.platform-top {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 30% 30%, #8e7a57 0%, #1a150b 70%, #000 100%);
    border-radius: 50%;
    border: 3px solid rgba(212, 175, 55, 0.8);
    box-shadow: inset 0 0 100px rgba(0,0,0,1), 0 0 60px rgba(197, 160, 89, 0.5);
    transform: translateZ(60px);
    z-index: 10;
}

/* Music Reactive Platform Glow */
.platform-top::after {
    content: "";
    position: absolute;
    top: -20%; left: -20%;
    width: 140%; height: 140%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    border-radius: 50%;
    opacity: calc(var(--bass-impact) * 1.0); /* Tăng lên tối đa 1.0 */
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 11;
    transition: opacity 0.05s ease-out;
}

.platform-bottom {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    border-radius: 50%;
    transform: translateZ(0px);
    box-shadow: 0 0 80px rgba(0,0,0,0.9);
}

.platform-side {
    position: absolute;
    top: 50%; left: 50%;
    width: 16px;
    height: 60px;
    /* Base gold gradient */
    background: linear-gradient(to bottom, #d4af37 0%, #8a6d3b 45%, #1a150b 100%);
    /* Flash effect on the side facets */
    box-shadow: 0 0 calc(var(--bass-impact) * 20px) var(--primary);
    filter: brightness(calc(1 + var(--bass-impact) * 1.5));
    transform-origin: center;
    backface-visibility: hidden;
    transition: filter 0.05s ease-out, box-shadow 0.05s ease-out;
}

.platform-side.s1 { transform: translate(-50%, -50%) rotateZ(0.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s2 { transform: translate(-50%, -50%) rotateZ(2.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s3 { transform: translate(-50%, -50%) rotateZ(5.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s4 { transform: translate(-50%, -50%) rotateZ(8.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s5 { transform: translate(-50%, -50%) rotateZ(11.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s6 { transform: translate(-50%, -50%) rotateZ(14.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s7 { transform: translate(-50%, -50%) rotateZ(16.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s8 { transform: translate(-50%, -50%) rotateZ(19.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s9 { transform: translate(-50%, -50%) rotateZ(22.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s10 { transform: translate(-50%, -50%) rotateZ(25.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s11 { transform: translate(-50%, -50%) rotateZ(28.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s12 { transform: translate(-50%, -50%) rotateZ(30.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s13 { transform: translate(-50%, -50%) rotateZ(33.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s14 { transform: translate(-50%, -50%) rotateZ(36.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s15 { transform: translate(-50%, -50%) rotateZ(39.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s16 { transform: translate(-50%, -50%) rotateZ(42.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s17 { transform: translate(-50%, -50%) rotateZ(45.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s18 { transform: translate(-50%, -50%) rotateZ(47.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s19 { transform: translate(-50%, -50%) rotateZ(50.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s20 { transform: translate(-50%, -50%) rotateZ(53.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s21 { transform: translate(-50%, -50%) rotateZ(56.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s22 { transform: translate(-50%, -50%) rotateZ(59.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s23 { transform: translate(-50%, -50%) rotateZ(61.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s24 { transform: translate(-50%, -50%) rotateZ(64.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s25 { transform: translate(-50%, -50%) rotateZ(67.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s26 { transform: translate(-50%, -50%) rotateZ(70.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s27 { transform: translate(-50%, -50%) rotateZ(73.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s28 { transform: translate(-50%, -50%) rotateZ(75.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s29 { transform: translate(-50%, -50%) rotateZ(78.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s30 { transform: translate(-50%, -50%) rotateZ(81.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s31 { transform: translate(-50%, -50%) rotateZ(84.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s32 { transform: translate(-50%, -50%) rotateZ(87.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s33 { transform: translate(-50%, -50%) rotateZ(90.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s34 { transform: translate(-50%, -50%) rotateZ(92.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s35 { transform: translate(-50%, -50%) rotateZ(95.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s36 { transform: translate(-50%, -50%) rotateZ(98.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s37 { transform: translate(-50%, -50%) rotateZ(101.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s38 { transform: translate(-50%, -50%) rotateZ(104.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s39 { transform: translate(-50%, -50%) rotateZ(106.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s40 { transform: translate(-50%, -50%) rotateZ(109.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s41 { transform: translate(-50%, -50%) rotateZ(112.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s42 { transform: translate(-50%, -50%) rotateZ(115.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s43 { transform: translate(-50%, -50%) rotateZ(118.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s44 { transform: translate(-50%, -50%) rotateZ(120.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s45 { transform: translate(-50%, -50%) rotateZ(123.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s46 { transform: translate(-50%, -50%) rotateZ(126.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s47 { transform: translate(-50%, -50%) rotateZ(129.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s48 { transform: translate(-50%, -50%) rotateZ(132.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s49 { transform: translate(-50%, -50%) rotateZ(135.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s50 { transform: translate(-50%, -50%) rotateZ(137.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s51 { transform: translate(-50%, -50%) rotateZ(140.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s52 { transform: translate(-50%, -50%) rotateZ(143.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s53 { transform: translate(-50%, -50%) rotateZ(146.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s54 { transform: translate(-50%, -50%) rotateZ(149.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s55 { transform: translate(-50%, -50%) rotateZ(151.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s56 { transform: translate(-50%, -50%) rotateZ(154.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s57 { transform: translate(-50%, -50%) rotateZ(157.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s58 { transform: translate(-50%, -50%) rotateZ(160.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s59 { transform: translate(-50%, -50%) rotateZ(163.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s60 { transform: translate(-50%, -50%) rotateZ(165.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s61 { transform: translate(-50%, -50%) rotateZ(168.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s62 { transform: translate(-50%, -50%) rotateZ(171.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s63 { transform: translate(-50%, -50%) rotateZ(174.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s64 { transform: translate(-50%, -50%) rotateZ(177.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s65 { transform: translate(-50%, -50%) rotateZ(180.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s66 { transform: translate(-50%, -50%) rotateZ(182.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s67 { transform: translate(-50%, -50%) rotateZ(185.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s68 { transform: translate(-50%, -50%) rotateZ(188.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s69 { transform: translate(-50%, -50%) rotateZ(191.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s70 { transform: translate(-50%, -50%) rotateZ(194.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s71 { transform: translate(-50%, -50%) rotateZ(196.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s72 { transform: translate(-50%, -50%) rotateZ(199.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s73 { transform: translate(-50%, -50%) rotateZ(202.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s74 { transform: translate(-50%, -50%) rotateZ(205.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s75 { transform: translate(-50%, -50%) rotateZ(208.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s76 { transform: translate(-50%, -50%) rotateZ(210.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s77 { transform: translate(-50%, -50%) rotateZ(213.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s78 { transform: translate(-50%, -50%) rotateZ(216.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s79 { transform: translate(-50%, -50%) rotateZ(219.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s80 { transform: translate(-50%, -50%) rotateZ(222.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s81 { transform: translate(-50%, -50%) rotateZ(225.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s82 { transform: translate(-50%, -50%) rotateZ(227.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s83 { transform: translate(-50%, -50%) rotateZ(230.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s84 { transform: translate(-50%, -50%) rotateZ(233.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s85 { transform: translate(-50%, -50%) rotateZ(236.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s86 { transform: translate(-50%, -50%) rotateZ(239.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s87 { transform: translate(-50%, -50%) rotateZ(241.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s88 { transform: translate(-50%, -50%) rotateZ(244.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s89 { transform: translate(-50%, -50%) rotateZ(247.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s90 { transform: translate(-50%, -50%) rotateZ(250.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s91 { transform: translate(-50%, -50%) rotateZ(253.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s92 { transform: translate(-50%, -50%) rotateZ(255.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s93 { transform: translate(-50%, -50%) rotateZ(258.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s94 { transform: translate(-50%, -50%) rotateZ(261.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s95 { transform: translate(-50%, -50%) rotateZ(264.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s96 { transform: translate(-50%, -50%) rotateZ(267.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s97 { transform: translate(-50%, -50%) rotateZ(270.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s98 { transform: translate(-50%, -50%) rotateZ(272.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s99 { transform: translate(-50%, -50%) rotateZ(275.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s100 { transform: translate(-50%, -50%) rotateZ(278.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s101 { transform: translate(-50%, -50%) rotateZ(281.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s102 { transform: translate(-50%, -50%) rotateZ(284.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s103 { transform: translate(-50%, -50%) rotateZ(286.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s104 { transform: translate(-50%, -50%) rotateZ(289.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s105 { transform: translate(-50%, -50%) rotateZ(292.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s106 { transform: translate(-50%, -50%) rotateZ(295.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s107 { transform: translate(-50%, -50%) rotateZ(298.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s108 { transform: translate(-50%, -50%) rotateZ(300.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s109 { transform: translate(-50%, -50%) rotateZ(303.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s110 { transform: translate(-50%, -50%) rotateZ(306.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s111 { transform: translate(-50%, -50%) rotateZ(309.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s112 { transform: translate(-50%, -50%) rotateZ(312.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s113 { transform: translate(-50%, -50%) rotateZ(315.00deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s114 { transform: translate(-50%, -50%) rotateZ(317.81deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s115 { transform: translate(-50%, -50%) rotateZ(320.62deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s116 { transform: translate(-50%, -50%) rotateZ(323.44deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s117 { transform: translate(-50%, -50%) rotateZ(326.25deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s118 { transform: translate(-50%, -50%) rotateZ(329.06deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s119 { transform: translate(-50%, -50%) rotateZ(331.88deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s120 { transform: translate(-50%, -50%) rotateZ(334.69deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s121 { transform: translate(-50%, -50%) rotateZ(337.50deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s122 { transform: translate(-50%, -50%) rotateZ(340.31deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s123 { transform: translate(-50%, -50%) rotateZ(343.12deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s124 { transform: translate(-50%, -50%) rotateZ(345.94deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s125 { transform: translate(-50%, -50%) rotateZ(348.75deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s126 { transform: translate(-50%, -50%) rotateZ(351.56deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s127 { transform: translate(-50%, -50%) rotateZ(354.38deg) translateY(-298px) translateZ(30px) rotateX(90deg); }
.platform-side.s128 { transform: translate(-50%, -50%) rotateZ(357.19deg) translateY(-298px) translateZ(30px) rotateX(90deg); }

/* Granular lighting for 128 facets */
.platform-side:nth-child(n+1):nth-child(-n+17) { filter: brightness(0.5); }
.platform-side:nth-child(n+17):nth-child(-n+33) { filter: brightness(0.8); }
.platform-side:nth-child(n+33):nth-child(-n+49) { filter: brightness(1.1); }
.platform-side:nth-child(n+49):nth-child(-n+65) { filter: brightness(1.3); }
.platform-side:nth-child(n+65):nth-child(-n+81) { filter: brightness(1.4); }
.platform-side:nth-child(n+81):nth-child(-n+97) { filter: brightness(1.2); }
.platform-side:nth-child(n+97):nth-child(-n+113) { filter: brightness(0.9); }
.platform-side:nth-child(n+113):nth-child(-n+129) { filter: brightness(0.6); }

/* --- CD PRESENTATION LAYERS --- */
.cd-fly-container {
    position: relative;
    bottom: 230px;
    left: 0;
    width: 1px; height: 1px;
    transform-style: preserve-3d;
    /* Increased rotation slightly to show more depth */
    transform: translate(-50%, -50%) translateZ(120px) rotateY(-40deg) rotateX(8deg);
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
}

.cd-box-3d {
    width: 0;
    height: 0;
    position: absolute;
    top: 0; left: 0;
    transform-style: preserve-3d;
    transform: translateZ(0);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cd-box-3d.is-idling {
    animation: cd-idle-dance 10s ease-in-out infinite;
}

@keyframes cd-idle-dance {
    0%, 100% { transform: translateZ(0) rotateY(0) rotateX(0); }
    25% { transform: translateZ(15px) translateY(-10px) rotateY(12deg) rotateX(5deg); }
    50% { transform: translateZ(30px) translateY(0) rotateY(0) rotateX(0); }
    75% { transform: translateZ(15px) translateY(10px) rotateY(-12deg) rotateX(-5deg); }
}

/* Base Shadow projected from the box center point - Fixed for realism and alignment */
.cd-box-3d::before {
    content: "";
    position: absolute;
    bottom: -160px;
    left: 0;
    width: 280px;
    height: 90px; /* Larger shadow */
    background: rgba(0,0,0,0.6); /* Softer shadow */
    filter: blur(30px);
    /* Match platform rotation (75deg). Since parent fly-container is rotateX(8deg), we use ~67deg here. */
    transform: translate(-50%, -50%) rotateX(67deg) translateZ(-80px);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1; /* Ensure it stays behind other faces */
}

/* Individual faces visual effects to avoid 3D flattening of the container */
.cd-fly-container.fly-out .face,
.cd-fly-container.fly-out .cd-box-3d::after,
.cd-fly-container.fly-in-start .face,
.cd-fly-container.fly-in-start .cd-box-3d::after {
    opacity: 0 !important;
    filter: blur(20px) !important;
}

.cd-box-3d .face {
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.15); /* Subtler, more realistic edge */
    backface-visibility: visible !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Bevel effect */
    box-shadow: inset 0 0 40px rgba(0,0,0,1), 0 0 20px rgba(0,0,0,0.5);
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    transition: opacity 1s ease-in-out, filter 1s ease-in-out;
}

.cd-box-3d .front {
    width: 240px; height: 210px;
    transform: translate(-50%, -50%) translateZ(14px); /* Total depth = 28px */
}

.cd-box-3d .front img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    display: block;
    will-change: opacity, filter;
}

/* Security Ribbon / Anti-Counterfeit Holographic Laser Seal */
.security-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    padding: 2px;
    height: 100%;
    background: linear-gradient(
        135deg,
        #d4af37 0%,
        #f9f295 15%,
        #d4af37 30%,
        #b8860b 45%,
        #f9f295 60%,
        #d4af37 75%,
        #ffeb3b 90%,
        #d4af37 100%
    );
    background-size: 400% 400%;
    animation: gold-shimmer 5s linear infinite;
    box-shadow: -3px 0 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: row; 
    align-items: stretch;
    justify-content: center;
    gap: 1px; /* Very tight spacing */
    overflow: hidden;
    border-left: 1.5px solid rgba(255, 255, 255, 0.3);
    transform: translateZ(0.1px);
}

.ribbon-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Stagger effect: Offset second row vertically */
.ribbon-row.row-2 {
    padding-top: 40px;
}

.security-ribbon span {
    font-family: 'Montserrat', sans-serif;
    font-size: 5px; /* Tiny, elegant text */
    font-weight: 900;
    /* Laser Engraved Effect: Sunken with metallic glint */
    color: rgb(242 228 187 / 70%); 
    text-shadow: 
        0.3px 0.3px 0.1px rgba(255, 255, 255, 0.4), 
        -0.3px -0.3px 0.1px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 1px;
    text-transform: uppercase;
    filter: drop-shadow(0 0 1px rgba(212, 175, 55, 0.3));
}

/* Glinting effect across the gold seal */
.security-ribbon::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.8) 50%,
        transparent 55%
    );
    transform: rotate(45deg);
    animation: gold-glint 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes gold-shimmer {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes gold-glint {
    0% { transform: translateY(-30%) rotate(45deg); opacity: 0; }
    20% { opacity: 1; }
    40% { transform: translateY(30%) rotate(45deg); opacity: 0; }
    100% { opacity: 0; }
}

.cd-box-3d .back {
    width: 240px; height: 210px;
    transform: translate(-50%, -50%) rotateY(180deg) translateZ(14px);
    background: #0a0a0a;
}

.cd-box-3d .spine-left {
    width: 28px; height: 210px;
    transform: translate(-50%, -50%) rotateY(-90deg) translateZ(120px);
    background: linear-gradient(to bottom, #111, #333 10%, #000 50%, #222 90%, #111);
    border-right: 1px solid rgba(255,255,255,0.2);
}

.cd-box-3d .spine-right {
    width: 28px; height: 210px;
    transform: translate(-50%, -50%) rotateY(90deg) translateZ(120px);
    background: linear-gradient(to bottom, #050505, #222 10%, #000 50%, #1a1a1a 90%, #050505);
    border-left: 1px solid rgba(255,255,255,0.2);
}

.spine-text {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    line-height: 1;
    padding: 10px 0;
    letter-spacing: 1.5px;
    text-shadow: 0 0 8px var(--primary-glow);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-box-3d .top {
    width: 240px; height: 28px;
    transform: translate(-50%, -50%) rotateX(90deg) translateZ(105px);
    background: linear-gradient(to right, #0a0a0a, #444 20%, #111 50%, #444 80%, #0a0a0a);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.cd-box-3d .bottom {
    width: 240px; height: 28px;
    transform: translate(-50%, -50%) rotateX(-90deg) translateZ(105px);
    background: linear-gradient(to right, #050505, #222 20%, #000 50%, #222 80%, #050505);
}

/* Fly Left Animation into Fog - PRESERVE 3D & ELEVATION */
.cd-box-fly-left {
    transform: translate(-50%, -50%) translateZ(140px) rotateY(-65deg) rotateX(15deg) translateX(-1200px) !important;
    opacity: 0 !important;
    filter: blur(15px) brightness(1.2) !important;
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cd-fly-container.fly-out {
    /* Aggressive zoom towards camera */
    transform: translate(-50%, -50%) translateZ(1200px) scale(2) rotateY(45deg) rotateX(30deg) !important;
}

.cd-fly-container.fly-in-start {
    /* Come from deep background */
    transform: translate(-50%, -50%) translateZ(-1200px) scale(0) rotateY(-45deg) rotateX(-30deg);
    transition: none;
}

/* Enhanced Glass Reflection - Positioned exactly over the front face */
.cd-box-3d::after {
    content: '';
    position: absolute;
    top: 0; left: 0; 
    width: 240px; height: 210px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 45%, rgba(255,255,255,0.05) 100%);
    transform: translate(-50%, -50%) translateZ(12.2px);
    pointer-events: none;
    z-index: 21;
    will-change: opacity, filter;
    transition: opacity 1s ease-in-out, filter 1s ease-in-out;
}

@keyframes blink { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }

/* --- BACKGROUND SYSTEM --- */
.background-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-image: url('BackgroundDH.webp'); background-size: cover; background-position: center; filter: blur(45px) brightness(var(--overlay-brightness)) saturate(1.4); z-index: 0; pointer-events: none; }
#vignette { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: radial-gradient(circle at center, transparent 15%, rgba(0,0,0,0.4) 100%); pointer-events: none; z-index: 0; }
#ambient-glow { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; overflow: hidden; }
#glow-bass, #glow-mid, #glow-treb {
    position: absolute; top: 50%; left: 50%; border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out,
    opacity 0.1s ease-out;
    will-change: transform, opacity;
}

#glow-bass {
    width: 100vw; height: 100vh;
    background: radial-gradient(circle, var(--primary) 0%, transparent 60%);
    opacity: var(--mid-opacity, 0);
    transform: translate(-50%, -50%) scale(var(--bass-scale, 1)) translateZ(0);
    filter: blur(80px);
    mix-blend-mode: screen;
}

#glow-mid {
    width: 90vw; height: 90vh;
    background: radial-gradient(circle, #fff 0%, transparent 65%);
    opacity: var(--mid-opacity, 0.1);
    transform: translate(-50%, -50%) scale(var(--mid-scale, 1)) translateZ(0);
    filter: blur(50px);
    mix-blend-mode: soft-light;
}

#glow-treb {
    width: 60vw; height: 60vh;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 50%);
    opacity: var(--treb-opacity, 0);
    transform: translate(-50%, -50%) scale(var(--treb-scale, 1)) translateZ(0);
    filter: blur(30px);
    mix-blend-mode: screen;
}

#app { max-width: 1400px; margin: 0 auto; padding: 40px 24px 160px; width: 100%; position: relative; z-index: 10; }

/* --- HERO SECTION --- */
.hero { position: relative; display: flex; align-items: center; gap: 60px; padding: 70px; background-image: url('BackgroundDH.webp'); background-size: cover; background-position: center; border-radius: 40px; border: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 60px; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.35); }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(0,0,0,0.6), transparent); z-index: 1; }
.profile-container { width: 210px; height: 210px; border-radius: 50%; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 15px 45px rgba(0,0,0,0.4), inset 6px 6px 12px rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; padding: 10px; position: relative; z-index: 3; }
.profile-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.artist-info h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-family: 'Montserrat', sans-serif; font-weight: 800; margin: 0; text-shadow: 0 10px 40px rgba(0,0,0,0.6); letter-spacing: -2px; }
.hero-socials { position: absolute; bottom: 40px; right: 40px; display: flex; gap: 20px; z-index: 10; }
.social-icon { color: #fff; opacity: 0.7; transition: 0.3s; }
.social-icon:hover { color: var(--primary); transform: translateY(-5px); opacity: 1; }
.social-icon svg { width: 26px; height: 26px; }

/* --- UNIFIED SONG ITEM --- */
.album-title { font-size: 2.2rem; color: var(--primary); margin-bottom: 25px; border-bottom: 1px solid var(--glass-border); display: inline-block; padding-bottom: 8px; font-family: 'Playfair Display', serif; font-weight: 700; }
.content { width: 100%; will-change: transform; }

.songs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; contain: content; }

.song-card { 
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--glass-border);
    border-radius: 16px; display: flex; align-items: stretch; cursor: pointer; 
    transition: background 0.4s, border-color 0.4s; position: relative; overflow: hidden;
    height: 90px; width: 100%;
    transform: translateZ(0); /* Kích hoạt GPU cho từng thẻ */
}

/* Hiện đại: Không nhích lên, chỉ phát sáng và đổi màu */
.song-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    box-shadow: inset 0 0 20px rgba(197, 160, 89, 0.2), 0 10px 30px rgba(0,0,0,0.2);
}

.song-card.active {
    border-color: var(--primary);
    background: rgba(197, 160, 89, 0.15);
    box-shadow: inset 0 0 15px rgba(197, 160, 89, 0.3);
}

/* Mini version for Playlists */
.song-card.mini { height: 75px; border-radius: 12px; margin-bottom: 10px; }
.song-card.mini .cover-container { width: 75px; height: 75px; }
.song-card.mini .song-info { padding: 0 45px 0 15px; }
.song-card.mini .song-info .title { font-size: 0.95rem; }
.song-card.mini .song-info .artist { font-size: 0.85rem; }

.cover-container { position: relative; width: 90px; height: 90px; flex-shrink: 0; overflow: hidden; }
.song-cover { width: 100%; height: 100%; object-fit: cover; transition: 0.6s cubic-bezier(0.2, 0, 0.2, 1); }
.song-card:hover .song-cover { transform: scale(1.08); }

.song-info { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 55px 0 20px; min-width: 0; }
.song-info .title { font-family: var(--font-artistic); font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0 0 4px; white-space: normal; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.song-info .artist { font-family: var(--font-elegant); font-size: 0.85rem; color: var(--text-dim); margin: 0; opacity: 0.7; font-style: italic; }

/* --- METALLIC RIBBON --- */
.q-ribbon { position: absolute; top: 5px; right: -15px; width: 60px; height: 20px; transform: rotate(45deg); display: flex; align-items: center; justify-content: center; font-family: 'Montserrat', sans-serif; font-size: 0.7rem; font-weight: 900; z-index: 10; box-shadow: 0 4px 8px rgba(0,0,0,0.5); border-top: 1px solid rgba(255,255,255,0.4); border-bottom: 1px solid rgba(0,0,0,0.3); color: rgba(0, 0, 0, 0.7); text-shadow: 0.5px 0.5px 1px rgba(255,255,255,0.5); letter-spacing: 1px; }
.q-ribbon.mini-ribbon { top: 10px; right: -32px; width: 90px; height: 18px; font-size: 0.55rem; }

/* --- PLAYER BAR STABLE --- */
#player-bar { 
    position: fixed; bottom: 0; left: 0; width: 100%; 
    background: var(--player-bg); backdrop-filter: blur(30px); 
    border-top: 1px solid var(--glass-border); z-index: 1500; 
    padding: 0; height: 85px; display: flex; align-items: stretch;
}

/* Override cho Player Bar */
#player-bar .img-container, #player-bar .img-active, #player-bar .img-next { border-radius: 0 !important; }
.player-content { display: grid; grid-template-columns: minmax(300px, 450px) 1fr minmax(300px, 450px); align-items: center; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.player-controls, .player-extra { cursor: default; }

.current-track { display: flex; align-items: center; gap: 20px; cursor: pointer; min-width: 0; height: 100%; overflow: hidden; padding-right: 20px; }
.current-track .cover-wrapper { height: 100%; aspect-ratio: 1/1; overflow: hidden; flex-shrink: 0; border-right: 1px solid rgba(255,255,255,0.1); }
.img-container { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: inherit; }
.img-active, .img-next { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.6s ease-in-out; border-radius: inherit; background: #111; }
.img-active[src=""], .img-next[src=""] { display: none; }
.img-next { opacity: 0; }
#player-cover-active, #player-cover-next { border-radius: 8px; }
#fs-cover-active, #fs-cover-next { border-radius: 50%; }

.player-center-group { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; }
.player-controls { display: flex; align-items: center; gap: 24px; }
.icon-btn { background: none; border: none; color: var(--text-dim); cursor: pointer; transition: 0.3s; aspect-ratio: 1/1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.active { color: var(--primary); }
.main-play-btn { background: #fff; color: #000; border: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; aspect-ratio: 1/1; flex-shrink: 0; }
.main-play-btn:hover { transform: scale(1.1); box-shadow: 0 0 20px var(--primary-glow); }

.player-timeline { width: 100%; max-width: 600px; display: flex; align-items: center; gap: 12px; }
.player-timeline span { font-size: 0.7rem; opacity: 0.6; min-width: 35px; font-family: 'Montserrat', sans-serif; }
.custom-progress-wrapper { flex: 1; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; position: relative; cursor: pointer; }
.progress-fill { height: 100%; background: var(--primary); width: 0%; border-radius: 2px; box-shadow: 0 0 10px var(--primary-glow); }

.quality-btn { width: 44px; height: 44px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 900; cursor: pointer; background: linear-gradient(145deg, #333, #111); color: var(--primary); display: flex; align-items: center; justify-content: center; aspect-ratio: 1/1; flex-shrink: 0; margin-left: auto; margin-right: 20px; }
.quality-btn[data-quality="sq"] { background: linear-gradient(145deg, #cd7f32, #8b4513); color: #fff; }
.quality-btn[data-quality="hq"] { background: linear-gradient(145deg, #ecf0f1, #95a5a6); color: #000; }
.quality-btn[data-quality="cd"] { background: linear-gradient(145deg, #f1c40f, #9a7b0c); color: #000; }
.quality-btn[data-quality="hd"] { background: linear-gradient(145deg, #ffffff, #b4b4b4); color: #000; }
.quality-btn[data-quality="pr"] { background: linear-gradient(135deg, #ffffff, #b2ebf2, #ffffff); color: #006064; }

#btn-more-player { display: none; margin-left: auto; margin-right: 15px; }
.player-more-menu {
    position: absolute; bottom: 80px; right: 15px;
    background: rgba(15, 15, 20, 0.95); backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border); border-radius: 18px;
    padding: 8px; flex-direction: column; gap: 4px; z-index: 2500;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    min-width: 180px; display: none;
}
.player-more-menu.active { display: flex; animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.menu-item {
    background: none; border: none; color: #fff; padding: 12px 16px;
    display: flex; align-items: center; gap: 14px;
    font-family: 'Montserrat', sans-serif; font-size: 0.95rem; font-weight: 500;
    cursor: pointer; border-radius: 12px; transition: 0.2s; width: 100%; text-align: left;
}
.menu-item:hover { background: rgba(255,255,255,0.08); }
.menu-item svg { width: 22px; height: 22px; color: var(--text-dim); }
.menu-item svg[stroke] { stroke: currentColor; }
.menu-item.active { color: var(--primary); }
.menu-item.active svg { color: var(--primary); }
.quality-icon-placeholder {
    width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--primary);
    font-size: 0.65rem; font-weight: 900; display: flex; align-items: center; justify-content: center;
    color: var(--primary);
}

.btn-fav-fs, .btn-share-fs { width: 38px; height: 38px; }
.fs-controls .btn-fav-fs, .fs-controls .btn-share-fs { display: flex; }
.fs-quality-bar .btn-fav-fs, .fs-quality-bar .btn-share-fs { display: none; }

/* --- FULLSCREEN PLAYER --- */
#fullscreen-player { 
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100dvh; height: -webkit-fill-available;
    background: #050507; 
    z-index: 2000; 
    transform: translateY(100%); 
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); 
    visibility: hidden; 
    display: flex; flex-direction: column; 
    overflow: hidden; 
}
#fullscreen-player.active { transform: translateY(0); visibility: visible; }
#fullscreen-bg { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    filter: blur(80px) brightness(0.35); 
    z-index: -1; 
    display: block; 
    transition: background-image 0.8s ease-in-out; 
}

/* Dithering / Grain Overlay to fix Color Banding */
#fullscreen-bg::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.08;
    pointer-events: none;
    mix-blend-mode: overlay;
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* Stage Lighting Pulse Effect */
body.beautiful-fs::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    background: radial-gradient(circle at 50% 120%, var(--primary) 0%, transparent 80%);
    opacity: calc(var(--bass-impact) * 0.7);
    mix-blend-mode: screen;
    transition: opacity 0.05s ease-out;
}

body.beautiful-fs::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    box-shadow: inset 0 0 calc(var(--bass-impact) * 250px) rgba(255,255,255, calc(var(--bass-impact) * 0.2));
    opacity: calc(var(--bass-impact) * 0.7);
    transition: opacity 0.05s ease-out;
}

.bg-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; filter: blur(80px) brightness(0.35); transition: opacity 0.8s ease-in-out; }

.fs-header { flex-shrink: 0; display: grid; grid-template-columns: 100px 1fr 100px; align-items: center; padding: 20px 40px; height: 80px; z-index: 10; }
.fs-header-center { text-align: center; padding: 20px 10px 10px; }
#btn-close-fs { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s; margin: 0 auto; }
#btn-close-fs:hover { background: rgba(255,255,255,0.2); transform: translateY(3px); }
#btn-close-fs svg { width: 34px; height: 34px; }
#btn-fs-toggle { display: none; }

.fs-body { flex: 1; display: grid; grid-template-columns: 1.2fr 2fr 1.2fr; gap: 40px; padding: 0 40px 20px; overflow: visible; overflow-y: auto; min-height: 0; position: relative; }

.fs-main-info-column { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 100%; overflow: visible; }
.vinyl-wrapper { 
    position: relative; 
    width: min(420px, 45vh); 
    height: min(420px, 45vh); 
    aspect-ratio: 1/1; /* Ensure perfect circle */
    margin-bottom: 25px; 
    flex-shrink: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
#fs-visualizer { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 140%; height: 140%; pointer-events: none; z-index: -1; }
.vinyl-disc { 
    width: 100%; height: 100%; border-radius: 50%; background: #111;
    box-shadow: 0 30px 80px rgba(0,0,0,0.8), inset 0 0 0 15px #000;
    display: flex; align-items: center; justify-content: center;
    animation: rotate 25s linear infinite; animation-play-state: paused;
    position: relative; overflow: hidden;
    will-change: transform; transform: translateZ(0);
    z-index: 2;
    aspect-ratio: 1/1; /* Lock ratio */
}
.vinyl-disc .img-container { 
    width: 62%; height: 62%; border-radius: 50%; border: 6px solid #000; 
    will-change: transform; overflow: hidden; aspect-ratio: 1/1; 
}
.vinyl-disc img { width: 100%; height: 100%; object-fit: contain; }
.vinyl-disc.playing { animation-play-state: running; }

.fs-metadata { margin-top: 10px; margin-bottom: 10px; }
.fs-metadata h2 { font-size: clamp(1.8rem, 4vh, 2.5rem); color: #fff; margin: 0 0 5px; font-weight: 800; font-family: 'Montserrat', sans-serif; letter-spacing: -1px; }
.fs-metadata p { font-size: 0.95rem; color: var(--primary); font-weight: 500; opacity: 0.85; margin: 0; font-family: 'Be Vietnam Pro', sans-serif; }
.composer-info { font-size: 0.8rem !important; opacity: 0.6 !important; margin-top: 4px !important; }

.fs-playback-group { width: 100%; max-width: 550px; margin-top: 20px; }

/* --- FS QUALITY BAR --- */
.fs-quality-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    padding-bottom: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.quality-options {
    display: flex;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.q-opt {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.q-opt:hover { background: rgba(255,255,255,0.05); color: #fff; }
.q-opt.active { background: var(--primary); color: #000; box-shadow: 0 4px 12px var(--primary-glow); }

.trigger-btn svg { width: 24px; height: 24px; color: var(--primary); opacity: 0.7; transition: 0.3s; }
.trigger-btn:hover svg { opacity: 1; transform: scale(1.1); filter: drop-shadow(0 0 8px var(--primary-glow)); }

.record-trigger-btn svg { width: 22px; height: 22px; color: #fff; opacity: 0.6; transition: 0.3s; }
.record-trigger-btn:hover svg { opacity: 1; color: #ff4757; }
.record-trigger-btn.recording { color: #ff4757; animation: blink 1.2s infinite; }

/* Sửa lại để hiển thị playback group ở Beautiful mode */
body.beautiful-fs .fs-playback-group { display: flex !important; flex-direction: column; margin-top: 30px; }
.fs-time-row { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; font-family: 'Montserrat', sans-serif; font-size: 0.85rem; opacity: 0.7; }
#fs-time-current, #fs-time-total { min-width: 45px; text-align: center; font-variant-numeric: tabular-nums; }
.fs-progress-container { flex: 1; height: 5px; background: rgba(255,255,255,0.1); border-radius: 10px; cursor: pointer; }
.fs-progress-fill { height: 100%; background: var(--primary); border-radius: 10px; width: 0%; box-shadow: 0 0 15px var(--primary-glow); }

.fade-in-out { opacity: 0; transition: opacity 0.5s ease-in-out; }
.fs-controls { display: flex; align-items: center; justify-content: center; gap: 40px; }
.fs-controls .icon-btn svg { width: 28px; height: 28px; color: #fff; transition: 0.3s; }
.fs-controls .icon-btn.active svg { color: var(--primary); filter: drop-shadow(0 0 8px var(--primary-glow)); }
.fs-controls .main-play-btn.x-large { width: 75px; height: 75px; background: #fff; color: #000; }

/* --- LYRICS FIXED (NO JUMPING) --- */
.lyrics-container { 
    overflow-y: auto; 
    overflow-x: hidden; 
    flex: 1; 
    scroll-behavior: smooth; 
    text-align: center; 
    -webkit-overflow-scrolling: touch;
    padding: 100px 0; /* Extra padding for center focus */
}

.lyric-line { 
    font-size: 1.5rem; 
    color: rgba(255,255,255,0.25); 
    margin-bottom: 24px; 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer; 
    white-space: normal; 
    word-wrap: break-word; 
    line-height: 1.5; 
    padding: 0 15%; 
    opacity: 0.6;
    transform: scale(0.95);
    filter: blur(1px);
}

.lyric-line.active { 
    color: #fff; 
    opacity: 1;
    transform: scale(1.05); /* Scaling is fine as long as we don't change weight */
    filter: blur(0);
    text-shadow: 0 0 25px rgba(255,255,255,0.3);
}

/* --- UNIFIED PLAYLIST IN FS --- */
.fs-list-column, .fs-lyrics-column { background: rgba(255,255,255,0.05); backdrop-filter: blur(35px); border-radius: 30px; padding: 20px; border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; height: 100%; overflow: hidden; }

.fs-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; flex-shrink: 0; }
.fs-tab-btn { background: none; border: none; color: var(--text-dim); font-family: 'Montserrat', sans-serif; font-size: 0.85rem; font-weight: 700; cursor: pointer; padding: 8px 12px; border-radius: 8px; transition: 0.3s; white-space: nowrap; }
.fs-tab-btn.active { background: var(--primary); color: #000; box-shadow: 0 4px 15px var(--primary-glow); }
.fs-tab-btn:hover:not(.active) { background: rgba(255,255,255,0.1); color: #fff; }

.fs-disc-playlist { overflow-y: auto; flex: 1; padding-right: 5px; -webkit-overflow-scrolling: touch; will-change: transform; }

.btn-fav { position: absolute; bottom: 10px; right: 25px; z-index: 20; color: rgba(255,255,255,0.3); background: rgba(0,0,0,0.4); border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; backdrop-filter: blur(5px); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.btn-fav.active { color: #ff4757; background: rgba(255,255,255,0.15); }
.btn-fav svg { width: 18px; height: 18px; }
.btn-fav:hover { transform: scale(1.1); color: #ff4757; }

.fs-playlist-item { width: 100%; margin-bottom: 10px; height: 70px !important; min-height: 70px; }
.fs-playlist-item .cover-container { width: 70px !important; height: 70px !important; }
.fs-playlist-item .song-info { padding: 0 12px !important; }
.fs-playlist-item .song-info .title { font-size: 0.9rem !important; }
.fs-playlist-item .song-info .artist { font-size: 0.8rem !important; }

.q-ribbon.mini-ribbon { top: 8px; right: -32px; width: 85px; height: 16px; font-size: 0.5rem; transform: rotate(45deg); }

.fs-view-switcher { flex-shrink: 0; display: none; height: calc(80px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(10,10,12,0.85); backdrop-filter: blur(30px); justify-content: space-around; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); z-index: 2200; }

@keyframes rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* --- MOBILE STABLE --- */
@media (max-width: 1100px) {
    #app { padding: 20px 16px 130px; }
    .hero { flex-direction: column; padding: 40px 25px; text-align: center; gap: 20px; border-radius: 28px; }
    .profile-container { width: 140px; height: 140px; }
    .hero-socials { position: relative; bottom: auto; right: auto; margin-top: 20px; justify-content: center; }

    /* Hide recording UI on Mobile */
    #btn-manual-beautiful, #btn-record-fs { display: none !important; }
    .fs-quality-bar { gap: 10px; }

    .songs-grid { grid-template-columns: 1fr; gap: 15px; }
    .song-card { height: 80px; }
    .cover-container { width: 80px; height: 80px; }
    .song-info { padding: 0 15px; }
    .song-info .title { font-size: 0.95rem; }
    .song-info .artist { font-size: 0.85rem; }

    #player-bar { padding: 0; height: 80px; display: flex; align-items: stretch; }
    .player-content { display: flex !important; justify-content: space-between; align-items: center; width: 100%; gap: 10px; padding-right: 15px; margin-top: 3px; }
    .current-track { height: 100%; align-items: center; margin-top: 3px; }
    .current-track .cover-wrapper { width: 80px; height: 80px; border-radius: 0; border: none; border-right: 1px solid rgba(255,255,255,0.1); }
    
    .track-details, .player-timeline span { display: none !important; }
    .player-controls { gap: 12px; display: flex; align-items: center; margin-top: 5px; }
    #btn-fav-player, #btn-share-player { display: none !important; }
    .icon-btn { width: 34px; height: 34px; }
    .main-play-btn { width: 42px; height: 42px; }
    .quality-btn { display: none !important; }
    #btn-more-player { display: flex !important; }
    .player-timeline { position: absolute; top: 0; left: 0; width: 100%; height: 3px; }

    .fs-header { flex: 0 0 50px; padding: 0 15px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; margin-top: env(safe-area-inset-top); }
    #btn-close-fs { margin: 0; width: 36px; height: 36px; background: none; justify-content: flex-start; }
    #btn-fs-toggle { margin: 0; width: 36px; height: 36px; background: none; justify-content: flex-end; display: flex !important; }
    #btn-close-fs svg { width: 30px; height: 30px; opacity: 0.8; }
    #btn-fs-toggle svg { width: 24px; height: 24px; opacity: 0.8; }
    .fs-playing-from { height: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; overflow: hidden; }
    .fs-playing-from p, .fs-playing-from h4 { margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
    .fs-playing-from h4 { font-size: 0.85rem; max-width: 180px; }

    .fs-body { flex: 1 1 auto; display: flex; width: 300vw; transition: transform 0.5s cubic-bezier(0.2, 0, 0.2, 1); gap: 0; overflow: visible; position: relative; min-height: 0; padding: 0;}
    .fs-list-column, .fs-main-info-column, .fs-lyrics-column { width: 100vw !important; min-width: 100vw !important; flex-shrink: 0; height: 100%; border-radius: 0; background: transparent; backdrop-filter: none; border: none; padding: 10px 20px; overflow-x: hidden; }
    #fs-view-list, #fs-view-disc, #fs-view-lyrics { display: flex !important; flex-direction: column; opacity: 1; position: relative; justify-content: space-around !important; height: 100%; overflow-x: hidden; padding-bottom: 0; }
    
    .fs-main-info-column { 
        justify-content: flex-start !important; 
        height: 100%; 
        padding-bottom: 20px; 
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .vinyl-wrapper { width: min(300px, 42vh); height: min(300px, 42vh); margin-bottom: 10px; margin-top: 5px; flex-shrink: 0; }
    .fs-metadata { margin-top: 0; }
    .fs-playback-group { margin-top: 10px; padding: 0 10px; flex-shrink: 0; }
    .fs-controls .btn-fav-fs, .fs-controls .btn-share-fs { display: none !important; }
    .fs-quality-bar .btn-fav-fs, .fs-quality-bar .btn-share-fs { display: flex !important; }
    .fs-controls { gap: clamp(15px, 8vw, 40px); }

    .fs-view-switcher { display: flex !important; flex: 0 0 calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(10,10,12,0.85); backdrop-filter: blur(30px); justify-content: space-around; align-items: center; border-top: 1px solid rgba(255,255,255,0.1); }
    .switcher-btn { background: none; border: none; color: rgba(255,255,255,0.4); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; flex: 1; }
    .switcher-btn.active { color: var(--primary); }
    .switcher-btn svg { width: 20px; height: 20px; }
    .switcher-btn span { font-size: 0.6rem; font-weight: 700; }
    
    .lyric-line { font-size: 1.2rem; padding: 0 15px; }
}

@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.skeleton { 
    background: rgba(255, 255, 255, 0.03); 
    position: relative; overflow: hidden; border: 1px solid var(--glass-border);
}
.skeleton::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: shimmer 1.5s infinite linear;
}
.loader-container { display: flex; flex-direction: column; gap: 40px; width: 100%; }
.skeleton-album { height: 40px; width: 200px; border-radius: 8px; margin-bottom: 30px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
.skeleton-card { height: 90px; border-radius: 16px; }
.hidden { display: none !important; }

/* --- CUSTOM GLASS SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 10px; transition: 0.3s; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

thumb:hover { background: var(--primary); }


/* Share Modal Luxury */
.modal { 
    position: fixed; 
    top: 0; left: 0; 
    width: 100vw; height: 100vh; 
    background: rgba(0,0,0,0.85); 
    z-index: 9999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}
.modal.hidden { display: none !important; opacity: 0; }
.modal-content { 
    background: #121215; 
    padding: 30px; 
    border-radius: 25px; 
    border: 1px solid var(--primary); 
    width: 90%; 
    max-width: 400px; 
    text-align: center; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    color: #fff;
}
.modal-content h3 { font-family: var(--font-luxury); color: var(--primary); margin-bottom: 20px; }
.social-links { display: flex; gap: 15px; justify-content: center; margin-bottom: 20px; }
.share-btn { padding: 10px 20px; border-radius: 8px; color: #fff; text-decoration: none; font-size: 0.9rem; transition: 0.3s; }
.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #1da1f2; }
.copy-link { display: flex; gap: 10px; margin-top: 10px; }
.copy-link input { flex: 1; background: #050507; border: 1px solid #333; color: #aaa; padding: 10px; border-radius: 8px; font-family: monospace; }
.copy-link button { background: var(--primary); color: #000; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 700; cursor: pointer; }
