:root {
  color-scheme: dark;
  --font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-base: 200ms ease;

  /* Modern Dark Gray Palette */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-850: #172033;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* Dark Mode Color System */
  --bg-solid: var(--gray-900);
  --bg-gradient: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-850) 50%, var(--gray-900) 100%);
  --surface: rgba(30, 41, 59, 0.9); /* gray-800 with opacity */
  --surface-alt: rgba(51, 65, 85, 0.8); /* gray-700 with opacity */
  --border: rgba(100, 116, 139, 0.2); /* gray-500 with opacity */
  --border-strong: rgba(148, 163, 184, 0.3); /* gray-400 with opacity */
  --text-primary: var(--gray-50);
  --text-secondary: rgba(241, 245, 249, 0.9); /* gray-100 with opacity */
  --text-muted: rgba(203, 213, 225, 0.8); /* gray-300 with opacity */
  --accent: var(--gray-50);
  --accent-strong: var(--gray-100);
  --accent-soft: rgba(241, 245, 249, 0.1); /* gray-100 with opacity */
  --button-primary: linear-gradient(135deg, rgba(241, 245, 249, 0.12), rgba(203, 213, 225, 0.15));
  --button-primary-border: rgba(226, 232, 240, 0.2);
  --button-ghost-bg: rgba(51, 65, 85, 0.8);
  --button-ghost-border: rgba(100, 116, 139, 0.3);
  --toggle-bg: rgba(30, 41, 59, 0.9);
  --toggle-border: rgba(100, 116, 139, 0.3);
  --toggle-hover-bg: rgba(71, 85, 105, 0.9);
  --orb-one: rgba(100, 116, 139, 0.2);
  --orb-two: rgba(71, 85, 105, 0.15);
  --orb-three: rgba(148, 163, 184, 0.12);
  --orb-four: rgba(51, 65, 85, 0.18);
  --ring-color: rgba(203, 213, 225, 0.15);
  --shadow-soft: 0 8px 24px rgba(2, 6, 23, 0.6);
  --shadow-card: 0 4px 16px rgba(2, 6, 23, 0.5);
  --shadow-button: 0 6px 20px rgba(2, 6, 23, 0.7);
  --noise-opacity: 0.025;
  --noise-blend: soft-light;
}

body[data-theme='light'] {
  color-scheme: light;

  /* Vibrant Light Mode Color System */
  --bg-solid: #ffffff;
  --bg-gradient: linear-gradient(135deg,
    #f0f9ff 0%,     /* sky-50 */
    #fefce8 25%,    /* yellow-50 */
    #f0fdf4 50%,    /* green-50 */
    #fdf2f8 75%,    /* pink-50 */
    #f8fafc 100%    /* slate-50 */
  );
  --surface: rgba(255, 255, 255, 0.95);
  --surface-alt: linear-gradient(135deg,
    rgba(240, 249, 255, 0.8) 0%,  /* sky-50 */
    rgba(255, 255, 255, 0.9) 100%
  );
  --border: rgba(59, 130, 246, 0.15); /* blue-500 with opacity */
  --border-strong: rgba(79, 70, 229, 0.25); /* indigo-600 with opacity */
  --text-primary: var(--gray-900);
  --text-secondary: rgba(15, 23, 42, 0.9);
  --text-muted: rgba(100, 116, 139, 0.8);
  --accent: #3b82f6; /* blue-500 */
  --accent-strong: #1d4ed8; /* blue-700 */
  --accent-soft: rgba(59, 130, 246, 0.1);
  --button-primary: linear-gradient(135deg,
    rgba(59, 130, 246, 0.1) 0%,   /* blue-500 */
    rgba(147, 51, 234, 0.12) 100% /* purple-600 */
  );
  --button-primary-border: rgba(79, 70, 229, 0.3); /* indigo-600 */
  --button-ghost-bg: linear-gradient(135deg,
    rgba(240, 249, 255, 0.8) 0%,  /* sky-50 */
    rgba(255, 255, 255, 0.9) 100%
  );
  --button-ghost-border: rgba(59, 130, 246, 0.2);
  --toggle-bg: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(240, 249, 255, 0.9) 100%
  );
  --toggle-border: rgba(59, 130, 246, 0.25);
  --toggle-hover-bg: linear-gradient(135deg,
    rgba(240, 249, 255, 0.9) 0%,
    rgba(254, 252, 232, 0.8) 100% /* yellow-50 */
  );
  --orb-one: rgba(59, 130, 246, 0.15);   /* blue-500 */
  --orb-two: rgba(16, 185, 129, 0.12);   /* emerald-500 */
  --orb-three: rgba(245, 101, 101, 0.1); /* red-400 */
  --orb-four: rgba(139, 92, 246, 0.14);  /* violet-500 */
  --ring-color: rgba(59, 130, 246, 0.2);
  --shadow-soft: 0 8px 24px rgba(59, 130, 246, 0.08);
  --shadow-card: 0 4px 16px rgba(79, 70, 229, 0.06);
  --shadow-button: 0 6px 20px rgba(147, 51, 234, 0.1);
  --noise-opacity: 0.02;
  --noise-blend: overlay;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient), var(--bg-solid);
  background-color: var(--bg-solid);
  color: var(--text-primary);
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

