/* ============================================================
   UKRAINE GTA 5 — RULES DATABASE
   style.css — дизайн-токени, база, layout, компоненти
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Backgrounds */
  --bg-0: #04060d;
  --bg-1: #070b16;
  --bg-2: #0b1121;

  /* Text */
  --text-1: #eef2ff;
  --text-2: #9aa4c7;
  --text-3: #5d6788;

  /* Brand (з логотипу: синій + жовта зірка + помаранчева 5) */
  --blue: #3d7bfd;
  --blue-2: #6ea8ff;
  --cyan: #38d6ff;
  --yellow: #ffc42d;
  --orange: #ff9f1a;
  --danger: #ff5470;
  --green: #37d99b;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.045);
  --glass-bg-hover: rgba(255, 255, 255, 0.075);
  --glass-strong: rgba(11, 17, 33, 0.78);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(110, 168, 255, 0.35);

  /* Typography */
  --font-display: 'Unbounded', 'Manrope', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;

  /* Radius / spacing */
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 10px;
  --container: 1200px;

  /* Z-scale */
  --z-nav: 50;
  --z-toast: 90;
  --z-loader: 100;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Глибокий фоновий градієнт всього сайту */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(61, 123, 253, 0.13), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(255, 196, 45, 0.06), transparent 55%),
    radial-gradient(800px 700px at 50% 110%, rgba(56, 214, 255, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 45%, var(--bg-0));
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: rgba(61, 123, 253, 0.45); color: #fff; }

/* Скролбар */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(61,123,253,.55), rgba(56,214,255,.35));
  border-radius: 8px;
  border: 2px solid var(--bg-1);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* overflow-x: clip — щоб декоративні орби не створювали горизонтальний скрол */
section { position: relative; padding: 90px 0; overflow-x: hidden; overflow-x: clip; }
main.rule-page { position: relative; overflow-x: hidden; overflow-x: clip; }

.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.125em; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Headings ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-2);
  background: rgba(61, 123, 253, 0.09);
  border: 1px solid rgba(61, 123, 253, 0.25);
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-kicker .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.section-title .accent {
  background: linear-gradient(92deg, var(--blue-2), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-sub { margin-top: 14px; color: var(--text-2); font-size: 16.5px; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--container), calc(100% - 28px));
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 14px 10px 20px;
  border-radius: 18px;
  background: rgba(9, 13, 26, 0.55);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.navbar.scrolled {
  background: rgba(8, 12, 24, 0.86);
  border-color: rgba(110, 168, 255, 0.18);
  box-shadow: 0 14px 44px rgba(2, 6, 18, 0.6), 0 0 0 1px rgba(61, 123, 253, 0.06);
}

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  overflow: hidden;
  background: #0a0f1e;
  box-shadow: 0 0 0 1px rgba(110,168,255,.28), 0 4px 16px rgba(61,123,253,.35);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-name .b { color: var(--blue-2); }
.brand-name .y { color: var(--yellow); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  position: relative;
  padding: 9px 15px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: color .2s, background .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--text-1); background: rgba(255,255,255,.06); }
.nav-link .badge {
  min-width: 20px; height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 800;
  border-radius: 999px;
  color: #1a1400;
  background: linear-gradient(120deg, var(--yellow), var(--orange));
  box-shadow: 0 0 12px rgba(255, 196, 45, 0.4);
}

.nav-cta {
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, var(--blue), #2f5fe0);
  border: 1px solid rgba(110, 168, 255, 0.45);
  box-shadow: 0 6px 22px rgba(61, 123, 253, 0.35), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .2s var(--ease), box-shadow .25s, filter .2s;
  cursor: pointer;
}
.nav-cta:hover { filter: brightness(1.1); box-shadow: 0 8px 30px rgba(61, 123, 253, 0.5), inset 0 1px 0 rgba(255,255,255,.18); }
.nav-cta kbd {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.2);
}

