/* ==========================================================================
   OVO-Inspired Dark Frosted-Glass Bio Page
   Palette: Deep Matte Midnight-Black & Soft Champagne-Gold (#C5A059)
   ========================================================================== */

:root {
  --bg-deep: #07070a;
  --bg-card: rgba(12, 12, 14, 0.45);
  --bg-card-inner: rgba(18, 18, 22, 0.55);
  --card-opacity: 0.45;
  --card-blur: 14px;
  --border-gold: rgba(197, 160, 89, 0.3);
  --border-gold-subtle: rgba(197, 160, 89, 0.15);
  --border-gold-hover: rgba(197, 160, 89, 0.6);
  --gold-primary: #C5A059;
  --gold-glow: rgba(197, 160, 89, 0.22);
  --gold-light: #e5cc93;
  --gold-dim: #997b40;

  --text-main: #f5f5f7;
  --text-muted: #8e8e9b;
  --text-subtle: #5f5f6c;

  /* Status Colors */
  --status-online: #23a55a;
  --status-idle: #f0b232;
  --status-dnd: #f23f43;
  --status-offline: #80848e;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 8, 10, 0.9);
}
::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.25);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(197, 160, 89, 0.5);
}

/* ==========================================================================
   1. Click-to-Enter Overlay with Cursor Interaction & Radial Fade
   ========================================================================== */
.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(197, 160, 89, 0.18) 0%, rgba(14, 14, 18, 0.88) 45%, rgba(6, 6, 8, 0.96) 80%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.overlay-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  text-align: center;
  animation: overlayPulse 3s ease-in-out infinite;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.overlay-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 14px rgba(197, 160, 89, 0.4));
}

.overlay-ovo-logo {
  width: 34px !important;
  max-width: 34px !important;
  height: auto !important;
  display: block;
  filter: drop-shadow(0 0 10px var(--gold-glow));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  pointer-events: none;
  user-select: none;
}

.enter-overlay:hover .overlay-ovo-logo {
  transform: scale(1.1);
  filter: drop-shadow(0 0 18px rgba(197, 160, 89, 0.65));
}

/* Radial fade-out mask around click point */
.enter-overlay.revealing {
  pointer-events: none;
  mask-image: radial-gradient(circle at var(--click-x, 50%) var(--click-y, 50%), transparent var(--mask-radius, 0%), black calc(var(--mask-radius, 0%) + 140px));
  -webkit-mask-image: radial-gradient(circle at var(--click-x, 50%) var(--click-y, 50%), transparent var(--mask-radius, 0%), black calc(var(--mask-radius, 0%) + 140px));
}

/* Glowing champagne-gold shockwave ripple originating from click */
.click-reveal-ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  border: 1.5px solid rgba(197, 160, 89, 0.85);
  box-shadow: 0 0 35px rgba(197, 160, 89, 0.6), inset 0 0 20px rgba(197, 160, 89, 0.35);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleOut 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rippleOut {
  0% {
    width: 0px;
    height: 0px;
    opacity: 0.95;
  }
  100% {
    width: 280vmax;
    height: 280vmax;
    opacity: 0;
  }
}

.overlay-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(197, 160, 89, 0.35);
}

.overlay-subtext {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-primary);
  opacity: 0.85;
}

@keyframes overlayPulse {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.92;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* ==========================================================================
   Full-Screen Background Layer
   ========================================================================== */
.bg-wrapper {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.65) contrast(1.08);
  transition: opacity 0.8s ease;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65) contrast(1.08);
  display: none;
}

.bg-video.active {
  display: block;
}

.bg-ambient-tint {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(197, 160, 89, 0.08) 0%, rgba(7, 7, 10, 0.6) 65%, #07070a 100%);
}

.bg-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   Floating Top-Left Audio Controls (Auto-Hiding Volume Slider)
   ========================================================================== */
