:root {
  --bg: #0d0d10;
  --bg-soft: #15151b;
  --bg-card: #1d1d24;
  --line: #2d2d36;
  --text: #f2f2f4;
  --text-soft: #9d9da7;
  --accent: #b71c1c;
  --accent-deep: #7f1212;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 13, 16, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
}
.logo-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.nav-links {
  display: flex;
  gap: 26px;
  color: var(--text-soft);
  font-size: 13px;
  letter-spacing: 1px;
}
.nav-links a:hover,
.nav-admin:hover { color: #fff; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-user {
  color: var(--text-soft);
  font-size: 12px;
  letter-spacing: 1px;
}
.nav-admin {
  padding: 10px 18px;
  border: 1px solid var(--accent);
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
}

.hero {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 15% 35%, rgba(183, 28, 28, 0.35), transparent 28%),
    radial-gradient(circle at 85% 65%, rgba(183, 28, 28, 0.18), transparent 22%),
    linear-gradient(135deg, #0b0b0e 0%, #171218 40%, #0c0c10 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}
.hero-tag {
  color: #ff6e6e;
  font-size: 12px;
  letter-spacing: 4px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 70px;
  line-height: 1;
  margin-bottom: 18px;
  letter-spacing: -2px;
}
.hero-subtitle {
  font-size: 22px;
  color: #d2d2d7;
  margin-bottom: 12px;
}
.hero-description {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 15px;
  margin-bottom: 30px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-main,
.btn-ghost {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 26px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
}
.btn-main {
  background: var(--accent);
  color: #fff;
}
.btn-main:hover {
  background: var(--accent-deep);
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: #fff;
}
.btn-block { width: 100%; }

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--accent);
}
.status-item {
  padding: 18px 14px;
  text-align: center;
  color: #fff;
}
.status-value {
  display: block;
  font-size: 28px;
  font-weight: 900;
}
.status-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.75;
}

.section { padding: 72px 24px; }
.section-dark { background: #111116; }
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-head {
  margin-bottom: 28px;
}
.section-head-left {
  margin-bottom: 20px;
}
.section-tag {
  color: #ff7b7b;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: 34px;
  margin-bottom: 8px;
}
.section-desc {
  color: var(--text-soft);
  font-size: 14px;
}

.notice-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.notice-item,
.game-card,
.community-box {
  border: 1px solid var(--line);
  background: var(--bg-card);
}
.notice-item {
  padding: 18px;
  color: var(--text-soft);
  min-height: 90px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.game-card {
  overflow: hidden;
}
.game-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(183, 28, 28, 0.35);
}
.game-cover {
  height: 180px;
  background: linear-gradient(135deg, #2a2a30, #101014);
  border-bottom: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}
.game-content {
  padding: 18px;
}
.game-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.game-icon {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  background: #101015;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  flex: 0 0 auto;
}
.game-heading {
  min-width: 0;
}
.game-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
  margin-bottom: 10px;
}
.game-title {
  font-size: 22px;
  margin-bottom: 6px;
}
.game-head .game-title {
  margin-bottom: 4px;
}
.game-subtitle,
.game-summary {
  color: var(--text-soft);
}
.game-summary {
  font-size: 13px;
  margin: 12px 0 16px;
  min-height: 42px;
}
.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.game-tags span {
  padding: 5px 10px;
  background: #141419;
  border: 1px solid #2c2c35;
  color: #c9c9d2;
  font-size: 12px;
}
.card-actions {
  display: flex;
  gap: 10px;
}
.card-actions a {
  flex: 1;
  text-align: center;
  padding: 11px 10px;
  font-size: 13px;
  font-weight: 700;
}
.action-primary {
  background: var(--accent);
  color: #fff;
}
.action-secondary {
  border: 1px solid var(--line);
  color: #fff;
}

.hidden { display: none; }
.single-action {
  flex: 1;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-mask.hidden {
  display: none !important;
}

.site-modal {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.site-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.site-modal-body {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.site-modal-body label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.site-modal-body input {
  width: 100%;
  border: 1px solid var(--line);
  background: #141419;
  color: var(--text);
  padding: 11px 12px;
}

.modal-close {
  border: 1px solid var(--line);
  background: transparent;
  color: #fff;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
}

.site-message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: #ffb0b0;
  background: rgba(183, 28, 28, 0.16);
  font-size: 13px;
}

.cdk-result-box {
  padding: 16px;
  border: 1px solid var(--line);
  background: #141419;
  color: var(--text-soft);
  line-height: 1.8;
  white-space: pre-wrap;
}

.community-box {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 26px 24px 40px;
  background: #09090c;
  color: var(--text-soft);
  font-size: 12px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

@media (max-width: 980px) {
  .status-strip,
  .notice-list,
  .game-grid {
    grid-template-columns: 1fr 1fr;
  }
  .community-box,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .nav-inner,
  .nav-links,
  .hero-actions,
  .status-strip,
  .notice-list,
  .game-grid {
    display: block;
  }
  .nav-links { display: none; }
  .nav-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 12px;
  }
  .hero h1 { font-size: 42px; }
  .hero-subtitle { font-size: 18px; }
  .status-item { border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
  .notice-item,
  .game-card {
    margin-bottom: 14px;
  }
}