.nav-burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}
.nav-burger .icon { font-size: 20px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 150px 0 70px;
  overflow: hidden;
}
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  margin-bottom: 30px;
}
.hero-badge .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(55, 217, 155, .6);
  animation: pulse-ring 2.2s infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 8.5vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.hero-title .t-blue {
  background: linear-gradient(95deg, #7db2ff 5%, var(--blue) 55%, #2b63ec);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(61, 123, 253, 0.35));
}
.hero-title .t-ghost {
  /* Суцільне світле "GTA" як на офіційному логотипі */
  background: linear-gradient(180deg, #ffffff 15%, #d6dcef 55%, #9aa6c4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 22px rgba(255, 255, 255, 0.14));
}
.hero-title .t-orange {
  background: linear-gradient(160deg, var(--yellow), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 159, 26, 0.4));
}
.hero-star {
  display: inline-block;
  color: var(--yellow);
  font-size: 0.35em;
  vertical-align: super;
  filter: drop-shadow(0 0 12px rgba(255, 196, 45, .8));
  animation: star-twinkle 3s ease-in-out infinite;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.6vw, 26px);
  font-weight: 500;
  color: var(--text-1);
  margin-top: 18px;
}
.hero-desc {
  max-width: 640px;
  margin: 16px auto 0;
  color: var(--text-2);
  font-size: clamp(15px, 1.8vw, 17.5px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

/* Кнопки */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .3s, filter .2s, background .2s, border-color .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--blue) 10%, #2f5fe0 90%);
  border: 1px solid rgba(110, 168, 255, 0.5);
  box-shadow: 0 10px 34px rgba(61, 123, 253, 0.4), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 14px 44px rgba(61, 123, 253, 0.55), 0 0 60px rgba(61,123,253,.25), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-ghost {
  color: var(--text-1);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  box-shadow: 0 8px 30px rgba(2, 6, 18, 0.5);
}
.btn-gold {
  color: #241a00;
  background: linear-gradient(120deg, var(--yellow), var(--orange));
  border: 1px solid rgba(255, 214, 90, .6);
  box-shadow: 0 10px 34px rgba(255, 173, 32, 0.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { filter: brightness(1.07); box-shadow: 0 14px 44px rgba(255, 173, 32, 0.5); }

/* Статистика */
.hero-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 84px;
}
.stat-card {
  position: relative;
  padding: 28px 22px 24px;
  border-radius: var(--r-lg);
  text-align: center;
  overflow: hidden;
}
.stat-card .icon-wrap {
  width: 46px; height: 46px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  font-size: 22px;
  color: var(--blue-2);
  background: rgba(61, 123, 253, 0.12);
  border: 1px solid rgba(61, 123, 253, 0.28);
  box-shadow: 0 0 24px rgba(61, 123, 253, 0.18);
}
.stat-card:nth-child(2) .icon-wrap { color: var(--yellow); background: rgba(255,196,45,.1); border-color: rgba(255,196,45,.3); box-shadow: 0 0 24px rgba(255,196,45,.15); }
.stat-card:nth-child(3) .icon-wrap { color: var(--cyan); background: rgba(56,214,255,.1); border-color: rgba(56,214,255,.3); box-shadow: 0 0 24px rgba(56,214,255,.15); }
.stat-card:nth-child(4) .icon-wrap { color: var(--green); background: rgba(55,217,155,.1); border-color: rgba(55,217,155,.3); box-shadow: 0 0 24px rgba(55,217,155,.15); }

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(180deg, #fff, #b9c8f2);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-value .plus { color: var(--yellow); -webkit-text-fill-color: var(--yellow); }
.stat-label {
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Scroll-хінт (у потоці, після тикера тегів) */
.scroll-hint {
  position: relative;
  z-index: 2;
  margin: 54px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.scroll-hint .wheel {
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 14px;
  position: relative;
}
.scroll-hint .wheel::after {
  content: '';
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--blue-2);
  animation: wheel-scroll 1.8s var(--ease) infinite;
}

/* ---------- Search ---------- */
.search-panel {
  padding: 34px;
  border-radius: 26px;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box .icon-search {
  position: absolute;
  left: 22px;
  font-size: 21px;
  color: var(--text-3);
  pointer-events: none;
  transition: color .2s;
}
.search-box:focus-within .icon-search { color: var(--blue-2); }
.search-input {
  width: 100%;
  padding: 21px 130px 21px 58px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-1);
  background: rgba(4, 7, 15, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: 17px;
  outline: none;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.search-input::placeholder { color: var(--text-3); }
/* Ховаємо нативний хрестик type="search" — у нас свій */
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-input:focus {
  border-color: rgba(61, 123, 253, 0.55);
  background: rgba(4, 7, 15, 0.8);
  box-shadow: 0 0 0 4px rgba(61, 123, 253, 0.14), 0 0 44px rgba(61, 123, 253, 0.12);
}
.search-clear {
  position: absolute;
  right: 74px;
  width: 34px; height: 34px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--text-3);
  transition: color .2s, background .2s;
}
.search-clear:hover { color: var(--text-1); background: rgba(255,255,255,.07); }
.search-clear.visible { display: inline-flex; }
.search-kbd {
  position: absolute;
  right: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  pointer-events: none;
}

/* Фільтри */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.filters-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-border);
  transition: all .22s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { color: var(--text-1); border-color: var(--glass-border-hover); background: rgba(61,123,253,.08); }
.chip.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(61,123,253,.9), rgba(47,95,224,.9));
  border-color: rgba(110, 168, 255, 0.6);
  box-shadow: 0 4px 18px rgba(61, 123, 253, 0.35);
}
.chip.chip-gold.active {
  color: #241a00;
  background: linear-gradient(120deg, var(--yellow), var(--orange));
  border-color: rgba(255, 214, 90, .7);
  box-shadow: 0 4px 18px rgba(255, 173, 32, 0.35);
}

.select-wrap { position: relative; margin-left: auto; }
.select-wrap .icon-chev {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-3);
  pointer-events: none;
}
.cat-select {
  -webkit-appearance: none;
  appearance: none;
  padding: 10px 42px 10px 16px;
  min-width: 230px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  background: rgba(4, 7, 15, 0.6);
  border: 1px solid var(--glass-border);
  outline: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.cat-select:focus { border-color: rgba(61,123,253,.55); box-shadow: 0 0 0 4px rgba(61,123,253,.14); }
.cat-select option { background: var(--bg-2); color: var(--text-1); }

/* Результати */
.results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 34px 0 18px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 600;
}
.results-meta .count { color: var(--blue-2); font-weight: 800; }
.results-meta .reset-filters {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all .2s;
  cursor: pointer;
}
.results-meta .reset-filters:hover { color: var(--danger); border-color: rgba(255,84,112,.3); background: rgba(255,84,112,.07); }
.results-meta .reset-filters.visible { display: inline-flex; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Карточка правила */
.rule-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
  border-radius: var(--r-md);
  cursor: pointer;
  /* overflow видимий — щоб тултіп покарання не обрізався */
}
.rule-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rule-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-2);
  padding: 5px 13px;
  border-radius: 9px;
  background: rgba(61, 123, 253, 0.12);
  border: 1px solid rgba(61, 123, 253, 0.3);
  box-shadow: 0 0 18px rgba(61, 123, 253, 0.12);
  white-space: nowrap;
}
.rule-cat-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--glass-border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.rule-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  color: var(--text-3);
  background: rgba(255,255,255,.04);
  border: 1px solid transparent;
  transition: all .2s var(--ease);
  cursor: pointer;
}
.icon-btn:hover {
  color: var(--text-1);
  background: rgba(61,123,253,.14);
  border-color: rgba(61,123,253,.3);
}
.icon-btn.faved { color: var(--yellow); }
.icon-btn.faved:hover { color: var(--yellow); background: rgba(255,196,45,.12); border-color: rgba(255,196,45,.3); }

