body {
  font-family:
    'Heebo',
    'Segoe UI',
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
  transition:
    background 0.2s,
    color 0.2s;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.app-container,
main.container {
  max-width: 900px;
  padding: 1.5rem 1.25rem 2.5rem;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

.muted,
.text-muted {
  color: var(--muted) !important;
}

.badge {
  font-size: 0.8rem;
  margin-inline-end: 0.5rem;
}

.status {
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}

.theme-toggle:hover {
  background: var(--surface-3);
}

.theme-toggle-standalone {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
}

[data-theme='light'] .theme-icon-dark,
[data-theme='dark'] .theme-icon-light {
  display: none;
}

[data-theme='dark'] .theme-toggle {
  background: var(--nav-elevated);
  border-color: var(--nav-divider);
}

[data-theme='dark'] .theme-toggle:hover {
  background: var(--nav-link-hover-bg);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.rate-limit-placeholder {
  text-align: center;
  padding: 1.5rem 1rem;
}

@media (max-width: 768px) {
  main.container,
  .app-container {
    padding: 1.25rem 1rem 2rem;
  }

  .subtitle {
    overflow-wrap: anywhere;
  }

  h1 {
    font-size: 1.5rem;
  }

  .btn-lg {
    width: 100%;
    text-align: center;
  }
}

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