.floating-media-bar {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px 7px 9px;
  background: rgba(12, 12, 14, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 999px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 15px -3px var(--gold-glow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.floating-media-bar:hover,
.floating-media-bar.expanded {
  border-color: var(--border-gold);
  box-shadow: 0 10px 30px -4px rgba(0, 0, 0, 0.7), 0 0 20px -2px var(--gold-glow);
}

.media-toggle-btn {
  background: transparent;
  border: none;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.media-toggle-btn:hover {
  color: var(--gold-light);
  transform: scale(1.1);
}

.media-icon {
  width: 17px;
  height: 17px;
}

.media-icon.hidden {
  display: none;
}

/* Auto-Hiding Volume Slider: collapses to 0 width, expands on hover / interaction */
.volume-slider-container {
  display: flex;
  align-items: center;
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              margin 0.35s ease;
}

.floating-media-bar:hover .volume-slider-container,
.floating-media-bar.expanded .volume-slider-container {
  width: 74px;
  opacity: 1;
  pointer-events: auto;
  margin: 0 4px;
}

.gold-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.gold-range:hover {
  background: rgba(255, 255, 255, 0.25);
}

.gold-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.gold-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: var(--gold-light);
}

.gold-range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: none;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
  cursor: pointer;
}

/* Sound Wave Equalizer Bars */
.sound-visualizer {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 12px;
  padding-left: 2px;
  flex-shrink: 0;
}

.v-bar {
  width: 2px;
  height: 3px;
  background: var(--gold-primary);
  border-radius: 1px;
  transition: height 0.2s ease;
}

.sound-visualizer.playing .bar-1 {
  animation: equalize 1s infinite alternate 0.1s ease-in-out;
}
.sound-visualizer.playing .bar-2 {
  animation: equalize 0.8s infinite alternate 0.3s ease-in-out;
}
.sound-visualizer.playing .bar-3 {
  animation: equalize 1.2s infinite alternate 0.2s ease-in-out;
}
.sound-visualizer.playing .bar-4 {
  animation: equalize 0.9s infinite alternate 0.4s ease-in-out;
}

@keyframes equalize {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* ==========================================================================
   2. Main Page & Centered Frosted-Glass Card
   ========================================================================== */
.page-container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px;
}

.frosted-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: rgba(12, 12, 14, var(--card-opacity));
  backdrop-filter: blur(var(--card-blur));
  -webkit-backdrop-filter: blur(var(--card-blur));
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 1.85rem 1.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8),
              0 0 35px -5px rgba(197, 160, 89, 0.14),
              inset 0 1px 1px 0 rgba(197, 160, 89, 0.25);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease,
              background 0.2s ease,
              backdrop-filter 0.2s ease,
              opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.45s ease;
}

.frosted-card:hover {
  border-color: rgba(197, 160, 89, 0.45);
  box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.9),
              0 0 45px -4px rgba(197, 160, 89, 0.2),
              inset 0 1px 1px 0 rgba(197, 160, 89, 0.35);
}

/* HUD Hide Mode: Pressed 'H' key to hide front panel and watch pure background video */
body.hud-hidden .frosted-card {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.92) !important;
}

body.hud-hidden .floating-media-bar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Subtle Gold Rim / Glow at the Top Edge */
.card-edge-glow {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold-primary) 50%, transparent 100%);
  opacity: 0.7;
}

/* ==========================================================================
   Avatar Section & Live Discord Status Dot
   ========================================================================== */
.avatar-container {
  position: relative;
  width: 104px;
  height: 104px;
  margin-bottom: 1.05rem;
}

.avatar-ring-frame {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 3px;
  border: 1px solid var(--gold-primary);
  background: linear-gradient(135deg, rgba(197, 160, 89, 0.4), rgba(12, 12, 14, 0.9));
  box-shadow: 0 0 22px -3px var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  background-color: #0c0d11;
  transition: transform 0.4s ease;
}

.avatar-ring-frame:hover .avatar-image {
  transform: scale(1.04);
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1015;
  border-radius: 50%;
}

/* Status Indicator Dot at Bottom-Right */
.status-indicator-anchor {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
}

