:root {
  --bg: #14082b;
  --bg-2: #1d0d3a;
  --surface: rgba(255, 220, 245, 0.05);
  --surface-2: rgba(255, 220, 245, 0.09);
  --border: rgba(255, 180, 220, 0.10);
  --border-2: rgba(255, 180, 220, 0.22);
  --text: #fbeaff;
  --muted: #a89cc4;
  --accent: #ff3d8a;
  --accent-2: #ffb547;
  --accent-grad: linear-gradient(135deg, #ffd86b 0%, #ff7a3d 45%, #ff2d8e 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(255, 216, 107, 0.25), rgba(255, 45, 142, 0.25));
  --danger: #ff4d6d;
  --success: #2bd47d;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 30px 60px -20px rgba(255, 61, 138, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
code { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 0.9em; }
small { color: var(--muted); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.is-hidden { display: none !important; }
.link { color: var(--accent-2); }
.link:hover { text-decoration: underline; }

/* ───── фон ───── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(255, 122, 61, 0.20), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(255, 45, 142, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.bg-grid::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 180, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 180, 220, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 80%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 900px; height: 900px;
  top: -300px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 122, 61, 0.30), rgba(255, 45, 142, 0.18) 50%, transparent 75%);
  filter: blur(60px);
}

/* ───── навигация ───── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(20, 8, 43, 0.65);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 24px; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: url('/img/logo.png') center/contain no-repeat;
  filter: drop-shadow(0 0 14px rgba(255, 122, 61, 0.45));
}
.brand__name { letter-spacing: 0.16em; font-size: 14px; }
.nav__links { display: flex; gap: 22px; margin-left: 16px; }
.nav__links a { color: var(--muted); font-size: 14px; transition: color 120ms; }
.nav__links a:hover { color: var(--text); }
.nav__cta { margin-left: auto; display: flex; gap: 10px; }

/* ───── кнопки ───── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 1;
  transition: transform 120ms, background 120ms, border-color 120ms, box-shadow 120ms;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--primary {
  background: var(--accent-grad);
  color: #1a0930;
  box-shadow: 0 10px 30px -8px rgba(255, 45, 142, 0.55);
}
.btn--primary:hover { box-shadow: 0 16px 40px -10px rgba(255, 122, 61, 0.75); }
.btn--primary .btn__hint { color: rgba(26, 9, 48, 0.7); }
.btn--ghost { background: var(--surface); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn--lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }
.btn--sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn__hint { color: rgba(255, 234, 255, 0.7); font-weight: 500; font-size: 12px; }

/* ───── hero ───── */
.hero { padding: 80px 0 60px; }
.hero__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.pill {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-2);
  font-size: 12px; color: var(--muted); margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(40px, 6vw, 72px); line-height: 1.05; margin: 0 0 18px;
  font-weight: 800; letter-spacing: -0.02em; word-break: break-word;
}
.grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__sub { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0 0 28px; max-width: 540px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow);
}
.stat {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.stat--wide { grid-column: span 2; }
.stat__value { font-size: 26px; font-weight: 800; }
.stat__label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
.ip { grid-column: span 2; padding-top: 6px; }
.ip__label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.ip__value {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.ip__value code { font-size: 15px; font-weight: 600; color: var(--accent-2); }

/* Список IP серверов в hero-блоке. Один и тот же стиль строки переиспользует .ip__value,
   но шапка списка добавляет вертикальный отступ между строками. */
.ip__list { display: flex; flex-direction: column; gap: 8px; }
.ip__list .ip__value { min-width: 0; }
.ip__list .ip__value code {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1 1 auto; min-width: 0;
}
.ip__list .ip__name {
  color: var(--muted); font-size: 12px; margin-right: 8px;
  white-space: nowrap;
}

/* ───── секции ───── */
.section { padding: 70px 0; }
.section__head { margin-bottom: 28px; }
.section__head h2 { margin: 0 0 8px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -0.01em; }
.section__head p { color: var(--muted); margin: 0; }

.grid { display: grid; gap: 18px; }
.grid--servers { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--news { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--2 { grid-template-columns: 1fr 1fr; gap: 18px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  transition: border-color 150ms, transform 150ms;
  position: relative; overflow: hidden;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.card--skeleton { min-height: 200px; background: var(--surface); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.6; } }

/* ───── карточка сервера с фоном ───── */
.card--server { padding: 24px; }
.card--server .card__bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0.28;
  filter: saturate(0.55) hue-rotate(-15deg) brightness(0.7) contrast(1.05);
  transition: opacity 250ms;
}
.card--server::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 45, 142, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(20, 8, 43, 0.55) 0%, rgba(20, 8, 43, 0.92) 100%);
}
.card--server:hover .card__bg { opacity: 0.42; }
.card--server > *:not(.card__bg) { position: relative; z-index: 2; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card__head h3 { margin: 0; font-size: 18px; }
.card__desc { color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.card__meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin-bottom: 14px; flex-wrap: wrap; }
.card__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.card__foot code { color: var(--accent-2); font-weight: 600; }
.card__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ───── Legal / правила сервера ───── */
.legal { padding: 56px 0 80px; }
.legal__article {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(15, 6, 35, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px clamp(20px, 4vw, 44px);
  display: grid; gap: 16px;
}
.legal__article h1 { margin: 0 0 8px; font-size: clamp(26px, 3.5vw, 38px); }
.legal__article h2 { margin: 20px 0 4px; font-size: 20px; }
.legal__article h3 { margin: 16px 0 2px; font-size: 17px; }
.legal__article p { margin: 0; line-height: 1.65; color: var(--text); }
.legal__article ul, .legal__article ol { margin: 4px 0; padding-left: 22px; line-height: 1.65; }
.legal__article a { color: var(--accent-2); }
.legal__article a:hover { text-decoration: underline; }

.rules-body { display: grid; gap: 12px; }
.rules-body .grad {
  background: linear-gradient(90deg, #ffb05b, #ff5a7a, #d24bd1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}


.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border);
}
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status--up { color: var(--success); }
.status--up::before { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status--down { color: var(--danger); }
.status--down::before { background: var(--danger); }

/* ───── карточка новости ───── */
.card--news { display: flex; flex-direction: column; padding: 0; min-height: 240px; }
.card--news .news__cover {
  height: 0; background-size: cover; background-position: center;
  transition: height 250ms;
}
.card--news.has-cover .news__cover { height: 180px; }
.card--news.has-cover.subtle .news__cover {
  height: 180px;
  opacity: 0.35; filter: saturate(0.55) hue-rotate(-15deg) brightness(0.7);
  position: absolute; left: 0; right: 0; top: 0; z-index: 0;
}
.card--news.has-cover.subtle::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 180px; z-index: 1;
  background: linear-gradient(180deg, rgba(20, 8, 43, 0.55), rgba(20, 8, 43, 0.95));
}
.card--news .news__body { padding: 22px; position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; }
.card--news .news__body h3 { margin: 0 0 6px; font-size: 18px; }
.card--news .news__body p { color: var(--muted); margin: 0 0 14px; line-height: 1.55; flex: 1; }
.card--news .news__meta { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.card--news .news__more { color: var(--accent-2); font-weight: 600; }
.card--news.has-cover.highlight .news__cover { box-shadow: 0 -1px 0 rgba(255, 180, 220, 0.15) inset; }

.section--cta { padding: 50px 0 90px; }
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); padding: 32px;
  background-image:
    radial-gradient(700px 200px at 100% 0%, rgba(255, 45, 142, 0.22), transparent 60%),
    radial-gradient(500px 200px at 0% 100%, rgba(255, 181, 71, 0.15), transparent 60%);
}
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; color: var(--muted); }

/* ───── footer ───── */
.footer { border-top: 1px solid var(--border); padding: 40px 0 28px; background: rgba(0,0,0,0.3); }
.footer__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 12px; }
.footer__cols a { display: block; padding: 4px 0; color: var(--text); font-size: 14px; }
.footer__cols a:hover { color: var(--accent-2); }

/* ───── модалка ───── */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal[aria-hidden="false"] { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 4, 35, 0.75); backdrop-filter: blur(6px); }
.modal__dialog {
  position: absolute; inset: 0; margin: auto;
  width: min(420px, calc(100% - 32px)); height: max-content;
  background: linear-gradient(180deg, #271346, #170830);
  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow);
}
.modal__close {
  /* Раньше крестик был absolute и налазил на табы. Теперь он часть
     обычного потока, прижат к правому краю и отделён от табов отступом. */
  display: block;
  margin: 0 0 12px auto;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px; line-height: 1;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.modal__close:hover { background: var(--surface-2); border-color: var(--border-2); }
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--surface); border-radius: 10px; margin-bottom: 18px; }
.tab { flex: 1; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px; }
.tab.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-2); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form h3 { margin: 0 0 4px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form input {
  background: rgba(0,0,0,0.35); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; color: var(--text); font-size: 14px;
  transition: border-color 120ms, background 120ms;
}
.form input:focus { outline: none; border-color: var(--accent); background: rgba(0,0,0,0.55); }
.form__error { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ───── профиль ───── */
.profile { padding: 40px 0 80px; display: grid; gap: 22px; }
.profile__head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.profile__avatar {
  width: 84px; height: 84px; border-radius: 18px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  font-weight: 800; font-size: 36px; color: #1a0930;
  box-shadow: 0 0 30px rgba(255, 122, 61, 0.5);
}
.profile__head h1 { margin: 0 0 4px; }
.profile__balance { text-align: right; }
.sessions { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sessions li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px;
}

/* ───── страница новости ───── */
.article { padding: 40px 0 80px; max-width: 880px; }
.article__back { color: var(--muted); display: inline-block; margin-bottom: 18px; font-size: 14px; }
.article__back:hover { color: var(--accent-2); }
.article__cover {
  width: 100%; aspect-ratio: 16/7;
  background-size: cover; background-position: center;
  border-radius: var(--radius-lg); margin-bottom: 26px;
  border: 1px solid var(--border);
}
.article__head h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 12px; letter-spacing: -0.01em; }
.article__meta { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.article__body { font-size: 17px; line-height: 1.7; color: var(--text); }
.article__body p { margin: 0 0 1.1em; }

/* ───── адаптив ───── */
@media (max-width: 900px) {
  .hero { padding: 50px 0 30px; }
  .hero__inner { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .profile__head { grid-template-columns: auto 1fr; }
  .profile__balance { grid-column: span 2; text-align: left; }
}
