:root {
  --page-bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.48);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --surface-soft: rgba(238, 248, 255, 0.5);
  --line: rgba(80, 145, 204, 0.38);
  --line-soft: rgba(151, 194, 229, 0.38);
  --brand: #1f67b2;
  --brand-dark: #183f78;
  --accent: #ef2f1d;
  --success: #168747;
  --text: #294761;
  --muted: #637b93;
  --shadow: 0 18px 40px rgba(43, 101, 157, 0.12);
  --radius: 8px;
  --site-width: 1290px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5fbff 48%, #ffffff 100%);
  color: var(--text);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(47, 134, 212, 0.45);
  outline-offset: 3px;
}

.site {
  width: min(var(--site-width), 100%);
  margin: 0 auto;
  padding: 0 0 56px;
}

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: min(38.5vh, 650px);
  min-height: 270px;
  background: #fff;
}

.hero__image,
.site-footer__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero__logo-link {
  position: absolute;
  top: 42px;
  left: 34px;
  z-index: 2;
  display: block;
  width: 300px;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.hero__logo-link:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.hero__logo {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 16px rgba(28, 75, 125, 0.18));
}

.site__layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 14px;
}

.sidebar {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel,
.content-panel,
.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.panel {
  overflow: hidden;
}

.panel--main {
  min-height: 603px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.34);
}

.panel__function-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
  color: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
}

.panel__function-number {
  font-size: 2.2rem;
  line-height: 1;
}

.panel__function-label {
  width: min-content;
  font-size: 0.92rem;
  line-height: 0.95;
}

.panel__title,
.content-panel__title,
.content-card h2 {
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
}

.side-nav,
.quick-links,
.server-status {
  padding: 8px 12px 14px;
}

.side-nav__item,
.quick-links__item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 10px;
  color: var(--brand);
  text-align: left;
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.side-nav__item:hover,
.quick-links__item:hover {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.62);
  transform: translateX(2px);
}

.side-nav__item.is-active {
  color: var(--accent);
  background: linear-gradient(90deg, rgba(239, 47, 29, 0.13), rgba(255, 255, 255, 0.48));
}

.side-nav__item.is-active .side-nav__icon {
  color: var(--accent);
}

.side-nav__icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
}

.side-nav__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-links__chevron {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: var(--brand-dark);
  font-size: 1.2rem;
  font-weight: 900;
}

.server-status {
  font-size: 0.95rem;
}

.server-status__line,
.server-status__players {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.server-status__line {
  color: var(--success);
}

.server-status__online {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 135, 71, 0.12);
  color: var(--success);
  font-size: 0.8rem;
}

.section {
  display: none;
}

.section.is-active {
  display: block;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}

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

.content-panel,
.content-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
}

.news-list {
  padding: 4px 16px 0;
}

.news-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(151, 194, 229, 0.34);
}

.news-item:last-child {
  border-bottom: 0;
}

.news-item__thumb {
  overflow: hidden;
  width: 160px;
  aspect-ratio: 1920 / 1615;
  border: 1px solid rgba(120, 174, 218, 0.32);
  border-radius: 8px;
  background: #e8f4ff;
  box-shadow: 0 10px 18px rgba(44, 88, 132, 0.14);
}

.news-item__thumb img,
.ad-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.news-item__thumb:hover img,
.ad-card:hover img {
  transform: scale(1.03);
}

.news-item__title {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 850;
}

.news-item__excerpt {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.news-item__meta {
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
}

.content-panel__footer {
  display: flex;
  justify-content: center;
  padding: 14px 0 18px;
}

.ads-list {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.ad-card {
  display: block;
  aspect-ratio: 1290 / 650;
  overflow: hidden;
  border: 1px solid rgba(120, 174, 218, 0.3);
  border-radius: 8px;
  background: #e8f4ff;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(38, 89, 139, 0.12);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.button--primary {
  color: #fff;
  background: linear-gradient(180deg, #2b90dc, #1f68b4);
  box-shadow: 0 8px 18px rgba(31, 104, 180, 0.22);
}

.info-list,
.patch-entries {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.mirror-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.mirror-link,
.info-row,
.patch-summary,
.patch-entry {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.mirror-link {
  min-height: 106px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  color: var(--brand);
  text-align: center;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease;
}

.mirror-link:hover {
  transform: translateY(-2px);
  background: var(--surface-strong);
}

.mirror-link__icon {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 999px;
  background: rgba(43, 144, 220, 0.12);
  font-size: 0.88rem;
  font-weight: 900;
}

.mirror-link__label {
  font-weight: 850;
}

.info-row,
.patch-summary,
.patch-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
}

.info-row__main,
.patch-summary__main {
  min-width: 0;
}

.info-row__main strong,
.patch-summary__main strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-dark);
}

.info-row__main span,
.patch-summary__main span,
.patch-entry ul {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

.info-row__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(60, 136, 207, 0.24);
  border-radius: 999px;
  background: rgba(234, 246, 255, 0.8);
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.video-frame-wrap {
  position: relative;
  margin: 16px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(219, 239, 255, 0.72);
}

.video-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.patch-entry {
  display: block;
}

.patch-entry h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 1rem;
}

.patch-entry ul {
  margin: 0 0 0 18px;
  padding: 0;
}

.site-footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin: -36px 0 0;
  width: 100%;
  height: min(38.5vh, 650px);
  min-height: 260px;
  padding: 36px 0 0;
  color: var(--brand-dark);
  text-align: center;
  background: transparent;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
}

.site-footer p {
  position: absolute;
  right: 16px;
  bottom: 22px;
  left: 16px;
  z-index: 2;
  margin: 0;
  color: rgba(24, 63, 120, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer__image {
  z-index: 0;
}

.has-guide-open {
  overflow: hidden;
}

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 29, 48, 0.52);
}

.guide-modal[hidden] {
  display: none;
}

.guide-modal__card {
  position: relative;
  width: min(100%, 680px);
  padding: 24px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.22);
  color: var(--text);
}

.guide-modal__card h2 {
  margin: 0 42px 12px 0;
  color: var(--brand-dark);
  font-size: 1.25rem;
}

.guide-modal__card p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.guide-modal__card ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.75;
}

.guide-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: 1.4rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .site {
    width: min(100%, calc(100vw - 20px));
  }

  .site__layout,
  .home-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel--main {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .site {
    padding-bottom: 32px;
  }

  .hero {
    min-height: 220px;
  }

  .hero__logo-link {
    top: 26px;
    left: 18px;
    width: 220px;
  }

  .site__layout {
    gap: 10px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .side-nav__item {
    min-height: 40px;
  }

  .panel--main {
    padding: 12px;
  }

  .news-item {
    grid-template-columns: 1fr;
  }

  .news-item__thumb {
    width: 100%;
    aspect-ratio: 1920 / 1615;
  }

  .info-row,
  .patch-summary,
  .patch-entry h3,
  .server-status__line,
  .server-status__players {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-frame-wrap {
    margin: 12px;
  }

  .mirror-links {
    grid-template-columns: 1fr;
    padding: 0 12px 12px;
  }

  .site-footer {
    margin-top: -20px;
    min-height: 220px;
    padding-top: 20px;
  }
}
