html.dark {
  --background: #0c0c0c;
  --foreground: #ffffff;
  --card: #222222;
  --card-foreground: #ffffff;
  --popover: #222222;
  --popover-foreground: #ffffff;
  --muted-foreground: #e5e5e5;
  --border: rgba(255, 255, 255, 0.24);
  --border-strong: rgba(255, 255, 255, 0.36);
  --primary: #e2231a;
  --primary-foreground: #ffffff;
  --secondary-foreground: #ffffff;
  --accent: #e2231a;
  --accent-foreground: #ffffff;
  --accent-fg: #ffffff;
  --ring: #e2231a;
  color-scheme: dark;
  background: #0c0c0c;
  color: #ffffff;
}

html.light {
  --background: #ffffff;
  --foreground: #000000;
  --card: #f4f4f5;
  --card-foreground: #000000;
  --popover: #ffffff;
  --popover-foreground: #000000;
  --muted-foreground: #1a1a1a;
  --border: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.22);
  --primary: #e2231a;
  --primary-foreground: #ffffff;
  --secondary-foreground: #000000;
  --accent: #e2231a;
  --accent-foreground: #ffffff;
  --accent-fg: #000000;
  --ring: #e2231a;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-strong-bg: rgba(255, 255, 255, 0.86);
  --glass-thin-bg: rgba(255, 255, 255, 0.55);
  color-scheme: light;
  background: #ffffff;
  color: #000000;
}

html.dark body,
html.light body {
  background: var(--background);
  color: var(--foreground);
}

html.dark input,
html.dark textarea,
html.dark select,
html.light input,
html.light textarea,
html.light select {
  color: inherit;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #d4d4d8;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #3f3f46;
}

html.dark .rounded-lg.border.bg-background {
  background-color: #222222;
  border-color: rgba(255, 255, 255, 0.24);
}

.bg-foreground.text-background {
  background-color: #e2231a;
  color: #ffffff;
}

#theme-switch {
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
}

#theme-switch button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--foreground);
  font: 600 12px/1 system-ui, sans-serif;
  padding: 7px 10px;
  cursor: pointer;
}

#theme-switch button[aria-pressed="true"] {
  background: #e2231a;
  color: #ffffff;
}

#account-menu {
  position: fixed;
  z-index: 70;
  min-width: 180px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

#account-menu button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--foreground);
  font: 600 13px/1 system-ui, sans-serif;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

#account-menu button:hover,
#account-menu button:focus-visible {
  background: rgba(226, 35, 26, 0.14);
  color: #e2231a;
}

@media (max-width: 720px) {
  header {
    padding-top: 48px;
  }

  header > .min-w-0 {
    flex: 1 1 auto;
    min-width: 0;
  }

  #theme-switch {
    top: 8px;
    right: 10px;
  }

  #theme-switch button {
    padding: 7px 8px;
  }
}
