:root {
  color-scheme: dark;
  --accent: #6ba539;
  --text: #f7f7f3;
  --muted: #b6b7af;
  --black: #080a07;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--black);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  border: 0;
  border-radius: 0;
  font: inherit;
  letter-spacing: 0;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  padding: 32px clamp(24px, 4vw, 64px);
  background: #161913;
}

.hero-video {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: scene-in 1.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.image-treatment {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: rgba(5, 7, 4, 0.24);
  box-shadow:
    inset 0 110px 110px rgba(0, 0, 0, 0.18),
    inset 0 -180px 180px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.hero-content {
  display: flex;
  width: min(680px, 86vw);
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.arma-logo {
  width: 100%;
  height: auto;
  color: #fff;
  filter: drop-shadow(0 4px 22px rgba(0, 0, 0, 0.32));
  animation: logo-in 1s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  animation: content-in 0.7s 0.44s ease-out both;
}

.community-widget {
  width: min(500px, 100%);
  animation: content-in 0.7s 0.56s ease-out both;
}

.community-panel {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 108px;
  padding: 18px;
  border-left: 3px solid var(--accent);
  background: rgba(6, 8, 5, 0.8);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  text-align: left;
}

.community-avatar {
  display: block;
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.community-info {
  min-width: 0;
}

.community-label {
  display: block;
  margin-bottom: 4px;
  color: #aeb0a9;
  font-size: 0.7rem;
}

.community-info h2 {
  overflow: hidden;
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-presence {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0;
  color: #d6d8d1;
  font-size: 0.78rem;
}

.presence-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: #6fca4d;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(111, 202, 77, 0.14);
  animation: presence-pulse 1.8s ease-in-out infinite;
}

.community-panel[data-state="error"] .presence-dot {
  background: #a5a69f;
  box-shadow: none;
  animation: none;
}

.community-join {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  font-size: 0.88rem;
  font-weight: 650;
  transition: background 180ms ease, transform 180ms ease;
}

.community-join svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.community-join:hover {
  background: #79b946;
  transform: translateY(-2px);
}

.community-join:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.community-note {
  margin: 10px 0 0;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.72);
}

.mobile-menu summary:focus-visible,
.mobile-menu nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.soundtrack {
  position: absolute;
  top: 24px;
  right: clamp(24px, 4vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  width: 248px;
  min-height: 66px;
  padding: 10px 12px 10px 20px;
  background: rgba(7, 8, 6, 0.66);
  color: #fff;
  animation: content-in 0.7s 0.84s ease-out both;
}

.soundtrack-kicker {
  display: block;
  color: #d2d3cd;
  font-size: 0.72rem;
  font-weight: 350;
}

.soundtrack strong {
  display: block;
  margin-top: 2px;
  font-size: 0.92rem;
  font-weight: 650;
}

.soundtrack-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.soundtrack-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.soundtrack-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.equalizer {
  display: flex;
  height: 18px;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.equalizer i {
  width: 2px;
  height: 13px;
  background: currentColor;
  transform: scaleY(0.25);
  transform-origin: center;
}

.soundtrack.is-playing .equalizer i {
  animation: meter 0.82s ease-in-out infinite alternate;
}

.soundtrack.is-playing .equalizer i:nth-child(2) {
  animation-delay: -0.32s;
}

.soundtrack.is-playing .equalizer i:nth-child(3) {
  animation-delay: -0.58s;
}

.soundtrack.is-playing .equalizer i:nth-child(4) {
  animation-delay: -0.16s;
}

.soundtrack audio {
  display: none;
}

.site-footer {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.site-footer a {
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.mobile-menu {
  display: none;
}

@keyframes scene-in {
  from {
    opacity: 0;
    transform: scale(1.035);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes content-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes meter {
  from {
    transform: scaleY(0.28);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes presence-pulse {
  50% {
    opacity: 0.55;
  }
}

@media (max-width: 1024px) {
  .page-shell {
    padding: 110px 28px 28px;
  }

  .soundtrack {
    top: 14px;
    right: auto;
    left: 18px;
    width: 238px;
    padding: 9px 10px 9px 18px;
  }

  .mobile-menu {
    position: absolute;
    z-index: 5;
    top: 18px;
    right: 18px;
    display: block;
  }

  .mobile-menu summary {
    position: relative;
    z-index: 2;
    display: flex;
    width: 48px;
    height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary span {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: transform 200ms ease, opacity 200ms ease;
  }

  .mobile-menu[open] summary span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu[open] summary span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu[open] summary span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: rgba(5, 7, 4, 0.95);
    font-size: clamp(1.25rem, 5vw, 1.75rem);
    font-weight: 600;
    animation: menu-in 180ms ease-out both;
  }

  .mobile-menu nav a:hover {
    color: var(--accent);
  }

  @keyframes menu-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 108px 16px 20px;
  }

  .hero-video {
    object-position: 51% center;
  }

  .hero-content {
    width: min(100%, 520px);
    gap: 14px;
  }

  .arma-logo {
    width: min(100%, 440px);
  }

  .community-widget {
    width: min(500px, calc(100vw - 32px));
  }

  .community-panel {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
  }

  .community-avatar {
    width: 56px;
    height: 56px;
  }

  .community-join {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-height: 700px) {
  .page-shell {
    min-height: 760px;
  }

  .hero-content {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