a {
  color: inherit;
}

a,
button {
  font: inherit;
}

/* Accessibility: Focus indicators */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Enhanced focus for interactive elements */
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.link-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-1px);
}

.site__brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transform: translateY(-1px);
}

/* Light mode focus colors - enhanced for better visibility */
body[data-theme='light'] a:focus-visible,
body[data-theme='light'] button:focus-visible,
body[data-theme='light'] [role="button"]:focus-visible,
body[data-theme='light'] .button:focus-visible,
body[data-theme='light'] .link-card:focus-visible,
body[data-theme='light'] .theme-toggle:focus-visible,
body[data-theme='light'] .site__brand:focus-visible {
  outline: 3px solid #1d4ed8; /* Thicker, high contrast blue-700 for light mode */
  outline-offset: 2px;
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 4px #1d4ed8; /* Double ring for maximum visibility */
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: var(--bg-solid);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

body[data-theme='light'] .skip-link {
  background: #2563eb;
  color: #ffffff;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.9);
    --border-strong: rgba(255, 255, 255, 1);
    --text-secondary: rgba(255, 255, 255, 1);
    --text-muted: rgba(192, 192, 192, 1);
  }

  body[data-theme='light'] {
    --bg-solid: #ffffff;
    --bg-gradient: linear-gradient(135deg, #ffffff 0%, #ffffff 100%); /* Remove gradients in high contrast */
    --border: rgba(0, 0, 0, 0.9);
    --border-strong: rgba(0, 0, 0, 1);
    --text-primary: #000000; /* Pure black for maximum contrast */
    --text-secondary: rgba(0, 0, 0, 1);
    --text-muted: rgba(0, 0, 0, 0.8);
    --surface: rgba(255, 255, 255, 1);
    --surface-alt: rgba(255, 255, 255, 1); /* Remove gradients */
  }

  /* Remove gradients from cards in high contrast mode */
  body[data-theme='light'] .card,
  body[data-theme='light'] .link-card,
  body[data-theme='light'] .button--ghost {
    background: #ffffff !important;
    border-color: #000000 !important;
  }

  body[data-theme='light'] .card__badge {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
  }

  .button,
  .link-card {
    border-width: 3px; /* Thicker borders */
  }

  /* Enhanced focus indicators for high contrast */
  body[data-theme='light'] a:focus-visible,
  body[data-theme='light'] button:focus-visible,
  body[data-theme='light'] [role="button"]:focus-visible {
    outline: 4px solid #000000 !important;
    outline-offset: 2px;
    box-shadow: none !important;
  }
}

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

  /* Still allow essential focus transitions */
  :focus-visible {
    transition: outline 0.2s ease;
  }

  .skip-link:focus {
    transition: top 0.2s ease;
  }
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  background: var(--bg-gradient);
}

.backdrop__gradient {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
}

.backdrop__gradient--one {
  background: radial-gradient(circle at 25% 25%, rgba(64, 64, 64, 0.3), transparent 70%);
  animation: slowDrift 40s ease-in-out infinite;
  will-change: transform;
}

.backdrop__gradient--two {
  background: radial-gradient(circle at 75% 75%, rgba(48, 48, 48, 0.25), transparent 70%);
  animation: gentleFloat 50s ease-in-out infinite;
  will-change: transform;
}

.backdrop__gradient--three {
  background: radial-gradient(circle at 50% 50%, rgba(32, 32, 32, 0.5), transparent 70%);
  opacity: 0.6;
}

.backdrop__orb {
  position: absolute;
  width: clamp(16rem, 22vw, 24rem);
  height: clamp(16rem, 22vw, 24rem);
  border-radius: 50%;
  filter: blur(45px);
  opacity: 0.2;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: transform;
}

.backdrop__orb--one {
  background: var(--orb-one);
  top: -5%;
  left: -4%;
}

.backdrop__orb--two {
  background: var(--orb-two);
  top: 10%;
  right: -6%;
}

.backdrop__orb--three {
  background: var(--orb-three);
  bottom: -6%;
  left: 5%;
}

.backdrop__orb--four {
  background: var(--orb-four);
  bottom: -9%;
  right: -3%;
}

