@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&family=Nunito:wght@700;800;900&display=swap');

:root {
  --hud-scale: 0.45;

  --color-bg-dark: #281f2e;
  --color-border-dark: #703b61;
  --color-shell-pink: #ff99c4;
  --color-accent-pink: #f15ba5;
  --color-glow-pink: rgba(255, 101, 181, 0.46);
  --color-text-light: #fff2f7;
  --color-text-pink: #ffbed8;
  --color-text-muted: #9f7c96;
  --color-text-dark: #63374f;

  --color-green: #4eed96;
  --color-warning: #ffb834;
  --color-danger: #ff3b69;
  --color-blue-highbeam: #4dc9ff;

  --icon-inactive: #966b88;
  --music-popup-width: 380px;
}

@media (max-width: 1400px) {
  :root {
    --hud-scale: 0.40;
  }
}

@media (min-width: 2200px) {
  :root {
    --hud-scale: 0.54;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  font-family: 'Nunito', 'Inter', sans-serif;
  overflow: hidden;
}

/* JGVRP Compatibility Element layer (invisible) */
.template-compat-dl,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  pointer-events: none;
}

/* Speedometer App Root - Anchored in Bottom-Right Corner */
.speedometer-app {
  position: fixed;
  right: 16px;
  bottom: calc(-78px * var(--hud-scale));
  pointer-events: none;
  z-index: 99999;
}

/* Speedometer Stage: 1024x1024 Figma Canvas Coordinate Space */
.speedometer-stage {
  position: relative;
  width: 1024px;
  height: 1024px;
  margin: 0;
  transform-origin: bottom right;
  scale: var(--hud-scale);
  translate: 0 0;
  rotate: 0deg;
  pointer-events: auto;
}

/* Full 1024x1024 Layer Containers */
.hud-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 1024px;
  height: 1024px;
  pointer-events: none;
}

.full-stage-svg,
.kitten-mascot-svg,
.bottom-control-panel-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 1024px;
  height: 1024px;
  display: block;
  max-width: none;
  pointer-events: none;
}

.abs-box {
  position: absolute;
}

.abs-inset {
  position: absolute;
}

.block-full-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

/* ========================================================
   1. CAT SILHOUETTE & EAR PAW INDICATORS
   ======================================================== */
.housing-layer {
  z-index: 1;
  transition: filter 0.25s ease;
}

.housing-layer.headlights-on {
  filter: drop-shadow(0 0 16px rgba(255, 91, 209, 0.45));
}

.housing-layer.highbeam-on {
  filter: drop-shadow(0 0 22px rgba(77, 201, 255, 0.65));
}

