/* ==========================================================================
   Design System & Theme Tokens
   ========================================================================== */
:root {
  /* Color Palette - Default Theme (Rose) */
  --primary-color: #ff3366;
  --primary-glow: rgba(255, 51, 102, 0.6);
  --secondary-color: #ff758c;
  --bg-dark: #08040c;
  --glass-bg: rgba(18, 10, 26, 0.68);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-dim: rgba(255, 255, 255, 0.45);
  
  --font-main: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-handwriting: 'Great Vibes', cursive;
  
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Color Themes */
[data-theme="crimson"] {
  --primary-color: #e60039;
  --primary-glow: rgba(230, 0, 57, 0.65);
  --secondary-color: #ff4d6d;
}

[data-theme="cyber"] {
  --primary-color: #00f0ff;
  --primary-glow: rgba(0, 240, 255, 0.6);
  --secondary-color: #7000ff;
}

[data-theme="violet"] {
  --primary-color: #b026ff;
  --primary-glow: rgba(176, 38, 255, 0.65);
  --secondary-color: #ff26b0;
}

[data-theme="gold"] {
  --primary-color: #ffaa00;
  --primary-glow: rgba(255, 170, 0, 0.65);
  --secondary-color: #ffe600;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
}

/* Custom Minimal Dark Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #08040c;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Fixed Fullscreen Particle Canvas */
#heartCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
  pointer-events: none;
}

/* Background Ambient Vignette */
.bg-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 25%, rgba(8, 4, 12, 0.85) 100%);
}

/* ==========================================================================
   Scrollable Story Sections Overlay
   ========================================================================== */
.story-container {
  position: relative;
  z-index: 5;
  width: 100%;
  pointer-events: auto;
}

.story-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  box-sizing: border-box;
  position: relative;
}

/* Hero Section */
.hero-section {
  justify-content: center;
}

.center-message-container {
  text-align: center;
}

.glow-text {
  font-family: var(--font-handwriting);
  font-size: clamp(3.5rem, 12vw, 7.5rem);
  color: #ffffff;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 30px var(--primary-color),
    0 0 60px var(--primary-glow);
  white-space: nowrap;
  line-height: 1.2;
  padding: 0 20px;
  opacity: 0;
  transform: scale(0.6) translateY(20px);
  transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glow-text.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: floatPulse 4s ease-in-out infinite alternate;
  animation-delay: 1.2s;
}

@keyframes floatPulse {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.92;
  }
  100% {
    transform: translateY(-8px) scale(1.03);
    opacity: 1;
  }
}

/* Scroll Hint Indicator */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 1s ease-in;
  animation: bounce 2s infinite;
}

.scroll-hint.visible {
  opacity: 0.75;
}

.scroll-arrow {
  font-size: 1.2rem;
  color: var(--primary-color);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -10px);
  }
  60% {
    transform: translate(-50%, -5px);
  }
}

/* Love Cards Styling */
.love-card {
  pointer-events: auto;
  max-width: 620px;
  width: 90%;
  padding: 36px 40px;
  border-radius: 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-align: center;
  opacity: 0;
  transform: translate3d(0, 55px, 0) scale(0.94);
  will-change: transform, opacity, filter;
  transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  margin: 0 auto;
  backface-visibility: hidden;
}

.love-card.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.love-card:hover {
  transform: translate3d(0, -6px, 0) scale(1.01);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 20px var(--primary-glow);
}

.card-sparkle {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px var(--primary-glow));
}