.backdrop__ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid var(--ring-color);
  width: clamp(20rem, 30vw, 32rem);
  height: clamp(20rem, 30vw, 32rem);
  filter: blur(0.5px);
  opacity: 0.4;
  will-change: transform;
}

.backdrop__ring--one {
  top: 3%;
  left: 50%;
  transform: translateX(-50%);
  animation: slowSpin 60s linear infinite;
}

.backdrop__ring--two {
  bottom: 5%;
  right: 10%;
  animation: slowSpinReverse 80s linear infinite;
}

.backdrop__noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  mix-blend-mode: var(--noise-blend);
}

.site {
  position: relative;
  z-index: 1;
  width: min(1200px, 100vw);
  padding: 1.5rem 2rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  gap: 1.5rem;
}

.site__header,
.site__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site__header {
  padding-bottom: 0.5rem;
}

.site__footer {
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: none;
  width: 100%;
}

.site__version {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.65;
  text-align: right;
}

.site__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  background: var(--surface-alt);
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.site__brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

body[data-theme='light'] .site__brand:hover {
  box-shadow: 0 12px 32px rgba(148, 163, 184, 0.25);
}

.site__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(71, 85, 105, 0.3); /* gray-600 with opacity for dark mode */
  border: 1px solid var(--border-strong);
  object-fit: cover;
}

body[data-theme='light'] .site__brand-mark {
  background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.15) 0%,  /* blue-500 */
    rgba(139, 92, 246, 0.12) 100% /* violet-500 */
  );
}

/* Enhanced light mode card styling */
body[data-theme='light'] .card {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(240, 249, 255, 0.8) 100%
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.1);
}

body[data-theme='light'] .link-card {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(240, 249, 255, 0.7) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.15);
}

body[data-theme='light'] .link-card:hover {
  background: linear-gradient(135deg,
    rgba(240, 249, 255, 0.9) 0%,
    rgba(254, 252, 232, 0.8) 100%
  );
  border-color: rgba(79, 70, 229, 0.3);
  transform: translateY(-2px);
}

/* Colorful button styling for light mode */
body[data-theme='light'] .button--primary {
  background: linear-gradient(135deg,
    #3b82f6 0%,   /* blue-500 */
    #8b5cf6 100%  /* violet-500 */
  );
  border-color: rgba(79, 70, 229, 0.3);
  color: #ffffff; /* Pure white for maximum contrast */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-weight: 600; /* Slightly bolder for better readability */
}

body[data-theme='light'] .button--ghost {
  background: linear-gradient(135deg,
    rgba(240, 249, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.9) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #1d4ed8;
}

/* Special light mode hover effects */
body[data-theme='light'] .button--primary:hover {
  background: linear-gradient(135deg,
    #2563eb 0%,   /* blue-600 */
    #7c3aed 100%  /* violet-600 */
  );
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

body[data-theme='light'] .button--ghost:hover {
  background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.1) 0%,
    rgba(139, 92, 246, 0.08) 100%
  );
  border-color: rgba(79, 70, 229, 0.3);
  color: #1e40af;
}

/* Animated gradient backgrounds for light mode */
body[data-theme='light'] .hero__stats {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(240, 249, 255, 0.8) 50%,
    rgba(254, 252, 232, 0.7) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.1);
}

body[data-theme='light'] .stat {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.08);
}

body[data-theme='light'] .stat__icon {
  background: rgba(59, 130, 246, 0.12);
  color: #1e3a8a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Special theme toggle styling for light mode */
body[data-theme='light'] .theme-toggle:hover {
  background: linear-gradient(135deg,
    rgba(240, 249, 255, 0.9) 0%,
    rgba(254, 252, 232, 0.8) 100%
  );
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.15);
}

/* Enhanced light mode background gradients */
body[data-theme='light'] .backdrop__gradient--one {
  background: radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.08), transparent 70%);
}

body[data-theme='light'] .backdrop__gradient--two {
  background: radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.06), transparent 70%);
}

body[data-theme='light'] .backdrop__gradient--three {
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05), transparent 70%);
}

/* Light mode orb colors - more vibrant */
body[data-theme='light'] .backdrop__orb--one {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.1));
}

body[data-theme='light'] .backdrop__orb--two {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08));
}

body[data-theme='light'] .backdrop__orb--three {
  background: linear-gradient(135deg, rgba(245, 101, 101, 0.1), rgba(139, 92, 246, 0.08));
}

body[data-theme='light'] .backdrop__orb--four {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(236, 72, 153, 0.1));
}