.status-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid #0c0c0e;
  z-index: 2;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.status-ripple {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.status-dot.online {
  background-color: var(--status-online);
  box-shadow: 0 0 8px rgba(35, 165, 90, 0.7);
}
.status-dot.idle {
  background-color: var(--status-idle);
  box-shadow: 0 0 8px rgba(240, 178, 50, 0.7);
}
.status-dot.dnd {
  background-color: var(--status-dnd);
  box-shadow: 0 0 8px rgba(242, 63, 67, 0.7);
}
.status-dot.offline {
  background-color: var(--status-offline);
  box-shadow: none;
}

.status-dot.online ~ .status-ripple {
  animation: ripplePulse 2.4s infinite cubic-bezier(0, 0, 0.2, 1);
  background-color: var(--status-online);
}

@keyframes ripplePulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ==========================================================================
   Identity & Bio Section (Tightened Spacing, Quote Removed)
   ========================================================================== */
.profile-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.95rem;
}

.name-badge-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.display-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.name-symbol-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.name-ovo-logo {
  width: 18px !important;
  max-width: 18px !important;
  height: auto !important;
  display: block;
  vertical-align: middle;
  filter: drop-shadow(0 0 6px var(--gold-glow));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.name-symbol-accent:hover .name-ovo-logo {
  transform: scale(1.18) rotate(4deg);
  filter: drop-shadow(0 0 12px var(--gold-primary));
}

.bio-text {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 90%;
}

/* ==========================================================================
   Discord Presence Block (Lanyard API Integration)
   ========================================================================== */
.presence-block {
  width: 100%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 13px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.presence-block:hover {
  border-color: var(--border-gold);
  background: rgba(22, 22, 28, 0.65);
}

.presence-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.presence-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--status-offline);
  transition: background-color 0.3s ease;
}

.state-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-main);
}

.presence-platform-tag {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: rgba(197, 160, 89, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.2);
}

.presence-activity-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.activity-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-text strong {
  color: #ffffff;
  font-weight: 500;
}

.spotify-icon-badge {
  display: inline-flex;
  align-items: center;
  color: #1db954;
  flex-shrink: 0;
}

/* ==========================================================================
   Compact Live Digital Clock Card (Noticeably Smaller & Sleeker)
   ========================================================================== */
.clock-card.compact-clock {
  width: 100%;
  background: var(--bg-card-inner);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 11px;
  padding: 0.48rem 0.85rem;
  margin-bottom: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  transition: border-color 0.25s ease;
}

.clock-card.compact-clock:hover {
  border-color: var(--border-gold);
}

.compact-clock .clock-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compact-clock .clock-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compact-clock .clock-tz-name {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  background: rgba(197, 160, 89, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.18);
}

.compact-clock .clock-digits-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}

.compact-clock .clock-time {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(197, 160, 89, 0.2);
}

.compact-clock .clock-period {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-dim);
}

/* ==========================================================================
   Discord Profile Link Button
   ========================================================================== */
.profile-actions {
  width: 100%;
}

.discord-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.8rem 1.25rem;
  background: linear-gradient(135deg, rgba(20, 20, 26, 0.95), rgba(13, 13, 17, 0.95));
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(197, 160, 89, 0.2);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.discord-button:hover {
  background: linear-gradient(135deg, rgba(30, 30, 38, 0.95), rgba(20, 20, 25, 0.95));
  border-color: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.6), 0 0 20px -2px var(--gold-glow);
}

.discord-button:active {
  transform: translateY(0);
}

.discord-button-icon {
  width: 18px;
  height: 18px;
  color: var(--gold-primary);
  transition: transform 0.25s ease, color 0.25s ease;
}

.discord-button:hover .discord-button-icon {
  color: var(--gold-light);
  transform: scale(1.1);
}

.arrow-glyph {
  color: var(--gold-dim);
  transition: transform 0.25s ease, color 0.25s ease;
}

.discord-button:hover .arrow-glyph {
  color: var(--gold-light);
  transform: translateX(3px);
}

/* ==========================================================================
   OVO-Styled Frosted-Glass Modals (Passcode & Settings)
   ========================================================================== */
.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-modal.open {
  opacity: 1;
  visibility: visible;
}

.settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.settings-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 540px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: rgba(12, 12, 16, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-gold);
  border-radius: 22px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.9),
              0 0 45px -5px var(--gold-glow),
              inset 0 1px 1px 0 rgba(197, 160, 89, 0.3);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-modal.open .settings-panel {
  transform: scale(1);
}

/* Passcode Panel Specifics */
.passcode-panel {
  max-width: 380px;
}

