/* ============================================================
   GXT Guides — Z Route: Redemption
   Тёмная постапокалиптическая тема: вирусный лайм + выживший янтарь
   ============================================================ */

:root {
  --bg: #0b0d09;
  --bg-2: #10130c;
  --surface: #141810;
  --surface-2: #1a1f14;
  --line: rgba(163, 230, 53, 0.14);
  --line-soft: rgba(232, 230, 223, 0.08);

  --lime: #a3e635;
  --lime-dim: #84cc16;
  --amber: #f59e0b;
  --red: #ef4444;

  --text: #e8e6df;
  --muted: #9aa08b;
  --dim: #6b7160;

  --font-head: 'Russo One', 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', system-ui, -apple-system, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --glow-lime: 0 0 24px rgba(163, 230, 53, 0.25);
  --glow-amber: 0 0 24px rgba(245, 158, 11, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(163, 230, 53, 0.07), transparent 60%),
    radial-gradient(900px 420px at 10% 110%, rgba(245, 158, 11, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(163, 230, 53, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 230, 53, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: -1;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

.site-main { flex: 1; padding-bottom: 72px; }

/* ------------------------------------------------ риск-полосы (постапок-вайб) */

.hazard {
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--lime) 0 14px,
    transparent 14px 28px,
    var(--amber) 28px 42px,
    transparent 42px 56px
  );
  opacity: 0.5;
}
.hazard--top { position: sticky; top: 0; z-index: 60; }
.hazard--bottom { opacity: 0.3; }

/* ------------------------------------------------ шапка */

.site-header {
  position: sticky;
  top: 6px;
  z-index: 50;
  background: rgba(11, 13, 9, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--font-head);
  font-size: 22px;
  color: #0b0d09;
  background: linear-gradient(135deg, var(--lime), var(--lime-dim));
  border-radius: 10px;
  box-shadow: var(--glow-lime);
  transform: skewX(-6deg);
}

.logo__mark--lg { width: 56px; height: 56px; font-size: 30px; margin-inline: auto; }

.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { font-family: var(--font-head); font-size: 19px; letter-spacing: 0.04em; }
.logo__sub {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

.site-nav { display: flex; align-items: center; gap: 10px; }
.inline-form { display: inline; }

/* ------------------------------------------------ кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--lime), var(--lime-dim));
  color: #0c0f08;
  box-shadow: 0 4px 18px rgba(163, 230, 53, 0.28);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--glow-lime); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }

.btn--block { width: 100%; }
.btn:active { transform: translateY(0); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: var(--lime); color: var(--lime); }
.icon-btn--danger:hover { border-color: var(--red); color: var(--red); box-shadow: 0 0 14px rgba(239, 68, 68, 0.25); }

/* ------------------------------------------------ алерты */

.alert {
  margin: 16px 0;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14.5px;
}
.alert--success { border-color: rgba(163, 230, 53, 0.4); color: var(--lime); }
.alert--error { border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; background: rgba(239, 68, 68, 0.06); }
.alert--warning { border-color: rgba(245, 158, 11, 0.4); color: var(--amber); }

/* ------------------------------------------------ hero */

.hero {
  position: relative;
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 260px at 70% 30%, rgba(163, 230, 53, 0.12), transparent 70%),
    radial-gradient(420px 220px at 20% 80%, rgba(245, 158, 11, 0.09), transparent 70%);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; max-width: 760px; }

.hero__kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(34px, 5.2vw, 58px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero__title .accent {
  background: linear-gradient(100deg, var(--lime) 20%, var(--amber) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(163, 230, 53, 0.35));
}

.hero__sub { margin-top: 18px; font-size: 17px; color: var(--muted); max-width: 560px; }

.search {
  display: flex;
  gap: 10px;
  margin-top: 32px;
  max-width: 520px;
}

.search__input {
  flex: 1;
  padding: 12px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search__input::placeholder { color: var(--dim); }
.search__input:focus { border-color: var(--lime); box-shadow: var(--glow-lime); }

/* ------------------------------------------------ лента */

.feed { padding-top: 44px; }

.feed__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}

.feed__title { font-family: var(--font-head); font-size: 24px; letter-spacing: 0.02em; }
.feed__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--lime);
  background: rgba(163, 230, 53, 0.1);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 12px;
}

/* чипы-фильтры */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }

