/* ============================================================
   Astro Sotis — единая звёздная тема
   Подключение: <link rel="stylesheet" href="/sotis-theme.css"> перед </head>
   Трогает только внешний вид (элементные селекторы), логику не меняет.
   ============================================================ */

:root {
  --bg: #0D0D1A;
  --card: #1A1B26;
  --card2: #14151F;
  --line: #2A2D40;
  --text: #F5F6FA;
  --muted: #A0A5B0;
  --gold: #FFD700;
  --gold-soft: #FFB833;
}

/* ---------- Фон и типографика ---------- */
html, body {
  background-color: var(--bg) !important;
  background-image:
    radial-gradient(ellipse 60% 45% at 8% 0%, rgba(64, 52, 140, 0.22), transparent 70%),
    radial-gradient(ellipse 55% 40% at 95% 15%, rgba(140, 90, 30, 0.16), transparent 70%) !important;
  background-attachment: fixed !important;
  color: var(--text) !important;
  font-family: -apple-system, "Segoe UI", Inter, Roboto, sans-serif !important;
}

h1, h2, h3 { color: var(--text) !important; letter-spacing: 0.2px; }
h1 { border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; }
a  { color: var(--gold-soft); }

/* ---------- Шапка ---------- */
body > header, .site-header {
  background: rgba(26, 27, 38, 0.85);
  border-bottom: 1px solid var(--line) !important;
  backdrop-filter: blur(6px);
}
.logo, [class*="brand"] { color: var(--gold) !important; font-weight: 700; letter-spacing: 1px; }

/* ---------- Кнопки ---------- */
button, .btn, [role="button"], a.button {
  background: var(--card2) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px;
  transition: border-color .15s, background .15s, transform .05s;
}
button:hover, .btn:hover, [role="button"]:hover { border-color: var(--gold) !important; }
button:active { transform: translateY(1px); }

/* Главная (активная) кнопка/режим */
button.primary, button.active, [aria-pressed="true"],
button[style*="background"] {
  background: linear-gradient(180deg, #3A3450, #2A2540) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.12);
}

/* ---------- Поля ввода ---------- */
input, select, textarea {
  background: var(--card2) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px;
}
input:focus, select:focus, textarea:focus {
  outline: none !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.15);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

/* ---------- Карточки / секции / панели ---------- */
section, .card, .panel, fieldset, .mode-group, [class*="box"] {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px;
}

/* ---------- Карта (SVG-полотно) ---------- */
svg .planet, svg [class*="planet"] { fill: var(--gold); }
svg text { fill: var(--text); }
svg { filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.06)); }

/* ---------- Таблицы и прочее ---------- */
table { border-collapse: collapse; }
th, td { border-color: var(--line) !important; }
th { color: var(--gold-soft) !important; }
code, pre {
  background: var(--card2) !important;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- Модалки и всплывашки ---------- */
dialog, .modal, [class*="popup"], [class*="toast"] {
  background: var(--card) !important;
  border: 1px solid var(--gold) !important;
  border-radius: 12px;
  color: var(--text) !important;
}

/* ---------- Подвал ---------- */
footer, body > footer {
  border-top: 1px solid var(--line) !important;
  color: var(--muted) !important;
}

/* ---------- Скроллбар под тему ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2E3148; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3E4168; }