/* Enhanced text contrast for light mode */
body[data-theme='light'] {
  --text-primary: #0f172a; /* slate-900 - darkest for maximum contrast */
  --text-secondary: rgba(15, 23, 42, 0.9); /* slate-900 with opacity */
  --text-muted: rgba(51, 65, 85, 0.85); /* slate-700 with higher opacity for better contrast */
}

/* Ensure all text elements have sufficient contrast in light mode */
body[data-theme='light'] .hero__eyebrow {
  color: rgba(51, 65, 85, 0.9); /* darker for better contrast */
  font-weight: 500; /* slightly bolder */
}

body[data-theme='light'] .card__subtitle,
body[data-theme='light'] .card__description,
body[data-theme='light'] .link-card__meta {
  color: rgba(51, 65, 85, 0.85); /* darker muted text */
}

body[data-theme='light'] .theme-toggle {
  color: rgba(15, 23, 42, 0.9); /* darker toggle text */
}

/* Badge text contrast fix */
body[data-theme='light'] .card__badge {
  color: #ffffff; /* white text on colored badges */
  font-weight: 600; /* bolder for better readability */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* subtle shadow for definition */
}

body[data-theme='light'] .card__badge[data-tone='idle'] {
  background: rgba(148, 163, 184, 0.18);
  color: #1f2937;
  border-color: rgba(148, 163, 184, 0.35);
  text-shadow: none;
}

body[data-theme='light'] .card__badge[data-tone='playing'] {
  background: rgba(129, 140, 248, 0.25);
  color: #312e81;
  border-color: rgba(129, 140, 248, 0.45);
  text-shadow: none;
}

body[data-theme='light'] .card__badge[data-tone='paused'] {
  background: rgba(249, 115, 22, 0.24);
  color: #7c2d12;
  border-color: rgba(249, 115, 22, 0.45);
  text-shadow: none;
}

body[data-theme='light'] .card__badge[data-tone='connecting'] {
  background: rgba(56, 189, 248, 0.25);
  color: #0c4a6e;
  border-color: rgba(56, 189, 248, 0.45);
  text-shadow: none;
}

body[data-theme='light'] .card__badge[data-tone='error'] {
  background: rgba(248, 113, 113, 0.24);
  color: #7f1d1d;
  border-color: rgba(248, 113, 113, 0.45);
  text-shadow: none;
}

.site__brand-text {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 0;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 1.2rem;
  width: 100%;
  align-items: start;
}

.hero__intro {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 42ch;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.hero__description {
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 52ch;
  color: var(--text-muted);
  margin: 0;
}

.hero__stats {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex-wrap: wrap;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.stat__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  color: var(--text-secondary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat__icon i {
  width: 1.2rem;
  height: 1.2rem;
}

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

.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat__value {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--text-primary);
}

@media (min-width: 40rem) {
  .hero__stats {
    flex-direction: row;
    align-items: stretch;
  }

  .stat {
    flex: 1 1 0;
  }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 0.9rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
}

.button__icon i {
  width: 1rem;
  height: 1rem;
}

.button__icon svg {
  width: 100%;
  height: 100%;
}

.button--primary {
  background: var(--button-primary);
  border-color: var(--button-primary-border);
  color: var(--text-primary);
  box-shadow: var(--shadow-button);
}

.button--ghost {
  background: var(--button-ghost-bg);
  border-color: var(--button-ghost-border);
  color: var(--text-secondary);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body[data-theme='light'] .button:hover {
  box-shadow: 0 8px 24px rgba(148, 163, 184, 0.2);
}

.hero__aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: fit-content;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card__title {
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.card__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.card__badge {
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  position: relative;
}

/* Add visual indicator dots for better status recognition */
.card__badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.card__badge[data-tone='idle'] {
  background: rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.95);
  border-color: rgba(148, 163, 184, 0.35);
}

.card__badge[data-tone='playing'] {
  background: rgba(129, 140, 248, 0.24);
  color: rgba(199, 210, 254, 0.95);
  border-color: rgba(99, 102, 241, 0.45);
}

.card__badge[data-tone='paused'] {
  background: rgba(249, 115, 22, 0.24);
  color: rgba(254, 215, 170, 0.95);
  border-color: rgba(249, 115, 22, 0.45);
}

.card__badge[data-tone='connecting'] {
  background: rgba(56, 189, 248, 0.24);
  color: rgba(186, 230, 253, 0.95);
  border-color: rgba(56, 189, 248, 0.45);
}

.card__badge[data-tone='error'] {
  background: rgba(248, 113, 113, 0.25);
  color: rgba(254, 202, 202, 0.95);
  border-color: rgba(248, 113, 113, 0.5);
}

.card__description {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  max-height: none;
  overflow-y: visible;
}

.link-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  background: var(--surface-alt);
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

.link-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}

.link-card__icon i {
  width: 1.1rem;
  height: 1.1rem;
}

.link-card__icon svg {
  width: 100%;
  height: 100%;
}

.link-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.link-card__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.link-card__meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.link-card__badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  transition: background var(--transition-base), color var(--transition-base);
}

.link-card__badge[hidden] {
  display: none !important;
}

.link-card--twitch .link-card__icon {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.25));
  color: #c084fc;
}

