@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Noto+Sans+SC:wght@400;500;700&display=swap');

:root {
  --bg-dark: #090c14;
  --bg-card: #0f1420;
  --bg-card2: #131825;
  --green: #2563eb;
  --green-light: #4d8ef0;
  --green-bright: #80b4f8;
  --gold: #f0c040;
  --gold-light: #f5d060;
  --text: #ccd9f0;
  --text-dim: #7a96c4;
  --text-muted: #445a80;
  --border: #1e2d4a;
  --border-bright: #2a3f66;
  --red: #c0392b;
  --shadow: 0 4px 24px rgba(0,0,0,0.7);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-dark);
  color: var(--text);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== BACKGROUND PATTERN ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(255,255,255,0.012) 31px, rgba(255,255,255,0.012) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, rgba(255,255,255,0.012) 31px, rgba(255,255,255,0.012) 32px);
  pointer-events: none;
  z-index: 0;
}

/* ===== NAV ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--green-light);
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(77,142,240,0.4);
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green-light);
  background: rgba(37,99,235,0.12);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dim);
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 2rem 60px;
  background: linear-gradient(180deg, rgba(37,99,235,0.08) 0%, transparent 100%);
}

.hero-badge {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--green);
  border: 2px solid var(--green);
  padding: 6px 14px;
  border-radius: 3px;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--green); box-shadow: 0 0 0 rgba(37,99,235,0); }
  50% { border-color: var(--green-light); box-shadow: 0 0 16px rgba(37,99,235,0.3); }
}

.hero h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(18px, 4vw, 36px);
  color: var(--green-light);
  text-shadow: 0 0 30px rgba(77,142,240,0.5), 3px 3px 0 rgba(0,0,0,0.8);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

/* ===== SERVER ADDRESS CARD ===== */
.server-addr-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 2px solid var(--border-bright);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px rgba(37,99,235,0.1);
  margin-bottom: 1rem;
}

.server-addr-label {
  background: var(--green);
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  padding: 14px 16px;
  letter-spacing: 1px;
}

.server-addr-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--gold);
  padding: 14px 20px;
  letter-spacing: 1px;
  user-select: all;
}

.copy-btn {
  background: rgba(37,99,235,0.15);
  border: none;
  border-left: 2px solid var(--border);
  color: var(--green-light);
  cursor: pointer;
  padding: 14px 16px;
  font-size: 18px;
  transition: all 0.2s;
}

.copy-btn:hover { background: rgba(37,99,235,0.3); }
.copy-btn.copied { color: var(--gold); }

.copy-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* ===== MAIN CONTAINER ===== */
.container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ===== SECTION ===== */
.section {
  margin-bottom: 3rem;
}

.section-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--green-light);
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-bright), transparent);
}

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 1rem; }

/* ===== RULE LIST ===== */
.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
}

.rules-list li .rule-icon {
  flex-shrink: 0;
  font-size: 18px;
  margin-top: 1px;
}

.rules-list li.rule-ban { border-left: 3px solid var(--red); }
.rules-list li.rule-ok { border-left: 3px solid var(--green); }

/* ===== INFO GRID ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.info-item {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.info-item .info-icon { font-size: 28px; flex-shrink: 0; }

.info-item .info-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.info-item .info-val {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}

.info-item .info-val a {
  color: var(--green-light);
  text-decoration: none;
}

.info-item .info-val a:hover { text-decoration: underline; }

/* ===== DONATE BANNER ===== */
.donate-banner {
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(240,192,64,0.08));
  border: 1px solid rgba(240,192,64,0.25);
  border-radius: 10px;
  padding: 1.8rem 2rem;
  text-align: center;
}

.donate-banner p {
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  font-size: 15px;
}

.btn-group {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: 'Noto Sans SC', sans-serif;
}

.btn-primary {
  background: var(--gold);
  color: #1a1200;
}

.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(240,192,64,0.3); }

.btn-outline {
  background: transparent;
  color: var(--green-light);
  border: 2px solid var(--green);
}

.btn-outline:hover { background: rgba(37,99,235,0.15); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-bright);
}

.btn-ghost:hover { background: var(--bg-card2); color: var(--text); }