.passcode-form {
  padding: 1.25rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.passcode-input {
  letter-spacing: 0.25em;
  font-size: 1.15rem;
  text-align: center;
}

.passcode-error-text {
  color: #f2666a;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 4px;
  animation: shake 0.35s ease;
}

.passcode-button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0.25rem;
}

.passcode-button-row button {
  flex: 1;
  justify-content: center;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.35rem 1.6rem 1rem;
  border-bottom: 1px solid var(--border-gold-subtle);
  background: rgba(16, 16, 22, 0.4);
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold-primary);
  margin-bottom: 4px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-subtitle kbd {
  font-family: inherit;
  font-size: 0.65rem;
  background: rgba(197, 160, 89, 0.15);
  border: 1px solid rgba(197, 160, 89, 0.3);
  color: var(--gold-light);
  padding: 1px 4px;
  border-radius: 3px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, transform 0.2s;
}

.modal-close-btn:hover {
  color: var(--gold-light);
  transform: scale(1.1);
}

/* Modal Body */
.modal-body {
  padding: 1.25rem 1.6rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.settings-section {
  border: 1px solid var(--border-gold-subtle);
  border-radius: 14px;
  padding: 1rem 1.15rem 1.15rem;
  background: rgba(18, 18, 24, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-legend {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  padding: 0 6px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

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

.range-value-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-light);
  background: rgba(197, 160, 89, 0.15);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.field-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(12, 12, 16, 0.85);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

.form-textarea {
  resize: vertical;
  min-height: 52px;
}

/* Toggle Switch Control */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
}

.toggle-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.switch-control {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  flex-shrink: 0;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: 0.3s;
  border-radius: 34px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 15px;
  width: 15px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.3s;
  border-radius: 50%;
}

.switch-control input:checked + .switch-slider {
  background-color: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.switch-control input:checked + .switch-slider:before {
  transform: translateX(19px);
  background-color: #0c0c0e;
}

/* Favicon & File Upload Controls */
.favicon-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favicon-preview-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(12, 12, 16, 0.8);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.favicon-preview-box img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.favicon-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.btn-file-upload {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  background: rgba(197, 160, 89, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: 8px;
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-file-upload:hover {
  background: rgba(197, 160, 89, 0.22);
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.btn-file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.btn-inline-gold {
  background: rgba(197, 160, 89, 0.18);
  border: 1px solid var(--gold-primary);
  border-radius: 8px;
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-inline-gold:hover {
  background: var(--gold-primary);
  color: #0c0c0e;
  box-shadow: 0 0 12px var(--gold-glow);
}

.btn-subtle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.74rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-subtle:hover {
  border-color: var(--text-main);
  color: #ffffff;
}

.file-status-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 1rem 1.6rem 1.25rem;
  border-top: 1px solid var(--border-gold-subtle);
  background: rgba(16, 16, 22, 0.4);
}

.btn-action-gold {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  border: none;
  border-radius: 10px;
  color: #0c0c0e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px var(--gold-glow);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.btn-action-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 22px var(--gold-glow);
  filter: brightness(1.05);
}

.btn-action-outline {
  background: transparent;
  border: 1px solid var(--border-gold-subtle);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-outline:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10001;
  background: rgba(14, 14, 18, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 24px var(--gold-glow);
  color: var(--gold-light);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 480px) {
  .page-container {
    padding: 60px 14px 30px;
  }

  .frosted-card {
    padding: 1.6rem 1.25rem;
    border-radius: 20px;
  }

  .floating-media-bar {
    top: 16px;
    left: 16px;
    padding: 6px 9px;
  }

  .floating-media-bar:hover .volume-slider-container,
  .floating-media-bar.expanded .volume-slider-container {
    width: 60px;
  }

  .display-name {
    font-size: 1.35rem;
  }

  .compact-clock .clock-time {
    font-size: 1.15rem;
  }

  .settings-panel {
    max-height: 92vh;
  }

  .modal-header {
    padding: 1.1rem 1.25rem 0.85rem;
  }

  .modal-body {
    padding: 1rem 1.25rem;
  }

  .modal-footer {
    padding: 0.85rem 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .btn-action-gold, .btn-action-outline {
    justify-content: center;
    width: 100%;
  }
}

/* Accessibility: respect user preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