.rule-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-1);
}
.rule-snippet {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
mark {
  background: rgba(255, 196, 45, 0.24);
  color: var(--yellow);
  border-radius: 4px;
  padding: 0 3px;
}
.rule-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}
.tag {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--cyan);
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(56, 214, 255, 0.07);
  border: 1px solid rgba(56, 214, 255, 0.2);
  transition: all .2s;
  cursor: pointer;
}
.tag:hover { background: rgba(56, 214, 255, 0.16); border-color: rgba(56,214,255,.45); }

.rule-punish-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  opacity: .85;
}

/* Show more */
.show-more-wrap { display: flex; justify-content: center; margin-top: 34px; }

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-2);
}
.empty-state .icon-big {
  font-size: 52px;
  color: var(--text-3);
  margin-bottom: 18px;
  display: inline-block;
  opacity: .7;
}
.empty-state h3 { font-family: var(--font-display); font-size: 20px; color: var(--text-1); margin-bottom: 8px; }

/* ---------- Категорії ---------- */
.cat-group { margin-bottom: 46px; }
.cat-group-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.cat-group-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}
.cat-group-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--glass-border), transparent); }
.cat-group-count { font-size: 13px; font-weight: 700; color: var(--text-3); white-space: nowrap; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: var(--r-md);
  cursor: pointer;
  overflow: hidden;
}
.cat-card-icon {
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font-size: 25px;
  color: var(--blue-2);
  background: rgba(61, 123, 253, 0.1);
  border: 1px solid rgba(61, 123, 253, 0.26);
  box-shadow: 0 0 26px rgba(61, 123, 253, 0.14);
  transition: all .3s var(--ease);
}
.cat-card:hover .cat-card-icon {
  color: var(--yellow);
  background: rgba(255, 196, 45, 0.1);
  border-color: rgba(255, 196, 45, 0.35);
  box-shadow: 0 0 30px rgba(255, 196, 45, 0.2);
}
.cat-card-name { font-size: 16.5px; font-weight: 800; line-height: 1.35; }
.cat-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.cat-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 4px;
}
.cat-card-count {
  font-size: 13px;
  font-weight: 800;
  color: var(--blue-2);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cat-card-arrow {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 15px;
  color: var(--text-3);
  background: rgba(255,255,255,.04);
  transition: all .25s var(--ease);
}
.cat-card:hover .cat-card-arrow {
  color: #fff;
  background: var(--blue);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(61,123,253,.4);
}

/* ---------- Сторінка правила ---------- */
.rule-page { padding: 150px 0 90px; min-height: 100vh; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 26px;
}
.breadcrumbs a { color: var(--text-2); transition: color .2s; }
.breadcrumbs a:hover { color: var(--blue-2); }
.breadcrumbs .sep { font-size: 11px; opacity: .6; }
.breadcrumbs .current { color: var(--text-1); }

.rule-hero {
  padding: 38px;
  border-radius: 26px;
  margin-bottom: 22px;
}
.rule-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.rule-num-xl {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(120deg, rgba(61,123,253,.25), rgba(47,95,224,.15));
  border: 1px solid rgba(110, 168, 255, 0.4);
  box-shadow: 0 0 40px rgba(61, 123, 253, 0.25), inset 0 1px 0 rgba(255,255,255,.12);
  text-shadow: 0 0 24px rgba(110, 168, 255, 0.6);
}
.rule-hero-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.rule-hero-actions { margin-left: auto; display: flex; gap: 9px; }
.rule-hero-actions .icon-btn { width: 46px; height: 46px; font-size: 19px; border-radius: 13px; background: rgba(255,255,255,.05); border: 1px solid var(--glass-border); }

.rule-page-title {
  font-family: var(--font-display);
  font-size: clamp(21px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.35;
}

.rule-body-panel { padding: 36px 38px; border-radius: 26px; margin-bottom: 22px; }
.rule-body-panel h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 20px;
}
.rule-text { font-size: 16.5px; line-height: 1.85; color: var(--text-1); }
.rule-text p { margin-bottom: 14px; }
.rule-text ul { margin: 6px 0 16px 8px; list-style: none; }
.rule-text li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 9px;
  color: var(--text-2);
}
.rule-text li::before {
  content: '';
  position: absolute;
  left: 4px; top: 11px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(61, 123, 253, 0.7);
}

.callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  margin: 16px 0;
  font-size: 15px;
  line-height: 1.7;
}
.callout .icon { font-size: 19px; margin-top: 3px; }
.callout-note {
  color: #cfe0ff;
  background: rgba(61, 123, 253, 0.08);
  border: 1px solid rgba(61, 123, 253, 0.24);
}
.callout-note .icon { color: var(--blue-2); }
.callout-exception {
  color: #ffedc4;
  background: rgba(255, 196, 45, 0.06);
  border: 1px solid rgba(255, 196, 45, 0.22);
}
.callout-exception .icon { color: var(--yellow); }
.callout-explain {
  color: #c8f4ff;
  background: rgba(56, 214, 255, 0.06);
  border: 1px solid rgba(56, 214, 255, 0.22);
}
.callout-explain .icon { color: var(--cyan); }
.callout b { font-weight: 800; }

.punish-panel {
  display: flex;
  gap: 18px;
  padding: 26px 30px;
  border-radius: var(--r-lg);
  margin-bottom: 22px;
  background: linear-gradient(120deg, rgba(255, 84, 112, 0.09), rgba(255, 84, 112, 0.03));
  border: 1px solid rgba(255, 84, 112, 0.3);
  box-shadow: 0 0 44px rgba(255, 84, 112, 0.08), inset 0 1px 0 rgba(255,255,255,.05);
}
.punish-icon {
  width: 52px; height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  font-size: 24px;
  color: var(--danger);
  background: rgba(255, 84, 112, 0.12);
  border: 1px solid rgba(255, 84, 112, 0.35);
  box-shadow: 0 0 26px rgba(255, 84, 112, 0.2);
}
.punish-panel h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--danger);
  margin-bottom: 7px;
}
.punish-panel p { font-size: 16px; font-weight: 600; color: #ffd9e0; line-height: 1.6; }

.rule-tags-panel { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.rule-tags-panel .tag { font-size: 13px; padding: 7px 16px; }

.rule-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 50px;
}
.rule-nav-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--r-md);
  transition: all .25s var(--ease);
}
.rule-nav-btn.next { flex-direction: row-reverse; text-align: right; }
.rule-nav-btn .arr {
  width: 38px; height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  font-size: 16px;
  color: var(--text-2);
  background: rgba(255,255,255,.05);
  transition: all .25s var(--ease);
}
.rule-nav-btn:hover .arr { color: #fff; background: var(--blue); box-shadow: 0 4px 18px rgba(61,123,253,.4); }
.rule-nav-btn .lbl { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); display: block; margin-bottom: 3px; }
.rule-nav-btn .ttl { font-size: 14px; font-weight: 700; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rule-nav-btn.disabled { opacity: .35; pointer-events: none; }

.related-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Favorites page ---------- */
.fav-head-actions { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.btn-danger-ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--danger);
  background: rgba(255, 84, 112, 0.07);
  border: 1px solid rgba(255, 84, 112, 0.28);
  transition: all .2s;
  cursor: pointer;
}
.btn-danger-ghost:hover { background: rgba(255, 84, 112, 0.15); box-shadow: 0 4px 20px rgba(255,84,112,.2); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  padding: 46px 0 34px;
  border-top: 1px solid var(--glass-border);
  background: rgba(5, 8, 16, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-note { color: var(--text-3); font-size: 13.5px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-2); font-size: 13.5px; font-weight: 600; transition: color .2s; }
.footer-links a:hover { color: var(--blue-2); }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-1);
  background: rgba(10, 15, 30, 0.92);
  border: 1px solid rgba(61, 123, 253, 0.35);
  box-shadow: 0 14px 44px rgba(2, 6, 18, 0.7), 0 0 30px rgba(61, 123, 253, 0.15);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: toast-in .35s var(--ease) both;
}
.toast.hide { animation: toast-out .3s ease both; }
.toast .icon { font-size: 18px; color: var(--green); }
.toast.gold .icon { color: var(--yellow); }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed;
  right: 26px; bottom: 26px;
  z-index: 40;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 18px;
  color: var(--text-1);
  background: rgba(10, 15, 30, 0.85);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .3s var(--ease);
  cursor: pointer;
}
.back-top.visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { border-color: var(--glass-border-hover); color: var(--blue-2); box-shadow: 0 0 26px rgba(61,123,253,.2); }
