/**
 * Base styles — переменные, сброс, типографика
 * Neuronis — ИИ-тренажёр ЕГЭ по информатике
 */

:root,
[data-theme="dark"] {
  --bg: #23282d;
  --white: #ffffff;
  --green: #05b87d;
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-footer: rgba(255, 255, 255, 0.5);
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --header-premium-border: rgba(5, 184, 125, 0.22);
  --header-premium-inset: rgba(255, 255, 255, 0.045);
  --header-premium-shadow: 0 3px 18px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] {
  --bg: #f5f5f7;
  --white: #1d1d1f;
  --green: #05b87d;
  --text-muted: rgba(0, 0, 0, 0.6);
  --text-footer: rgba(0, 0, 0, 0.5);
  --header-premium-border: rgba(5, 184, 125, 0.2);
  --header-premium-inset: rgba(255, 255, 255, 0.98);
  --header-premium-shadow: 0 2px 14px rgba(26, 36, 48, 0.06);
}

/* Theme toggle — премиум-стиль в одном ряду с шапкой */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 1.125rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(5, 184, 125, 0.28);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.18s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(5, 184, 125, 0.22);
  box-shadow: 0 2px 10px rgba(26, 36, 48, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.theme-toggle:hover {
  border-color: rgba(5, 184, 125, 0.55);
  background: rgba(5, 184, 125, 0.1);
  box-shadow: 0 4px 14px rgba(5, 184, 125, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(245, 252, 249, 0.98);
}

.theme-toggle__icon {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--light {
  display: block;
}

[data-theme="light"] .theme-toggle__icon--dark {
  display: block;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