.chip {
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--lime); border-color: var(--lime); }

.chip--active {
  color: #0c0f08;
  background: linear-gradient(135deg, var(--lime), var(--lime-dim));
  border-color: transparent;
  box-shadow: 0 3px 14px rgba(163, 230, 53, 0.3);
}
.chip--active:hover { color: #0c0f08; }

.chip--sm { padding: 4px 12px; font-size: 12px; }
.chip--pin { color: var(--amber); border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.chip--pin:hover { color: var(--amber); }
.chip--draft { color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }

/* сетка карточек */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(163, 230, 53, 0.5);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), var(--glow-lime);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card__media img { transform: scale(1.06); }

.card__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(20, 24, 16, 0.2), rgba(11, 13, 9, 0.55)),
    repeating-linear-gradient(-45deg, #171c11 0 18px, #131710 18px 36px);
}
.card__ph-play {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(163, 230, 53, 0.7);
  position: relative;
  box-shadow: var(--glow-lime);
}
.card__ph-play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-38%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--lime);
}

.badge {
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(11, 13, 9, 0.85);
  backdrop-filter: blur(4px);
}
.badge--dur { right: 10px; bottom: 10px; color: var(--text); border: 1px solid var(--line-soft); }
.badge--pin {
  left: 10px;
  top: 10px;
  color: #0c0f08;
  background: linear-gradient(135deg, var(--amber), #d97706);
}

.card__body { display: flex; flex-direction: column; gap: 10px; padding: 18px; flex: 1; }
.card__tags { display: flex; flex-wrap: wrap; gap: 8px; }

.card__title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  transition: color 0.15s ease;
}
.card:hover .card__title { color: var(--lime); }

.card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--dim);
}
.dot { opacity: 0.5; }

/* ------------------------------------------------ пагинация */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 40px;
}
.pager__btn {
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.pager__btn:hover { border-color: var(--lime); color: var(--lime); }
.pager__info { font-size: 13.5px; color: var(--dim); }

/* ------------------------------------------------ страница гайда */

.guide { padding-top: 36px; }

.guide__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 26px;
  transition: color 0.15s ease;
}
.guide__back:hover { color: var(--lime); }

.guide__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.guide__title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.2;
  text-wrap: balance;
}

.guide__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.player-shell {
  margin-top: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), var(--glow-lime);
  background: #000;
}

.guide__desc {
  margin-top: 36px;
  padding: 26px 28px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  color: #cfd2c4;
  font-size: 15.5px;
}
.guide__desc-title {
  font-family: var(--font-head);
  font-size: 19px;
  margin-bottom: 14px;
  color: var(--text);
}

.related { margin-top: 64px; }
.related__title {
  font-family: var(--font-head);
  font-size: 22px;
  margin-bottom: 22px;
  padding-left: 14px;
  border-left: 3px solid var(--lime);
}

/* ------------------------------------------------ Plyr-тема */

.player, .side-card__video { width: 100%; }
.plyr { --plyr-color-main: var(--lime); --plyr-video-background: #000; }
.plyr__control--overlaid {
  background: rgba(163, 230, 53, 0.9);
  color: #0c0f08;
}
.plyr--full-ui input[type='range'] { color: var(--lime); }

/* ------------------------------------------------ пустое состояние */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty__icon { font-size: 46px; filter: drop-shadow(0 0 16px rgba(163, 230, 53, 0.4)); }

/* ------------------------------------------------ страница входа */

.body--auth .site-main { display: flex; align-items: center; }

.auth { width: 100%; display: grid; place-items: center; padding: 80px 0; }

.auth__card {
  width: min(420px, 100%);
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), var(--glow-lime);
  text-align: center;
}

.auth__title { font-family: var(--font-head); font-size: 24px; margin-top: 18px; }
.auth__sub { font-size: 14px; color: var(--muted); margin: 8px 0 26px; }
.auth__form { text-align: left; display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------------------------ формы */

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.field--row { flex-direction: row; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.field--row > .field { flex: 1; min-width: 200px; }
.field__err { font-size: 13px; color: #fca5a5; }

.input {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--lime); box-shadow: var(--glow-lime); }

select.input { cursor: pointer; }
select.input option { background: var(--surface); }

textarea.input { resize: vertical; min-height: 120px; }

input[type='file'].input { padding: 10px; color: var(--muted); }
input[type='file'].input::file-selector-button {
  font: inherit;
  font-weight: 600;
  color: var(--lime);
  background: rgba(163, 230, 53, 0.08);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-right: 12px;
  cursor: pointer;
}

.check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--lime);
  cursor: pointer;
}
.field--checks { flex-direction: row; gap: 22px; padding-bottom: 6px; flex-wrap: wrap; }