.link-card--live {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(46, 16, 101, 0.65), rgba(55, 23, 110, 0.55));
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.25);
}

.link-card--live .link-card__label {
  color: #f4e9ff;
}

.link-card--live .link-card__meta {
  color: rgba(228, 210, 255, 0.85);
}

.link-card--live .link-card__badge {
  background: rgba(168, 85, 247, 0.25);
  color: #fdf4ff;
}

.link-card__arrow {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-card__arrow i {
  width: 0.85rem;
  height: 0.85rem;
}

.link-card__arrow svg {
  width: 100%;
  height: 100%;
}

.link-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: var(--surface);
}

.card--widget {
  gap: 0.8rem;
}

.widget-shell {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: center;
  padding: 1.2rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: var(--surface-alt);
  position: relative;
  transition: background 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.widget-shell > * {
  position: relative;
  z-index: 1;
}

/* Progress border overlay */
.widget-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: conic-gradient(
    from 270deg at center,
    var(--accent) 0%,
    var(--accent) var(--progress, 0%),
    transparent var(--progress, 0%),
    transparent 100%
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

/* Show progress border only when music is playing */
.widget-shell--with-progress::before {
  opacity: 1;
}

/* Hide dashed border when progress is showing */
.widget-shell--with-progress {
  border: 1px solid transparent;
}

.widget-shell--idle {
  border-style: dashed;
  box-shadow: none;
  background: var(--surface-alt);
}

.widget-shell--playing {
  border: 1px solid rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(147, 51, 234, 0.14));
  box-shadow:
    0 18px 45px rgba(79, 70, 229, 0.35),
    0 0 0 1px rgba(129, 140, 248, 0.35);
}

.widget-shell--playing:not(.widget-shell--with-progress) {
  border: 1px solid rgba(99, 102, 241, 0.55);
}

.widget-shell--playing::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15), transparent 70%);
  opacity: 0.8;
  mix-blend-mode: screen;
  animation: widgetPlayPulse 5s ease-in-out infinite;
  z-index: 0;
}

.widget-shell--paused {
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.14), rgba(55, 65, 81, 0.1));
  box-shadow:
    0 12px 32px rgba(249, 115, 22, 0.22),
    0 0 0 1px rgba(249, 115, 22, 0.25);
}

.widget-shell--paused::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(249, 115, 22, 0.18), transparent 70%);
  opacity: 0.75;
  mix-blend-mode: screen;
  animation: widgetPausedBreath 6s ease-in-out infinite;
  z-index: 0;
}

.widget-shell__artwork {
  width: 128px;
  height: 128px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.widget-shell__artwork--idle {
  animation: idleRecordFloat 12s ease-in-out infinite;
}

.widget-shell__artwork--idle::before,
.widget-shell__artwork--idle::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  inset: 16%;
  pointer-events: none;
}

.widget-shell__artwork--idle::before {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), transparent 65%);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: idleGlowPulse 6s ease-in-out infinite;
}

.widget-shell__artwork--idle::after {
  inset: 22%;
  background: conic-gradient(
    from 0deg,
    rgba(59, 130, 246, 0.25),
    rgba(147, 51, 234, 0.25),
    rgba(236, 72, 153, 0.2),
    rgba(59, 130, 246, 0.25)
  );
  opacity: 0.3;
  mix-blend-mode: screen;
  animation: idleGlowSpin 18s linear infinite;
}

/* Add realistic lighting to the whole record */
.widget-shell__artwork--record {
  box-shadow:
    /* Outer shadow for depth */
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.2),
    /* Subtle top highlight */
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    /* Inner border glow */
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

