:root {
  --surface-0: #03040C;
  --surface-1: #090A14;
  --surface-2: #101228;
  --brand-red: #E01832;
  --brand-red-deep: #B21022;
  --brand-gold: #E5AE55;
  --brand-gold-bright: #F6D07A;
  --ink: #FFFFFF;
  --ink-soft: #F2EDE4;
  --muted: #A8ACC0;
  --muted-2: #6F7488;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 1rem;
  --radius-lg: 20px;
  --maxw: 1180px;
  --topbar-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 1rem);
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
  background: linear-gradient(185deg, var(--surface-2) 0%, var(--surface-1) 45%, var(--surface-0) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }

a {
  color: var(--brand-gold);
  text-decoration: none;
}

a:hover { color: var(--brand-gold-bright); }

:focus-visible {
  outline: 2px solid var(--brand-gold-bright);
  outline-offset: 3px;
}

.o-page { position: relative; z-index: 1; }

.c-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 4, 12, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.c-topbar nav {
  width: min(100%, var(--maxw));
  min-height: var(--topbar-h);
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.c-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  margin-right: auto;
}

.c-logo:hover { color: inherit; }

.c-logo img { width: 36px; height: 36px; }

.c-logo-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.c-logo-name strong {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.07em;
  background: linear-gradient(90deg, var(--ink-soft), var(--brand-gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--ink-soft);
}

.c-logo-name span {
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--muted-2);
}

.burger-menu { display: flex; align-items: center; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.nav-links a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-links a.active,
.nav-links a:hover { color: var(--brand-gold); }

.burger-icon,
.close-menu { display: none; }

.auth-buttons {
  display: flex;
  gap: 0.55rem;
  margin-left: 0.4rem;
}

.login,
.register,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1;
  padding: 0.68rem 1.15rem;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.login:hover,
.register:hover,
.cta-button:hover { transform: translateY(-1px); }

.login {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.login:hover {
  border-color: var(--brand-gold);
  color: var(--brand-gold-bright);
}

.register,
.cta-button {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-deep));
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(224, 24, 50, 0.32);
}

.register:hover,
.cta-button:hover {
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(224, 24, 50, 0.48);
}

.hero-banner {
  width: min(100% - 2rem, var(--maxw));
  margin: 1.15rem auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(229, 174, 85, 0.35);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.hero-banner img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.hero {
  width: min(100% - 2rem, var(--maxw));
  margin: 0 auto;
  padding: 3.2rem 0 1.4rem;
  text-align: center;
}

.hero-banner + .hero {
  padding-top: 1.5rem;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.1rem 0 1.4rem;
}

.card-row a {
  display: block;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: var(--muted);
}

.card-row a strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand-gold);
  font-size: 1.05rem;
}

.card-row a:hover {
  border-color: rgba(229, 174, 85, 0.45);
  color: var(--ink-soft);
}

.hero-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero h1 {
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(1.7rem, 4.6vw, 2.7rem);
  line-height: 1.18;
  margin-bottom: 0.85rem;
}

.hero-note {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted-2);
}

main {
  width: min(100% - 2rem, var(--maxw));
  margin: 0 auto 2rem;
}

.content {
  background: linear-gradient(165deg, var(--surface-2), #0c0e1c);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem 2rem;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
}

.content p { margin: 0 0 1rem; }

.content strong { color: var(--ink-soft); font-weight: 600; }

.content h2 {
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  line-height: 1.25;
  margin: 2.1rem 0 0.85rem;
  padding-left: 0.85rem;
  position: relative;
}

.content h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-gold));
}

.content h3 {
  color: var(--brand-gold);
  font-weight: 600;
  font-size: 1.12rem;
  margin: 1.45rem 0 0.5rem;
}

.content ul,
.content ol { margin: 0 0 1.1rem 1.2rem; }

.content li { margin-bottom: 0.45rem; }

.content a {
  color: var(--brand-gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(229, 174, 85, 0.35);
}

.toc {
  margin: 0 0 1.6rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.toc p {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.note {
  margin: 1rem 0 1.2rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(229, 174, 85, 0.55);
  background: rgba(229, 174, 85, 0.06);
}

.note strong { display: block; margin-bottom: 0.25rem; color: var(--brand-gold-bright); }

.cta-section {
  margin: 1.4rem 0;
  padding: 1.5rem 1.2rem;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(229, 174, 85, 0.32);
  background: linear-gradient(140deg, rgba(224, 24, 50, 0.16), rgba(16, 18, 40, 0.85));
}

.table-wrap {
  margin: 1rem 0 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}

th {
  background: linear-gradient(90deg, var(--brand-red-deep), var(--brand-red));
  color: var(--ink);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  padding: 0.8rem 0.95rem;
}

td {
  padding: 0.72rem 0.95rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

tr:nth-child(even) td { background: #0a0c18; }
tr:nth-child(odd) td { background: var(--surface-0); }

.rg {
  margin-top: 1.4rem;
  padding: 1.25rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid rgba(229, 174, 85, 0.5);
  background: linear-gradient(160deg, rgba(229, 174, 85, 0.1), rgba(3, 4, 12, 0.35));
}

.rg h2 { margin-top: 0; }

footer {
  margin-top: 1rem;
  padding: 2rem 1.25rem 2.4rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted-2);
  font-size: 0.82rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.1rem;
  margin-bottom: 0.7rem;
}

footer nav a { color: var(--muted); }

@media (max-width: 860px) {
  .burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
  }

  .burger-icon span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }

  .nav-links {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 86vw);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 4.5rem 1.4rem 1.5rem;
    background: #090a14;
    border-right: 1px solid var(--line);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .nav-links.is-open { transform: none; }

  .close-menu {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .close-menu span {
    position: absolute;
    left: 6px;
    right: 6px;
    top: 17px;
    height: 2px;
    background: var(--ink);
  }

  .close-menu span:first-child { transform: rotate(45deg); }
  .close-menu span:last-child { transform: rotate(-45deg); }

  .c-topbar nav { gap: 0.6rem; }
  .auth-buttons { margin-left: auto; }
  .login,
  .register { padding: 0.55rem 0.75rem; font-size: 0.78rem; }
}