.ear-paw-indicator {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.ear-paw-indicator.left {
  left: 197px;
  top: 205px;
}

.ear-paw-indicator.right {
  left: 740px;
  top: 215px;
}

.ear-paw-indicator.active {
  opacity: 1;
  background: radial-gradient(circle, rgba(78, 237, 150, 0.55) 0%, rgba(78, 237, 150, 0) 70%);
  box-shadow: 0 0 28px rgba(78, 237, 150, 0.85);
  animation: indicator-flash 0.5s infinite;
}

@keyframes indicator-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ========================================================
   2. SPEEDOMETER DIAL (TICKS, ARCS, PAWS, NEEDLE, SPEED)
   ======================================================== */
.dial-layer {
  z-index: 2;
  overflow: hidden;
}

.dial-tick-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dial-tick-rot {
  flex: none;
}

.dial-tick-bar {
  position: relative;
  border-radius: 0.7px;
  transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.dial-tick-box.rpm-lit .dial-tick-bar.minor {
  background: #ff9eec !important;
  box-shadow: 0 0 8px rgba(255, 158, 236, 0.85);
}

.dial-tick-box.rpm-lit .dial-tick-bar.major {
  background: #ffffff !important;
  box-shadow: 0 0 10px rgba(185, 223, 255, 0.95);
}

.dynamic-illuminated-arc-svg {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.dial-speed-mark {
  position: absolute;
  width: 58px;
  height: 36px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 30px;
  color: #b7d8ff;
  text-align: center;
  line-height: 0;
  word-break: break-word;
}

.dial-speed-mark p {
  line-height: 1;
}

.dial-paw-box {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.dial-paw-box.rpm-active {
  filter: drop-shadow(0 0 6px rgba(255, 130, 230, 0.85));
}

.dial-paw-rot {
  flex: none;
  position: relative;
}

.dial-paw-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
}

/* Needle Pivot centered at (512, 520) - 60/120/144fps GPU Compositor Layer */
.dial-needle-pivot {
  position: absolute;
  left: 0;
  top: 0;
  width: 1024px;
  height: 1024px;
  transform-origin: 512px 520px;
  transform: rotate3d(0, 0, 1, 0deg);
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
}

.dial-current-speed {
  position: absolute;
  left: 513.5px;
  top: 416px;
  width: 320px;
  height: 137px;
  transform: translateX(-50%);
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 142px;
  line-height: 1;
  color: #fffcff;
  text-align: center;
  letter-spacing: -4px;
  text-shadow: 0px 0px 22px rgba(251, 54, 213, 0.63);
  white-space: nowrap;
  transition: font-size 0.12s ease, top 0.12s ease;
}

.dial-current-speed.three-digits {
  font-size: 112px;
  top: 432px;
}

.dial-speed-unit {
  position: absolute;
  left: 512px;
  top: 567.5px;
  width: 130px;
  height: 45px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 39px;
  color: #d1acf8;
  text-align: center;
  line-height: 0;
}

.dial-speed-unit p {
  line-height: 1;
}

/* ========================================================
   3. FISHBONE FUEL GAUGE (3:1518)
   ======================================================== */
.fuel-layer {
  z-index: 3;
  overflow: hidden;
}

.fuel-label-f {
  position: absolute;
  left: 223.5px;
  top: 455px;
  width: 43px;
  height: 44px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 40px;
  color: #b7d8ff;
  text-align: center;
  line-height: 0;
}

.fuel-label-f p,
.fuel-label-e p {
  line-height: 1;
}

.fuel-label-e {
  position: absolute;
  left: 254.5px;
  top: 751.5px;
  width: 43px;
  height: 45px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 40px;
  color: #f64f91;
  text-align: center;
  line-height: 0;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.fish-rib,
.fish-part {
  transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.fish-bone-lit {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.fish-bone-empty {
  opacity: 0.85;
}

/* Vibrant per-segment neon glow from F (Cyan/Violet) down to E (Coral/Red) */
#fish-head:not(.depleted) {
  filter: drop-shadow(0 0 8px rgba(138, 244, 255, 0.78)) drop-shadow(0 0 14px rgba(198, 122, 255, 0.55));
}

.fish-rib[data-rib="5"]:not(.depleted) {
  filter: drop-shadow(0 0 7px rgba(155, 225, 255, 0.82));
}

.fish-rib[data-rib="4"]:not(.depleted) {
  filter: drop-shadow(0 0 7px rgba(215, 115, 255, 0.82));
}

.fish-rib[data-rib="3"]:not(.depleted) {
  filter: drop-shadow(0 0 7px rgba(250, 96, 184, 0.85));
}

.fish-rib[data-rib="2"]:not(.depleted) {
  filter: drop-shadow(0 0 7px rgba(255, 85, 130, 0.88));
}

.fish-rib[data-rib="1"]:not(.depleted) {
  filter: drop-shadow(0 0 8px rgba(255, 56, 80, 0.92));
}

#fish-tail:not(.depleted) {
  filter: drop-shadow(0 0 8px rgba(255, 46, 76, 0.9));
}

/* Depleted state: hide glowing colored layer, reveal dark recessed skeleton */
.fish-rib.depleted,
#fish-head.depleted,
#fish-tail.depleted {
  filter: none;
}

.fish-rib.depleted .fish-bone-lit,
#fish-head.depleted .fish-bone-lit,
#fish-tail.depleted .fish-bone-lit {
  opacity: 0 !important;
}

#fish-spine-fill,
#fish-spine-glow {
  transition: stroke-dashoffset 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.fuel-layer.low-fuel-alert .fuel-label-e,
.fuel-layer.low-fuel-alert .fuel-pump-group,
.fuel-layer.low-fuel-alert .fish-rib[data-rib="1"]:not(.depleted),
.fuel-layer.low-fuel-alert #fish-tail:not(.depleted) {
  filter: drop-shadow(0 0 10px rgba(255, 46, 85, 0.95));
  animation: indicator-flash 0.6s infinite;
}

.fuel-pump-body {
  position: absolute;
  background: linear-gradient(180deg, #e59bff 0%, #ff5c97 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 92, 151, 0.55);
}

.fuel-pump-display {
  position: absolute;
  background: #25113c;
  border-radius: 1px;
}

.fuel-pump-base {
  position: absolute;
  background: #ff5c97;
}

/* ========================================================
   4. HEALTH HEARTS (3:1502)
   ======================================================== */
.health-layer {
  z-index: 4;
  overflow: hidden;
}

.health-max-label {
  position: absolute;
  left: 807.5px;
  top: 456.5px;
  width: 93px;
  height: 37px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 29px;
  color: #f282d8;
  text-align: center;
  line-height: 0;
}

.health-max-label p,
.health-min-label p {
  line-height: 1;
}

.health-min-label {
  position: absolute;
  left: 779px;
  top: 760px;
  width: 64px;
  height: 38px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 30px;
  color: #e54baa;
  text-align: center;
  line-height: 0;
}

.health-heart .heart-filled-wrap {
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.health-heart .heart-empty-img {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.health-heart.active .heart-filled-wrap {
  opacity: 1;
}

.health-heart.active .heart-empty-img {
  opacity: 0;
}

/* ========================================================
   5. WAVING KITTEN MASCOT (3:1478)
   ======================================================== */
.kitten-layer {
  z-index: 5;
  transform-origin: 512px 710px;
  animation: kitten-breath 3.2s ease-in-out infinite;
}

.kitten-layer.excited {
  animation: kitten-excited-vibe 0.45s ease-in-out infinite alternate;
}

.kitten-layer.damaged {
  animation: kitten-shiver 0.22s ease-in-out infinite;
}

/* Continuous Waving Hand Animation (Arm + Paw Pads locked to same pivot) */
.kitten-waving-arm,
.kitten-waving-arm-pads {
  transform-box: view-box;
  transform-origin: 562px 738px;
  animation: paw-wave 0.95s ease-in-out infinite alternate;
}

.kitten-layer.excited .kitten-waving-arm,
.kitten-layer.excited .kitten-waving-arm-pads {
  animation-duration: 0.42s;
}

/* Continuous Natural Eye Blinking Animation */
.kitten-eye {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: kitten-blink-loop 3.8s ease-in-out infinite;
  transition: transform 0.1s ease;
}

.kitten-layer.blinking #kitten-eye-left,
.kitten-layer.blinking #kitten-eye-right {
  animation: none;
  transform: scaleY(0.1) scaleX(1.08);
}

@keyframes kitten-breath {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@keyframes paw-wave {
  0% { transform: rotate(-7deg); }
  100% { transform: rotate(13deg); }
}

@keyframes kitten-blink-loop {
  0%, 38%, 44%, 74%, 79%, 84%, 100% {
    transform: scaleY(1) scaleX(1);
  }
  41%, 76.5%, 81.5% {
    transform: scaleY(0.08) scaleX(1.06);
  }
}

@keyframes kitten-excited-vibe {
  0% { translate: 0 0; scale: 1; }
  100% { translate: 0 -6px; scale: 1.02; }
}

@keyframes kitten-shiver {
  0% { translate: -2px 0; }
  50% { translate: 2px -2px; }
  100% { translate: -2px 1px; }
}

/* ========================================================
   6. CAT DRIVE INDICATOR (3:1466)
   ======================================================== */
.drive-layer {
  z-index: 6;
  overflow: hidden;
}

.drive-gear-label {
  position: absolute;
  left: 703px;
  top: 675px;
  width: 56px;
  height: 58px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 58px;
  color: #ffffff;
  text-align: center;
  line-height: 0;
}

.drive-gear-label p {
  line-height: 1;
}

/* ========================================================
   7. BOTTOM CONTROL PANEL & MUSIC ICON (3:1444)
   ======================================================== */
.bottom-panel-layer {
  z-index: 7;
}

.bottom-control-panel-svg .svg-ctrl {
  pointer-events: auto;
  cursor: pointer;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* Seatbelt Control States */
#control-belt.active {
  filter: drop-shadow(0 0 12px rgba(78, 237, 150, 0.9));
}

#control-belt.alert {
  filter: drop-shadow(0 0 14px rgba(255, 59, 105, 1));
  animation: indicator-flash 0.5s infinite;
}

/* Key Control States */
#control-key.active {
  filter: drop-shadow(0 0 12px rgba(225, 138, 248, 0.95));
}

/* Engine Control States */
#control-engine.active {
  filter: drop-shadow(0 0 12px rgba(251, 105, 186, 0.95));
}

#control-engine.alert {
  filter: drop-shadow(0 0 16px rgba(255, 59, 105, 1));
  animation: indicator-flash 0.5s infinite;
}