/* Vinyl record background - realistic vinyl texture */
.widget-shell__artwork--record {
  background:
    /* Subtle radial noise texture */
    radial-gradient(circle at 35% 35%, rgba(255,255,255,0.02) 0%, transparent 50%),
    radial-gradient(circle at 65% 75%, rgba(0,0,0,0.03) 0%, transparent 40%),
    /* Main vinyl grooves */
    radial-gradient(
      circle at center,
      /* Center label (red/black typical record label) */
      #8B0000 0%,
      #8B0000 8%,
      #2C0000 8%,
      #2C0000 10%,
      #1a1a1a 10%,
      #1a1a1a 11%,
      /* Transition to vinyl surface */
      #0f0f0f 11%,
      #1f1f1f 12%,
      /* Realistic vinyl grooves with more variation */
      #0a0a0a 12%,
      #1a1a1a 13%,
      #0d0d0d 13.5%,
      #1d1d1d 14%,
      #0a0a0a 14.5%,
      #1a1a1a 15%,
      #0c0c0c 15.5%,
      #1c1c1c 16%,
      #0a0a0a 16.5%,
      #1a1a1a 17%,
      #0e0e0e 17.5%,
      #1e1e1e 18%,
      #0a0a0a 18.5%,
      #1a1a1a 19%,
      #0b0b0b 19.5%,
      #1b1b1b 20%,
      #0a0a0a 20.5%,
      #1a1a1a 21%,
      #0d0d0d 21.5%,
      #1d1d1d 22%,
      #0a0a0a 22.5%,
      #1a1a1a 23%,
      #0c0c0c 23.5%,
      #1c1c1c 24%,
      #0a0a0a 24.5%,
      #1a1a1a 25%,
      #0e0e0e 25.5%,
      #1e1e1e 26%,
      #0a0a0a 26.5%,
      #1a1a1a 27%,
      #0b0b0b 27.5%,
      #1b1b1b 28%,
      #0a0a0a 28.5%,
      #1a1a1a 29%,
      #0d0d0d 29.5%,
      #1d1d1d 30%,
      #0a0a0a 30.5%,
      #1a1a1a 31%,
      #0c0c0c 31.5%,
      #1c1c1c 32%,
      #0a0a0a 32.5%,
      #1a1a1a 33%,
      #0e0e0e 33.5%,
      #1e1e1e 34%,
      #0a0a0a 34.5%,
      #1a1a1a 35%,
      #0b0b0b 35.5%,
      #1b1b1b 36%,
      #0a0a0a 36.5%,
      #1a1a1a 37%,
      #0d0d0d 37.5%,
      #1d1d1d 38%,
      #0a0a0a 38.5%,
      #1a1a1a 39%,
      #0c0c0c 39.5%,
      #1c1c1c 40%,
      #0a0a0a 40.5%,
      #1a1a1a 41%,
      #0e0e0e 41.5%,
      #1e1e1e 42%,
      #0a0a0a 42.5%,
      #1a1a1a 43%,
      #0b0b0b 43.5%,
      #1b1b1b 44%,
      #0a0a0a 44.5%,
      #1a1a1a 45%,
      #0d0d0d 45.5%,
      #1d1d1d 46%,
      #0a0a0a 46.5%,
      #1a1a1a 47%,
      #0c0c0c 47.5%,
      #1c1c1c 48%,
      #0a0a0a 48.5%,
      #1a1a1a 49%,
      #0e0e0e 49.5%,
      #1e1e1e 50%,
      /* Outer edge */
      #0a0a0a 100%
    );
  border: 2px solid #333;
  position: relative;
  overflow: hidden;
}

/* Add subtle vinyl texture overlay */
.widget-shell__artwork--record::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    /* Fine grain texture */
    radial-gradient(circle at 25% 25%, rgba(255,255,255,0.015) 0%, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(0,0,0,0.02) 0%, transparent 2px),
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.01) 0%, transparent 3px),
    radial-gradient(circle at 10% 50%, rgba(0,0,0,0.015) 0%, transparent 2px),
    radial-gradient(circle at 90% 30%, rgba(255,255,255,0.01) 0%, transparent 2px),
    radial-gradient(circle at 30% 90%, rgba(0,0,0,0.02) 0%, transparent 3px);
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
}

/* Add realistic light reflection effect */
.widget-shell__artwork--record::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    /* Main edge highlight */
    radial-gradient(
      circle at center,
      transparent 0%,
      transparent 88%,
      rgba(255,255,255,0.03) 90%,
      rgba(255,255,255,0.08) 92%,
      rgba(255,255,255,0.04) 94%,
      transparent 96%
    ),
    /* Subtle light reflection (like stage lighting) */
    linear-gradient(
      135deg,
      rgba(255,255,255,0.015) 0%,
      transparent 30%,
      transparent 70%,
      rgba(255,255,255,0.008) 100%
    );
  pointer-events: none;
  z-index: 1;
}

/* Add another layer for center label highlights */
.widget-shell__artwork--record {
  position: relative;
}

.widget-shell__artwork--record::before {
  z-index: 1;
}

/* Album art overlay on the record */
.widget-shell__artwork__album {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.1);
  z-index: 2;
  position: relative;
}

