.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.theme-switch [data-theme-option] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-switch [data-theme-option].is-active {
  background: #0089f7;
  color: #ffffff;
}

.theme-switch [data-theme-option]:hover {
  color: #ffffff;
}

html:not(.dark) .theme-switch {
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(241, 245, 249, 0.9);
}

html:not(.dark) .theme-switch [data-theme-option] {
  color: #475569;
}

html:not(.dark) .theme-switch [data-theme-option]:hover {
  color: #0f172a;
}

body.legacy-theme-page {
  transition: background-color 0.3s ease, color 0.3s ease;
}

html:not(.dark) body.legacy-theme-page {
  background: #f8fafc;
  color: #0f172a;
}

html:not(.dark) body.legacy-theme-page #navbar,
html:not(.dark) body.legacy-theme-page #sidebar-menu {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}

html:not(.dark) body.legacy-theme-page #menu-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}

html:not(.dark) body.legacy-theme-page .glass-panel {
  background: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

html:not(.dark) body.legacy-theme-page .bg-brand-darker,
html:not(.dark) body.legacy-theme-page .bg-black,
html:not(.dark) body.legacy-theme-page .bg-brand-section {
  background-color: #f8fafc !important;
}

html:not(.dark) body.legacy-theme-page .border-white\/5,
html:not(.dark) body.legacy-theme-page .border-white\/10,
html:not(.dark) body.legacy-theme-page .border-white\/20 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark) body.legacy-theme-page .text-white,
html:not(.dark) body.legacy-theme-page .text-gray-200,
html:not(.dark) body.legacy-theme-page .text-gray-300,
html:not(.dark) body.legacy-theme-page .text-gray-400,
html:not(.dark) body.legacy-theme-page .text-gray-500,
html:not(.dark) body.legacy-theme-page .text-gray-600 {
  color: #475569 !important;
}

html:not(.dark) body.legacy-theme-page .text-slate-900 {
  color: #0f172a !important;
}

html:not(.dark) body.legacy-theme-page .hover\:text-white:hover,
html:not(.dark) body.legacy-theme-page .hover\:text-brand-blue:hover {
  color: #0089f7 !important;
}

html:not(.dark) body.legacy-theme-page #menu-btn,
html:not(.dark) body.legacy-theme-page #close-menu-btn,
html:not(.dark) body.legacy-theme-page #mobile-menu-btn {
  color: #0f172a !important;
}

html:not(.dark) body.legacy-theme-page #navbar img,
html:not(.dark) body.legacy-theme-page footer img {
  filter: invert(1);
}

html:not(.dark) body.legacy-theme-page .bg-black\/90 {
  background-color: rgba(15, 23, 42, 0.92) !important;
}

html:not(.dark) body.legacy-theme-page .from-brand-darker,
html:not(.dark) body.legacy-theme-page .via-brand-darker,
html:not(.dark) body.legacy-theme-page .to-brand-darker {
  --tw-gradient-from: #f8fafc var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(248, 250, 252, 0) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}