/* Kawaii Neon Music Button inside Right side of Bottom Control Panel */
.kawaii-music-btn {
  position: absolute;
  left: 632px;
  top: 794px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e18af8;
  filter: drop-shadow(0 0 10px rgba(225, 138, 248, 0.8));
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

.kawaii-music-btn:hover,
.kawaii-music-btn.active {
  color: #fa68bb;
  filter: drop-shadow(0 0 14px rgba(251, 54, 213, 0.95));
  transform: scale(1.08);
}

.kawaii-music-svg {
  width: 44px;
  height: 44px;
  display: block;
}

/* ========================================================
   YOUTUBE MUSIC PLAYER POPUP WINDOW
   ======================================================== */
.music-popup-window {
  position: fixed;
  right: 510px;
  bottom: 20px;
  width: var(--music-popup-width);
  max-width: 90vw;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #251829; /* Solid color, zero backdrop-filter to prevent CEF black box bug */
  border: 3px solid var(--color-border-dark);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 14px rgba(241, 91, 165, 0.35);
  padding: 14px 16px;
  color: var(--color-text-light);
  font-family: 'Inter', sans-serif;
  z-index: 100000;
  pointer-events: auto;
  user-select: none;
  translate: 0 0;
  scale: 1;
  rotate: 0deg;
  opacity: 1;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              scale 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-popup-window::-webkit-scrollbar {
  width: 5px;
}
.music-popup-window::-webkit-scrollbar-track {
  background: transparent;
}
.music-popup-window::-webkit-scrollbar-thumb {
  background: var(--color-border-dark);
  border-radius: 4px;
}

.music-popup-window.closed {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  scale: 0.92;
  translate: 0 12px;
}

/* Header & Drag Handle */
.music-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 190, 216, 0.15);
  cursor: grab;
}

