/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Variables ── */
:root {
  --bg-primary: #0a0a0f;
  --bg-alt: #111118;
  --bg-card: #161620;
  --accent: #d4891c;
  --accent-glow: rgba(212, 137, 28, 0.5);
  --crimson: #c0392b;
  --green: #00ff41;
  --text: #e0e0e0;
  --text-muted: #888899;
  --border: #2a2a35;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', system-ui, sans-serif;
  --nav-bg: rgba(10, 10, 15, 0.95);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Scanlines overlay ── */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── Typography ── */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Section base ── */
.section {
  padding: 5rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.section.visible { opacity: 1; transform: translateY(0); }

.section-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 20%, var(--crimson) 50%, var(--accent) 80%, transparent 100%);
  opacity: 0.4;
  margin: 0 auto;
  box-shadow: 0 0 8px var(--accent-glow), 0 0 20px rgba(192, 57, 43, 0.2);
}

/* ── Buttons ── */
.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid var(--accent);
  text-decoration: none;
}

.btn-solid {
  background: var(--accent);
  color: #000;
}
.btn-solid:hover {
  background: #e6991e;
  text-decoration: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
}
.btn-outline:hover {
  background: rgba(212, 137, 28, 0.1);
  text-decoration: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-copy {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1.25rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-copy:hover {
  background: rgba(212, 137, 28, 0.1);
}
.btn-copy.copied {
  border-color: var(--green);
  color: var(--green);
}

.copy-inline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.2s ease;
}
.copy-inline:hover { background: rgba(212, 137, 28, 0.1); }
.copy-inline.copied { border-color: var(--green); color: var(--green); }

/* ── Server cards ── */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.server-card.live:hover {
  box-shadow: 0 0 25px var(--accent-glow);
  transform: translateY(-2px);
}
.server-card.coming-soon { opacity: 0.5; }
.server-card.offline { opacity: 0.5; }

.server-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.status-live { color: #2ecc71; }
.status-offline { color: var(--crimson); }
.status-unknown { color: var(--accent); }
.status-soon { color: var(--accent); }

.server-name {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.server-details {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.server-details span {
  display: block;
  margin-bottom: 0.2rem;
}
.server-details span:last-child {
  margin-bottom: 0;
}

/* ── Sticky nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
}
.nav-brand:hover { text-decoration: none; }

.nav-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--accent);
}

.nav-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* The in-list Discord link is mobile-only — the desktop nav already has
   the Join Discord button in .nav-right. The mobile media query below
   re-shows it inside the hamburger menu. */
.nav-discord-mobile {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-discord {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 1rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s ease;
}
.nav-discord:hover {
  background: #e6991e;
  text-decoration: none;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.status-dot.green { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, 0.5); }
.status-dot.yellow { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.status-dot.red { background: var(--crimson); box-shadow: 0 0 6px rgba(192, 57, 43, 0.5); }

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 5px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Connection steps ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  position: relative;
  padding-left: 4rem;
}

.step-number {
  position: absolute;
  left: 1.25rem;
  top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

.step-title {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.step-body {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.step-body code {
  font-family: var(--font-mono);
  background: rgba(0, 255, 65, 0.08);
  color: var(--green);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.step-body .note {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

/* ── Rules toggle ── */
.rules-toggle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s ease;
}
.rules-toggle:hover { border-color: var(--accent); }
.rules-toggle .arrow { transition: transform 0.3s ease; }
.rules-toggle.open .arrow { transform: rotate(180deg); }

.rules-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.rules-content.open { max-height: 300px; }

.rules-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 1.25rem 1.5rem;
  list-style: none;
}

.rules-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.rules-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* ── About ── */
.about-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 750px;
}
.about-text em {
  color: var(--text);
  font-style: normal;
}

/* ── Footer ── */
footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  text-align: center;
}

.footer-discord { margin-bottom: 1.5rem; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-prompt {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
  opacity: 0.4;
}

.footer-admin {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--border);
  text-decoration: none;
  opacity: 0.5;
  transition: color 0.2s ease;
}
.footer-admin:hover {
  color: var(--text-muted);
  text-decoration: none;
}

/* ── Section accent backgrounds (subtle gradient, no images) ── */
.bg-accent-conan {
  background: linear-gradient(135deg, #0e0a0a 0%, #1a1210 40%, #150e0c 70%, #0a0a0f 100%);
}
.bg-accent-dune {
  background: linear-gradient(135deg, #0a0a0f 0%, #14100a 40%, #1a150c 70%, #0a0a0f 100%);
}
.bg-accent-enshrouded {
  background: linear-gradient(135deg, #0a0a0f 0%, #0e1420 40%, #161428 70%, #0a0a0f 100%);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section { padding: 3rem 0; }
  .step { padding-left: 3.5rem; }

  /* Mobile nav */
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--nav-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: none;
  }

  .nav-discord { display: none; }
  .nav-links .nav-discord-mobile {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
  }
}

@media (max-width: 768px) {
  .server-grid { grid-template-columns: 1fr; }
  .btn-copy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  body::after { display: none; }
  #code-rain { display: none; }
}

/* ── Screenshot guide (shared across game pages) ── */
.screenshot-guide {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.screenshot-label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.screenshot-slot {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-primary);
}

.screenshot-slot img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
}

.screenshot-slot.placeholder img { display: none; }
.screenshot-slot.placeholder::before {
  content: 'Screenshot coming soon';
  display: block;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0.5;
}

.screenshot-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.screenshot-caption code {
  font-family: var(--font-mono);
  background: rgba(0, 255, 65, 0.08);
  color: var(--green);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .screenshot-grid { grid-template-columns: 1fr; }
}