.love-card-title {
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 30%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.love-quote-long {
  font-size: clamp(1.02rem, 3vw, 1.25rem);
  line-height: 1.75;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.love-quote {
  font-size: clamp(1.15rem, 3.5vw, 1.55rem);
  line-height: 1.6;
  font-weight: 300;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.love-final-title {
  font-family: var(--font-handwriting);
  font-size: clamp(2.5rem, 7vw, 4.2rem);
  color: #ffffff;
  text-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 25px var(--primary-color),
    0 0 50px var(--primary-glow);
  margin-bottom: 8px;
  line-height: 1.2;
}

.love-quote-sub {
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   UI Controls & Glassmorphism Panel
   ========================================================================== */
.floating-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.controls-wrapper {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  width: 90%;
  max-width: 540px;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.controls-wrapper.hidden-panel {
  transform: translate(-50%, 120%);
  opacity: 0;
  pointer-events: none;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color var(--transition-fast);
}

.close-btn:hover {
  color: var(--text-main);
}

.controls-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-val {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.val-badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--primary-color);
  font-weight: 600;
}

/* Inputs & Buttons */
input[type="text"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  font-family: var(--font-main);
}

input[type="text"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* Theme Selector Buttons */
.theme-buttons {
  display: flex;
  gap: 12px;
}

.theme-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--btn-color);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.theme-btn:hover {
  transform: scale(1.15);
}

.theme-btn.active {
  border-color: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 14px var(--btn-color);
}

/* Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  box-shadow: 0 0 10px var(--primary-glow);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Action Buttons Grid */
.action-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.glass-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
  font-family: var(--font-main);
}

.glass-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

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

.glass-btn.primary-action {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.glass-btn.primary-action:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #000000;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 40;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.toast.hidden {
  opacity: 0;
  transform: translate(-50%, -20px);
}

/* ==========================================================================
   Obsidian Glass YouTube Music Player (from rayquza.de)
   ========================================================================== */
.pub-music-widget {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 35;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: rgba(14, 8, 18, 0.82);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px var(--primary-glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.pub-music-widget:hover {
  border-color: var(--primary-color);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 28px var(--primary-glow);
}

.pub-music-widget.hidden,
.pub-music-pill.hidden {
  display: none !important;
}

.pub-music-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pub-music-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pub-note-icon {
  color: var(--primary-color);
  font-size: 0.85rem;
}

.pub-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pub-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.pub-eq-bar {
  width: 2.5px;
  background: var(--primary-color);
  height: 3px;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.pub-music-widget.playing .pub-eq-bar:nth-child(1) { animation: eqAnimation 0.7s infinite alternate ease-in-out; }
.pub-music-widget.playing .pub-eq-bar:nth-child(2) { animation: eqAnimation 1.0s infinite alternate ease-in-out 0.2s; }
.pub-music-widget.playing .pub-eq-bar:nth-child(3) { animation: eqAnimation 0.8s infinite alternate ease-in-out 0.4s; }
.pub-music-widget.playing .pub-eq-bar:nth-child(4) { animation: eqAnimation 1.1s infinite alternate ease-in-out 0.1s; }

@keyframes eqAnimation {
  0% { height: 3px; }
  100% { height: 14px; }
}

.pub-btn-minimize {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pub-btn-minimize:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.08);
}

.pub-music-body {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

.pub-song-cover-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 15px var(--primary-glow);
  background: #0d0612;
  transition: transform 0.3s ease;
}

.cover-vinyl-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #08040c;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 4px rgba(0,0,0,0.8);
  pointer-events: none;
}

.pub-song-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-music-widget.playing .pub-song-cover-wrap {
  animation: spinVinyl 14s linear infinite;
}

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

.pub-song-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-song-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pub-song-text-wrap {
  flex: 1;
  min-width: 0;
}

.pub-song-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.pub-song-artist {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.pub-btn-play:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px var(--primary-glow);
}

.pub-btn-play:active {
  transform: scale(0.95);
}

.pub-btn-play svg {
  width: 16px;
  height: 16px;
}

.pub-icon-play {
  margin-left: 2px;
}

.hidden {
  display: none !important;
}

/* Progress Track & Thumb */
.pub-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.pub-time-text {
  font-size: 0.68rem;
  font-family: monospace;
  color: var(--text-dim);
  min-width: 26px;
  user-select: none;
}

#pubTimeDuration {
  text-align: right;
}

.pub-progress-track {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease, background 0.15s ease;
  user-select: none;
  touch-action: none;
}

.pub-progress-track:hover {
  height: 7px;
  background: rgba(255, 255, 255, 0.18);
}

.pub-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  position: relative;
  pointer-events: none;
}

.pub-progress-thumb {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  width: 10px;
  height: 10px;
  background: #ffffff;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-glow);
  transition: transform 0.15s ease;
}

.pub-progress-track:hover .pub-progress-thumb,
.pub-progress-track.scrubbing .pub-progress-thumb {
  transform: translateY(-50%) scale(1.25);
  box-shadow: 0 0 12px var(--primary-color);
}

/* Volume Row */
.pub-volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pub-btn-vol {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.pub-btn-vol:hover {
  opacity: 1;
  transform: scale(1.1);
}

.pub-volume-track {
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
  user-select: none;
  touch-action: none;
}

.pub-volume-track:hover {
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
}

.pub-volume-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  position: relative;
  pointer-events: none;
}

.pub-volume-thumb {
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%) scale(0.75);
  width: 8px;
  height: 8px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.pub-volume-track:hover .pub-volume-thumb {
  transform: translateY(-50%) scale(1.15);
}

.pub-vol-percent {
  font-size: 0.66rem;
  font-family: monospace;
  color: var(--text-dim);
  min-width: 28px;
  user-select: none;
}

/* ==========================================================================
   Compact Floating Music Pill (Minimized State)
   ========================================================================== */
.pub-music-pill {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 40px;
  background: rgba(14, 8, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 18px var(--primary-glow);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.pub-music-pill:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), 0 0 24px var(--primary-glow);
}

.pill-cover-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--primary-color);
  flex-shrink: 0;
  box-shadow: 0 2px 8px var(--primary-glow);
  background: #0d0612;
}