.music-popup-header:active {
  cursor: grabbing;
}

.music-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-pink);
  letter-spacing: 0.3px;
}

.music-drag-grip {
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1;
  opacity: 0.6;
}

.music-header-icon {
  font-size: 15px;
}

.music-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-action-btn {
  background: #39253c;
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-pink);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.music-action-btn:hover {
  background: #502e4c;
  color: #fff;
  border-color: var(--color-accent-pink);
}

.music-action-btn.close {
  padding: 3px 7px;
  font-size: 12px;
}

.music-action-btn.close:hover {
  background: var(--color-danger);
  border-color: var(--color-danger);
}

/* Search & Link Section */
.music-search-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.music-search-form {
  display: flex;
  gap: 6px;
}

.music-search-input {
  flex: 1;
  background: #1e1623;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--color-text-light);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.music-search-input:focus {
  border-color: var(--color-accent-pink);
  box-shadow: 0 0 10px rgba(241, 91, 165, 0.4);
}

.music-search-input::placeholder {
  color: rgba(159, 124, 150, 0.7);
}

.music-play-btn {
  background: var(--color-accent-pink);
  border: none;
  border-radius: 12px;
  padding: 8px 14px;
  color: #fff;
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(241, 91, 165, 0.5);
  transition: all 0.15s ease;
}

.music-play-btn:hover {
  background: #ff70ba;
  box-shadow: 0 0 14px rgba(255, 112, 186, 0.7);
  scale: 1.03;
}

.music-play-btn:active {
  scale: 0.97;
}

/* Quick Chips */
.music-quick-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.music-chip {
  background: rgba(57, 37, 60, 0.7);
  border: 1px solid rgba(112, 59, 97, 0.6);
  border-radius: 12px;
  padding: 4px 8px;
  font-size: 10.5px;
  color: var(--color-text-pink);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.music-chip:hover {
  background: var(--color-border-dark);
  border-color: var(--color-accent-pink);
  color: #fff;
}

/* ========================================================
   YOUTUBE SEARCH RESULTS SELECTION LIST
   ======================================================== */
.music-results-container {
  background: #1b1320;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 14px;
  padding: 8px 10px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
}

.music-results-container.hidden {
  display: none !important;
}

.music-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 190, 216, 0.12);
}