/* dropzone */
.dropzone {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dropzone.is-over { border-color: var(--lime); background: rgba(163, 230, 53, 0.05); }
.dropzone.is-filled { border-style: solid; border-color: rgba(163, 230, 53, 0.35); }
.dropzone__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 44px 20px;
  pointer-events: none;
}
.dropzone__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--lime);
  border: 2px solid rgba(163, 230, 53, 0.5);
  border-radius: 50%;
  box-shadow: var(--glow-lime);
}
.dropzone__text { font-size: 15px; color: var(--text); }
.dropzone__hint { font-size: 12.5px; color: var(--dim); }

.dropzone__file {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
}
.dropzone__file-icon { font-size: 26px; }
.dropzone__file-name { font-size: 15px; font-weight: 600; color: var(--lime); word-break: break-all; }
.dropzone__file-meta { font-size: 13px; color: var(--muted); }
.dropzone__file .icon-btn { position: relative; z-index: 3; margin-left: auto; }

.preview-thumb {
  margin-top: 10px;
  max-height: 160px;
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
}

/* ------------------------------------------------ страница формы гайда */

.form-page { padding-top: 36px; }
.form-page__title { font-family: var(--font-head); font-size: 30px; margin-bottom: 30px; }

.gform__grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.gform__main { display: flex; flex-direction: column; gap: 22px; }
.gform__side { display: flex; flex-direction: column; gap: 20px; }

.side-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.side-card h3 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--amber);
  margin-bottom: 12px;
}
.side-card__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.side-card__list li {
  font-size: 13.5px;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}
.side-card__list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--lime);
}
.side-card__video { border-radius: var(--radius-sm); border: 1px solid var(--line-soft); }
.side-card__note { font-size: 12.5px; color: var(--dim); margin-top: 10px; }

.gform__actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
}

/* ------------------------------------------------ панель управления */

.manage { padding-top: 36px; }
.manage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.manage__title { font-family: var(--font-head); font-size: 30px; }
.manage__sub { font-size: 14px; color: var(--muted); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.stat__num {
  font-family: var(--font-head);
  font-size: 30px;
  color: var(--lime);
  text-shadow: 0 0 18px rgba(163, 230, 53, 0.35);
}
.stat__label { font-size: 13px; color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid var(--line-soft);
}
.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.12s ease; }
.table tbody tr:hover { background: rgba(163, 230, 53, 0.04); }

.table__title a { font-weight: 600; }
.table__title a:hover { color: var(--lime); }
.table__title .chip { margin-left: 10px; }
.table__date, .table__actions { white-space: nowrap; }
.table__actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

.status { font-size: 13px; font-weight: 600; }
.status--on { color: var(--lime); }
.status--off { color: var(--amber); }

/* ------------------------------------------------ подвал */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  font-size: 13.5px;
  color: var(--dim);
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer__dim { letter-spacing: 0.14em; text-transform: uppercase; font-size: 11.5px; }

/* ------------------------------------------------ адаптив */

@media (max-width: 900px) {
  .gform__grid { grid-template-columns: 1fr; }
  .gform__side { flex-direction: row; flex-wrap: wrap; }
  .gform__side .side-card { flex: 1; min-width: 260px; }
}

@media (max-width: 640px) {
  .container { width: min(1200px, 100% - 28px); }
  .hero { padding: 56px 0 44px; }
  .search { flex-direction: column; }
  .field--row { flex-direction: column; align-items: stretch; }
  .site-header__inner { padding: 10px 0; }
  .logo__sub { display: none; }
  .feed { padding-top: 32px; }
  .grid { gap: 16px; }
  .gform__actions { flex-direction: column; }
  .gform__actions .btn { width: 100%; }
  .dropzone__file { padding: 16px; }
}