/* Center hole - more realistic vinyl hole */
.widget-shell__artwork__center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background: radial-gradient(
    circle at center,
    #000 0%,
    #000 30%,
    #222 50%,
    #000 100%
  );
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #444;
  box-shadow:
    inset 0 0 4px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 10;
}

/* Center hole inner shadow for depth */
.widget-shell__artwork__center::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255,255,255,0.1) 0%,
    rgba(0,0,0,0.3) 70%,
    rgba(0,0,0,0.8) 100%
  );
}

/* Paused symbol overlay */
.widget-shell__artwork__pause {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.9;
  animation: none !important;
}

.widget-shell__artwork__pause::before {
  content: '⏸️';
  font-size: 16px;
}


.widget-shell__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  min-width: 0;
  flex: 1;
  height: 100%;
}

/* When hint has content, position label and hint closer together */
.widget-shell__meta--with-hint {
  justify-content: center !important;
  gap: 0 !important;
  align-items: center !important;
}

.widget-shell__meta--with-hint .widget-shell__label,
.widget-shell__meta--with-hint .widget-shell__hint {
  flex: 0 0 auto !important;
}

.widget-shell__meta--with-hint .widget-shell__label {
  margin: 0 !important;
  min-height: auto !important;
  padding: 0 !important;
}

.widget-shell__meta.widget-shell__meta--with-hint .widget-shell__hint {
  margin: 0 !important;
  min-height: auto !important;
  max-height: none !important;
  gap: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  display: block !important;
  flex-direction: unset !important;
  justify-content: unset !important;
}

/* When hint is empty, center the label better */
.widget-shell__meta:has(.widget-shell__hint:empty) .widget-shell__label,
.widget-shell__meta .widget-shell__hint:empty + .widget-shell__label {
  margin: auto;
}

.widget-shell__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.6rem;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.widget-shell__label i {
  color: var(--accent);
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.widget-shell__label i svg {
  width: 100%;
  height: 100%;
}

.widget-shell__label-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: visible;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.5;
  padding: 0.1rem 0;
}


.widget-shell__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  text-align: center;
  min-height: 2.6rem;
  max-height: 2.8rem;
  padding: 0.1rem 0;
  overflow: visible;
  justify-content: flex-start;
}

/* Hide hint when empty but keep the space for proper centering */
.widget-shell__hint:empty {
  display: none;
}

/* Alternative approach: when there's no hint content, center the label */
.widget-shell__meta:not(:has(.widget-shell__hint-line)) {
  justify-content: center;
}

.widget-shell__meta:not(:has(.widget-shell__hint-line)) .widget-shell__label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-shell__hint-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 1.4rem;
  text-align: center;
  line-height: 1.5;
  padding: 0.1rem 0;
}


.widget-shell__hint-line i {
  color: var(--text-muted);
  width: 0.9rem;
  height: 0.9rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.widget-shell__hint-line i svg {
  width: 100%;
  height: 100%;
}


.widget-shell__hint-line span:last-child {
  flex: 1;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}


.site__footer {
  padding-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  justify-content: flex-end;
  text-align: right;
  width: 100%;
}

.site__footer-copy {
  margin: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--toggle-border);
  padding: 0.45rem 0.9rem;
  background: var(--toggle-bg);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.theme-toggle:hover {
  background: var(--toggle-hover-bg);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body[data-theme='light'] .theme-toggle:hover {
  box-shadow: 0 6px 16px rgba(148, 163, 184, 0.15);
}

.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
}

.theme-toggle__icon i {
  width: 1rem;
  height: 1rem;
}

.theme-toggle__icon svg {
  width: 100%;
  height: 100%;
}

[data-animate] {
  opacity: 0;
  transform: translateY(10px);
}

.hero__intro > *,
.hero__aside .card,
.link-card {
  opacity: 0;
}

.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

[data-animate].slide-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

[data-animate].slide-right {
  animation: slideInRight 0.8s ease-out forwards;
}

[data-animate].scale-in {
  animation: scaleIn 0.8s ease-out forwards;
}

.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@keyframes slowDrift {
  0%, 100% {
    transform: translate3d(0%, 0%, 0) scale(1);
  }
  33% {
    transform: translate3d(1%, -1%, 0) scale(1.02);
  }
  66% {
    transform: translate3d(-1%, 1%, 0) scale(0.98);
  }
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translate3d(0%, 0%, 0) scale(1);
  }
  50% {
    transform: translate3d(-0.5%, 0.5%, 0) scale(1.01);
  }
}

@keyframes slowSpin {
  from {
    transform: translateX(-50%) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg);
  }
}

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


@keyframes widgetPlayPulse {
  0%,
  100% {
    opacity: 0.65;
    transform: scale(1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.03);
  }
}

@keyframes widgetPausedBreath {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

@keyframes idleRecordFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.01);
  }
}

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