.results-count-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-pink);
}

.results-close-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}

.results-close-btn:hover {
  color: var(--color-danger);
}

.music-results-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 180px;
  padding-right: 4px;
}

/* Pink Scrollbar for results */
.music-results-list::-webkit-scrollbar {
  width: 5px;
}
.music-results-list::-webkit-scrollbar-track {
  background: #241829;
  border-radius: 4px;
}
.music-results-list::-webkit-scrollbar-thumb {
  background: #703b61;
  border-radius: 4px;
}
.music-results-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-pink);
}

.yt-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #332036;
  border: 1px solid #482b4a;
  cursor: pointer;
  transition: all 0.15s ease;
}

.yt-result-item:hover {
  background: #462843;
  border-color: var(--color-accent-pink);
  box-shadow: 0 0 8px rgba(241, 91, 165, 0.3);
  translate: 2px 0;
}

.yt-thumb-wrap {
  position: relative;
  width: 64px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #110b14;
}

.yt-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-duration-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 9px;
  font-family: monospace;
  padding: 1px 3px;
  border-radius: 3px;
}

.yt-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.yt-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yt-author {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-play-arrow {
  color: var(--color-text-pink);
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s ease, scale 0.15s ease;
}

.yt-result-item:hover .yt-play-arrow {
  opacity: 1;
  color: var(--color-green);
  scale: 1.2;
}

/* Loading & Empty state */
.music-results-status {
  padding: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Now Playing Bar */
.music-now-playing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #3e2239;
  border: 1px solid var(--color-border-dark);
  border-radius: 10px;
  padding: 5px 10px;
  margin-bottom: 8px;
  font-size: 11px;
}

.music-now-playing.hidden {
  display: none !important;
}

.now-playing-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.now-playing-icon {
  font-size: 13px;
  animation: pulse-music 1.2s infinite alternate;
}

@keyframes pulse-music {
  0% { scale: 0.95; color: var(--color-text-pink); }
  100% { scale: 1.15; color: var(--color-accent-pink); }
}

.now-playing-text {
  color: var(--color-text-light);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.change-video-btn {
  background: var(--color-bg-dark);
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-pink);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  transition: all 0.15s ease;
}

.change-video-btn:hover {
  background: #502e4c;
  color: #fff;
  border-color: var(--color-accent-pink);
}

/* Player View Container */
.music-player-view {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1b1320;
  border-radius: 14px;
  border: 1.5px solid var(--color-border-dark);
  overflow: hidden;
  margin-bottom: 12px;
  transition: aspect-ratio 0.25s ease, height 0.25s ease;
}

.music-popup-window.mini .music-player-view {
  aspect-ratio: unset;
  height: 60px;
}

.music-player-view iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.music-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--color-text-muted);
  background: #1b1320;
  gap: 6px;
  pointer-events: none;
}

.music-placeholder.hidden {
  display: none;
}

.placeholder-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 6px var(--color-accent-pink));
}

.music-placeholder p {
  font-size: 11px;
  line-height: 1.4;
}

/* Customization Bar (Ukuran & Tata Letak) */
.music-customization-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 190, 216, 0.12);
  font-size: 11px;
}

.music-adjust-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adjust-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.adjust-label {
  color: var(--color-text-pink);
  font-weight: 600;
  font-size: 11px;
}

.adjust-val {
  color: var(--color-text-light);
  font-family: monospace;
  font-size: 11px;
}

.music-slider {
  width: 100%;
  accent-color: var(--color-accent-pink);
  cursor: pointer;
  height: 5px;
}

.music-layout-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.music-preset-btns {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.music-pos-btn {
  flex: 1;
  min-width: 70px;
  background: #39253c;
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-pink);
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.music-pos-btn:hover {
  background: #502e4c;
  color: #fff;
  border-color: var(--color-accent-pink);
}

.music-pos-btn.active {
  background: var(--color-accent-pink);
  color: #fff;
  border-color: var(--color-accent-pink);
  box-shadow: 0 0 8px rgba(241, 91, 165, 0.4);
}
