/* =========================
   БАЗОВЫЕ ПЕРЕМЕННЫЕ
========================= */
:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #f43f5e;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;

  --text-main: #0f172a;
  --text-muted: #64748b;

  --border: #e2e8f0;
  --input-bg: #ffffff;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-md: 0 6px 12px rgb(0 0 0 / 0.1);

  --radius: 12px;

  --transition-fast: background-color 0.2s ease, color 0.2s ease;
  --transition-move: transform 0.2s ease;
}

/* =========================
   ТЁМНАЯ ТЕМА
========================= */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #020617;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --input-bg: #0f172a;
  }
}

/* =========================
   СБРОС
========================= */
html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   КОНТЕЙНЕР
========================= */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   ЛОГО
========================= */
header img,
.site-logo,
.custom-logo-link {
  display: block;
  margin: 0 auto 2px !important;
}

/* =========================
   СОЦБЛОК
========================= */
.header-social-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 5px 0 !important;
}

/* =========================
   TG КНОПКА
========================= */
.premium-tg-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 auto !important;
  padding: 8px 16px !important;

  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;

  color: #229ED9 !important;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;

  text-decoration: none !important;
  box-shadow: var(--shadow-sm);

  transition: var(--transition-fast), var(--transition-move);
}

@media (hover: hover) {
  .premium-tg-button:hover {
    background: #229ED9 !important;
    color: #fff !important;
    border-color: #229ED9 !important;
    transform: translateY(-2px);
  }
}

/* =========================
   ПОИСК
========================= */
.mob-search,
#searchform {
  margin: 5px 0 15px !important;
}

/* =========================
   КАРТОЧКИ
========================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* =========================
   РЕКЛАМА
========================= */
.ads-container {
  margin: 15px auto;
  text-align: center;
  min-height: 90px;
  clear: both;
}

/* =========================
   КНОПКИ
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--primary);
  color: #fff;

  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;

  font-weight: 600;
  cursor: pointer;
  text-decoration: none;

  transition: var(--transition-fast);
}

.btn:hover {
  background: var(--primary-hover);
}

/* =========================
   ИНПУТЫ
========================= */
.input {
  width: 100%;
  padding: 12px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: var(--input-bg);
  color: var(--text-main);

  margin-bottom: 15px;
}

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

/* =========================
   РЕТРО ВИДЖЕТ (КРИТИЧНО)
========================= */
.retro-box-container {
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius);
  padding: 30px;
  margin: 25px 0;

  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.retro-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--primary);
}

.retro-desc {
  font-size: 0.95em;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.retro-icon-main {
  font-size: 50px;
  margin: 15px 0;
  display: block;
}

.retro-btn {
  display: inline-flex;
  padding: 12px 28px;

  background: var(--primary);
  color: #fff !important;

  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none !important;

  transition: var(--transition-fast), var(--transition-move);
}

@media (hover: hover) {
  .retro-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
  }
}

.retro-display-text {
  display: none;
  margin-top: 20px;
  padding: 15px;

  font-size: 1.1em;
  line-height: 1.6;

  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-body);
}

.tg-wrapper {
  display: none;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.tg-btn-link {
  display: inline-flex;
  align-items: center;

  background: #229ED9;
  color: #fff !important;

  padding: 10px 20px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;

  text-decoration: none !important;
  transition: var(--transition-fast), var(--transition-move);
}

@media (hover: hover) {
  .tg-btn-link:hover {
    background: #1c88ba;
    transform: translateY(-2px);
  }
}

/* =========================
   ЗАГОЛОВКИ
========================= */
h2, h3 {
  font-weight: 700;
  color: var(--primary);
  margin: 1.5rem 0 1rem;
  line-height: 1.3;
}

h2::after,
h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 6px;

  background: var(--accent);
  border-radius: var(--radius);
}
