/* ===== Variables ===== */
:root {
  --bg-dark: #0a0c0b;
  --bg-card: #121614;
  --bg-elevated: #1a1f1c;
  --accent: #c4a035;
  --accent-hover: #e0bc4a;
  --accent-dim: rgba(196, 160, 53, 0.15);
  --text: #e8ebe9;
  --text-muted: #8a9490;
  --border: rgba(255, 255, 255, 0.08);
  --danger: #8b3a3a;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
code { font-family: ui-monospace, monospace; font-size: 0.85em; background: var(--bg-elevated); padding: 0.15em 0.4em; border-radius: 4px; }
.container { width: min(1140px, 92vw); margin: 0 auto; }

/* Noise overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  background: rgba(10, 12, 11, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
}
.logo:hover .wordmark-i,
.logo:hover .wordmark-text { color: var(--accent-hover); }

/* Wordmark: i + dayz 统一 Bebas 字体 */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}
.wordmark-i,
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: inherit;
  text-transform: lowercase;
  color: var(--accent);
}
.wordmark-i {
  margin-right: -0.03em;
}
.logo .wordmark {
  font-size: 1.5rem;
}
.wordmark--hero {
  font-size: 1em;
}
.wordmark--sm {
  font-size: 1.2rem;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--accent);
  color: #0a0c0b;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0a0c0b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(196, 160, 53, 0.3);
}
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-block { width: 100%; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,11,0.4) 0%, var(--bg-dark) 100%),
    linear-gradient(90deg, var(--bg-dark) 0%, transparent 50%),
    url('../images/hero-bg.svg') center/cover no-repeat;
  z-index: -1;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(196,160,53,0.08) 0%, transparent 60%);
}
.hero-content { position: relative; }
/* Hero brand */
.hero-brand {
  margin-bottom: 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
}
.hero-brand .hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  font-family: var(--font-body);
}
.hero-wordmark-row {
  display: flex;
  align-items: flex-end;
}
.hero-title-sub {
  margin: 0.12em 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1em;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ===== Sections ===== */
.section { padding: 5rem 0; }
.section-header { margin-bottom: 3rem; }
.section-header.center { text-align: center; }
.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.03em;
}
.section-sub {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ===== About ===== */
.about { background: var(--bg-card); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-text p { margin-bottom: 1rem; color: var(--text-muted); }
.about-text strong { color: var(--text); }
.feature-list { list-style: none; margin-top: 2rem; }
.feature-list li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-icon { font-size: 1.5rem; flex-shrink: 0; }
.feature-list strong { display: block; margin-bottom: 0.25rem; }
.feature-list p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.about-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}
.about-card-img {
  width: 100%;
  height: 100%;
  background: var(--bg-elevated) center/cover no-repeat;
}
.about-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(transparent, rgba(10,12,11,0.95));
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ===== Server ===== */
.server-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}
.server-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  padding-right: 4rem;
}
.server-card.highlight {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.server-card-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}
.server-card-value {
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-all;
}
.server-card-value.mono { font-family: ui-monospace, monospace; color: var(--accent); }
.copy-btn {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.copy-btn.copied { border-color: #4a8b4a; color: #6bc46b; }
.server-rules h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}
.rule-item {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Gallery ===== */
.gallery { background: var(--bg-card); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 200px);
  gap: 0.75rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  margin: 0;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover figcaption { opacity: 1; }
.gallery-item.large { grid-column: span 2; grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img {
  max-height: 80vh;
  max-width: 90vw;
  border-radius: var(--radius);
  object-fit: contain;
}
.lightbox p { margin-top: 1rem; color: var(--text-muted); }
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { color: var(--accent); }

/* ===== Download ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: stretch;
}
.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color var(--transition), transform var(--transition);
}
.download-card .btn-block {
  margin-top: auto;
}
.download-card:hover {
  border-color: rgba(196, 160, 53, 0.3);
  transform: translateY(-4px);
}
.download-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  width: fit-content;
}
.download-badge.alt { color: var(--text-muted); background: var(--bg-elevated); }
.download-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.download-icon.cloud { background: rgba(74, 144, 217, 0.15); color: #6eb5ff; }
.download-icon.launcher { background: var(--accent-dim); color: var(--accent); }
.download-guide {
  margin-bottom: 1.25rem;
  flex-grow: 1;
}
.download-guide h4 {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
.download-steps--ordered {
  list-style: decimal;
  padding-left: 1.25rem;
}
.download-steps--ordered li {
  padding-left: 0.35rem;
}
.download-steps--ordered li::before {
  content: none;
}
.download-card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}
.download-card > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex-grow: 0;
}
.download-steps {
  list-style: none;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.download-steps li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.download-steps li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.download-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  opacity: 0.7;
}
.download-help {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}
.download-help h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.download-help > p { color: var(--text-muted); margin-bottom: 1rem; }
.help-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.help-link {
  padding: 0.6rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
}
.help-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Footer ===== */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.footer-brand-sub {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-item.large,
  .gallery-item.wide { grid-column: span 2; }
  .gallery-item { min-height: 180px; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 280px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-card);
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    border-left: 1px solid var(--border);
    transition: right var(--transition);
  }
  .nav-links.open { right: 0; }
  .hero-stats { flex-direction: column; gap: 1.5rem; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.large,
  .gallery-item.wide { grid-column: span 1; }
  .footer-inner { flex-direction: column; text-align: center; }
}