@keyframes idleGlowPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(1.05);
  }
}

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

/* Record spinning effect for music artwork - handled by anime.js */
.widget-shell__artwork--spinning {
  /* Class marker for anime.js - no CSS animation */
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }

  .hero {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  html,
  body {
    height: auto !important;
    overflow: visible !important;
  }

  .site {
    padding: 0.8rem;
    padding-top: 5rem;
    padding-bottom: 1rem;
    height: auto !important;
    min-height: auto !important;
    overflow-y: visible !important;
    gap: 1rem;
    display: flex !important;
    flex-direction: column !important;
    grid-template-rows: none !important;
  }

  .site__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: transparent !important;
    border-bottom: none !important;
    padding: 0.8rem !important;
    z-index: 1000 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .site__footer {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100%;
    padding-top: 0.5rem !important;
  }

  .hero {
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding-bottom: 1rem;
  }

  .hero__title {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }

  .hero__intro {
    gap: 0.8rem;
  }

  .hero__lead,
  .hero__description {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .hero__stats {
    grid-template-columns: 1fr;
    padding: 0.7rem;
    gap: 0.6rem;
  }

  .hero__actions {
    width: 100%;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
  }

  .button {
    justify-content: center;
    flex: 1 1 auto;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }

  .button__icon {
    width: 1.1rem !important;
    height: 1.1rem !important;
    font-size: 0.9rem !important;
  }

  .hero__actions {
    flex-wrap: nowrap !important;
  }

  .widget-shell {
    grid-template-columns: 1fr;
    gap: 1rem;
    justify-items: center;
  }

  .widget-shell__artwork {
    width: min(160px, 70vw);
    height: auto;
    justify-self: center;
  }

  .widget-shell__meta {
    gap: 0.6rem;
    width: 100%;
  }

  .widget-shell__meta--with-hint {
    gap: 0.1rem !important;
  }

  .widget-shell__label {
    font-size: 0.85rem;
    gap: 0.3rem;
  }

  .widget-shell__label i {
    font-size: 1.2rem;
    width: 1.4rem;
  }

  .widget-shell__hint {
    font-size: 0.8rem;
  }

  .hero__aside {
    gap: 0.8rem;
    position: relative;
    z-index: 1;
  }

  .card {
    padding: 0.8rem;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
  }

  .card__title {
    font-size: 0.9rem;
  }

  .card__subtitle,
  .card__description {
    font-size: 0.8rem;
  }

  .link-card {
    padding: 0.5rem 0.7rem;
    gap: 0.6rem;
  }

  .link-card__icon {
    width: 32px;
    height: 32px;
  }

  .link-card__label {
    font-size: 0.85rem;
  }

  .link-card__meta {
    font-size: 0.75rem;
  }
}

@media (max-width: 420px) {
  .site__brand {
    width: 100%;
    justify-content: center;
  }

  .theme-toggle {
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 10;
  }

  .hero__actions {
    position: relative;
    z-index: 1;
  }

  .site__footer {
    position: relative;
    z-index: 10;
  }
}



/* Perfect centering when there's no hint content */
.widget-shell__meta--no-hint {
  justify-content: center !important;
  gap: 0 !important;
}

.widget-shell__meta--no-hint .widget-shell__label {
  margin: 0;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dual label layout for game + music */
.widget-shell__label--dual {
  flex-direction: column !important;
  gap: 0.3rem !important;
  align-items: center !important;
}

.widget-shell__label-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  max-width: 100%;
  overflow: hidden;
}

.widget-shell__label-item i {
  color: var(--accent);
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.widget-shell__label-item i svg {
  width: 100%;
  height: 100%;
}

.widget-shell__label-item .widget-shell__label-text {
  font-size: 0.85rem;
  max-width: 100%;
}

/* Mobile adjustments for dual labels */
@media (max-width: 720px) {
  .widget-shell__label--dual {
    gap: 0.2rem !important;
  }

  .widget-shell__label-item {
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .widget-shell__label-item i {
    width: 1rem;
    height: 1rem;
  }

  .widget-shell__label-item .widget-shell__label-text {
    font-size: 0.8rem;
  }
}

/* Multi-line text for long content */
.widget-shell__label-text--multiline {
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.5;
  max-height: 4.5em; /* Allow up to 3 lines with better spacing */
  overflow: visible;
  padding: 0.1rem 0;
}
/* Stacked layout for title-hint-title-hint pattern */
.widget-shell__label--stacked {
  flex-direction: column !important;
  gap: 0.2rem !important;
  align-items: center !important;
}
.widget-shell__hint-line--stacked {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 1.4rem;
  margin: 0;
  padding: 0.1rem 0;
}