.pill-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-music-pill.playing .pill-cover-wrap {
  animation: spinVinyl 8s linear infinite;
}

.pill-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  opacity: 0.45;
}

.pub-music-pill.playing .pill-eq-bars {
  opacity: 1;
}

.pill-eq-bars span {
  width: 2.5px;
  background: var(--primary-color);
  border-radius: 1px;
  height: 2px;
  transition: height 0.2s ease;
}

.pub-music-pill.playing .pill-eq-bars span:nth-child(1) { animation: eqAnimation 0.8s ease-in-out infinite alternate; }
.pub-music-pill.playing .pill-eq-bars span:nth-child(2) { animation: eqAnimation 0.6s ease-in-out 0.2s infinite alternate; }
.pub-music-pill.playing .pill-eq-bars span:nth-child(3) { animation: eqAnimation 0.9s ease-in-out 0.4s infinite alternate; }
.pub-music-pill.playing .pill-eq-bars span:nth-child(4) { animation: eqAnimation 0.7s ease-in-out 0.1s infinite alternate; }

.pill-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: #ffffff;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: transform 0.2s ease;
}

.pill-play-btn:hover {
  transform: scale(1.1);
}

.pill-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-expand-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: scale(1.1);
}

/* ==========================================================================
   YouTube Settings in Controls Panel
   ========================================================================== */
.music-control-group {
  margin-top: 4px;
}

.yt-input-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 10px;
}

.glass-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
  color: #ffffff;
  font-size: 0.82rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.glass-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.yt-presets-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 6px;
}

.yt-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.yt-preset-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.74rem;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yt-preset-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.yt-preset-chip.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 3px 10px var(--primary-glow);
}

/* ==========================================================================
   Mobile Optimization & Responsive Adjustments
   ========================================================================== */
@media (max-width: 600px) {
  .love-card {
    padding: 26px 20px;
    border-radius: 20px;
  }

  .pub-music-widget {
    top: 14px;
    right: 14px;
    width: 320px;
    padding: 12px 14px;
  }

  .pub-music-pill {
    top: 14px;
    right: 14px;
    padding: 5px 12px 5px 6px;
  }

  .pill-title {
    max-width: 90px;
  }

  .floating-toggle {
    display: flex !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 40;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px var(--primary-glow);
  }

  .controls-wrapper {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: flex-end;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .controls-wrapper.hidden-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .controls-card {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 82vh;
    overflow-y: auto;
    padding: 20px 18px 28px;
  }

  .action-buttons {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .glass-btn {
    padding: 12px;
    font-size: 0.88rem;
  }

  .theme-btn {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   Admin Login Modal & Session Badge Styling
   ========================================================================== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.admin-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.admin-login-card {
  width: 90%;
  max-width: 360px;
  padding: 24px 22px;
  border-radius: 24px;
  background: rgba(18, 10, 26, 0.88);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-glow);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal-overlay.hidden .admin-login-card {
  transform: translateY(20px);
}

.admin-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-login-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-error-msg {
  color: #ff3366;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  margin-top: 2px;
  padding: 6px 10px;
  background: rgba(255, 51, 102, 0.12);
  border-radius: 8px;
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.login-submit-btn {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
}

.admin-session-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: #ffffff;
}

.admin-logout-btn {
  background: transparent;
  border: 1px solid rgba(255, 51, 102, 0.4);
  color: #ff5c77;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-logout-btn:hover {
  background: rgba(255, 51, 102, 0.2);
  border-color: #ff3366;
  color: #ffffff;
}

.save-system-wrapper {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.save-system-btn {
  width: 100%;
  padding: 12px;
  font-weight: 600;
  box-shadow: 0 4px 18px var(--primary-glow);
}