/* ===== QQ GROUP ===== */
.qq-banner {
  background: linear-gradient(135deg, rgba(20,80,200,0.12), rgba(20,80,200,0.04));
  border: 1px solid rgba(80,120,255,0.2);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.qq-banner .qq-icon { font-size: 36px; flex-shrink: 0; }

.qq-banner .qq-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.qq-banner .qq-info p { color: var(--text-dim); font-size: 14px; }

.qq-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #5b9eff;
  letter-spacing: 1px;
}

/* ===== DONATE PAGE ===== */
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.qr-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: transform 0.2s;
}

.qr-card:hover { transform: translateY(-4px); }

.qr-card img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
  margin: 0 auto 0.8rem;
}

.qr-card .qr-label {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  font-family: 'Noto Sans SC', sans-serif;
}

.qr-card.alipay .qr-label { color: #1677ff; }
.qr-card.qq .qr-label { color: #12b7f5; }
.qr-card.wechat .qr-label { color: #07c160; }

/* ===== SPONSORS PAGE ===== */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.sponsor-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1rem;
  text-align: center;
  transition: all 0.2s;
}

.sponsor-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(37,99,235,0.2);
}

.sponsor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.7rem;
  border: 2px solid var(--border-bright);
  object-fit: cover;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.sponsor-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.sponsor-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sponsor-amount {
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
}

.sponsor-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.loading-wrap {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.no-sponsors {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== HELP PAGE ===== */
.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cmd-item {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.2rem;
  align-items: start;
}

.cmd-item code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--green-light);
  background: rgba(37,99,235,0.12);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid rgba(37,99,235,0.2);
  grid-column: 1;
  align-self: center;
}

.cmd-desc {
  color: var(--text-dim);
  font-size: 14px;
  grid-column: 2;
  align-self: center;
}

.cmd-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(240,192,64,0.07);
  border: 1px solid rgba(240,192,64,0.15);
  border-radius: 4px;
  padding: 5px 10px;
  margin-top: 4px;
}

.cmd-note.warn {
  background: rgba(192,57,43,0.08);
  border-color: rgba(192,57,43,0.2);
  color: #e07060;
}

.step-list {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.step-list li {
  counter-increment: step;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem 0.9rem 1.2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border-left: 3px solid var(--green);
}

.step-list li::before {
  content: counter(step);
  flex-shrink: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--green-light);
  background: rgba(37,99,235,0.15);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-list li .step-text { font-size: 14px; color: var(--text-dim); padding-top: 4px; }

.step-list li code {
  font-family: 'Courier New', monospace;
  color: var(--green-light);
  background: rgba(37,99,235,0.12);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 13px;
}

/* ===== ALERT BOX ===== */
.alert {
  border-radius: 8px;
  padding: 1rem 1.2rem;
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 14px;
  margin-bottom: 1.2rem;
}

.alert-warn {
  background: rgba(240,192,64,0.08);
  border: 1px solid rgba(240,192,64,0.25);
  color: var(--gold-light);
}

.alert-info {
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.25);
  color: var(--green-bright);
}

.alert-danger {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.25);
  color: #e07060;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 2;
}

footer a { color: var(--text-dim); text-decoration: none; }
footer a:hover { color: var(--green-light); }

/* ===== GOAL PROGRESS BAR ===== */
.goal-wrap {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.6rem;
}

.goal-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.goal-label {
  font-size: 14px;
  color: var(--text-dim);
}

.goal-amount {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
}

.goal-bar-bg {
  background: var(--bg-dark);
  border-radius: 99px;
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.goal-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  transition: width 1s cubic-bezier(.4,0,.2,1);
  position: relative;
  min-width: 2px;
}

.goal-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(255,255,255,0.15));
  border-radius: 99px;
}

.goal-bar-fill.full {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.goal-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 12px;
  color: var(--text-muted);
}

.goal-percent {
  font-weight: 700;
  color: var(--green-light);
}

.goal-percent.full { color: #4ade80; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: rgba(10,14,10,0.98); border-bottom: 1px solid var(--border); padding: 1rem; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 1rem; border-radius: 4px; }
  .nav-hamburger { display: flex; }
  .hero { padding: 50px 1.2rem 40px; }
  .server-addr-wrap { flex-direction: column; width: 100%; }
  .server-addr-label { padding: 8px 16px; }
  .server-addr-text { font-size: 11px; }
  .qr-grid { grid-template-columns: 1fr 1fr; }
}
