/* HyperBlocks SMP - Minecraft server website theme */
:root {
  --bg-dark: #0f0f17;
  --bg-card: #16162a;
  --bg-card-hover: #1e1e35;
  --accent: #22c55e;
  --accent-dim: #16a34a;
  --accent-glow: rgba(34, 197, 94, 0.25);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #2d2d44;
  --font-display: 'Segoe UI', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.server-address {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-logo-img {
  height: 40px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.site-logo:hover .site-logo-img {
  opacity: 0.92;
}

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

.nav-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--bg-card);
}

.nav-links a.active {
  color: var(--accent);
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #0f0f17;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-store:hover {
  background: #4ade80;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* Main content */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem 4rem;
}

.hero-with-bg {
  position: relative;
  border-radius: 16px;
  margin: 0 -0.5rem 2rem;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 40%, #0f172a 100%);
  border: 1px solid var(--border);
}

.hero-with-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background-image: 
    linear-gradient(rgba(34, 197, 94, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-with-bg h1,
.hero-with-bg .tagline,
.hero-with-bg .hero-note,
.hero-with-bg .btn-store {
  position: relative;
  z-index: 1;
}

.hero-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent), #4ade80);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero .btn-store {
  font-size: 1.1rem;
  padding: 0.85rem 1.75rem;
}

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

.section h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.section p, .section ul {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.section ul {
  padding-left: 1.5rem;
}

.section li {
  margin-bottom: 0.5rem;
}

/* Cards (ranks) */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.rank-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.rank-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-dim);
}

.rank-card h3 {
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.rank-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Rules page */
.rules-list {
  list-style: none;
  padding: 0;
}

.rules-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.rules-list .rule-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--bg-dark);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.rules-list strong {
  color: var(--text);
}

.rules-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem;
  font-weight: 600;
}

.rules-sublist {
  list-style: disc;
  padding-left: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.rules-sublist li {
  margin-bottom: 0.5rem;
}

.rules-bottom {
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.5rem;
}

.rules-official {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
}

/* CTA strip */
.cta-strip {
  text-align: center;
  padding: 2.5rem 1rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.cta-strip p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Page title */
.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.page-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
/* ========== Wiki page: sidebar + content ========== */
.wiki-main {
  display: flex;
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  align-items: flex-start;
}

.wiki-sidebar {
  flex-shrink: 0;
  width: 220px;
  position: sticky;
  top: 5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.wiki-sidebar-title {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.wiki-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wiki-nav > ul > li {
  margin-bottom: 0.5rem;
}

.wiki-nav > ul > li > a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.wiki-nav > ul > li > a:hover {
  color: var(--accent);
  background: var(--bg-card-hover);
}

.wiki-nav > ul > li > ul {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

.wiki-nav > ul > li > ul li {
  margin-bottom: 0.2rem;
}

.wiki-nav > ul > li > ul a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.wiki-nav > ul > li > ul a:hover {
  color: var(--accent);
  background: var(--bg-card-hover);
}

.wiki-content {
  flex: 1;
  min-width: 0;
}

.wiki-content .page-title {
  margin-bottom: 0.5rem;
}

.wiki-content .page-intro {
  margin-bottom: 2rem;
}

.wiki-section {
  margin-bottom: 2.5rem;
}

.wiki-section h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.wiki-section h3 {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.wiki-section p,
.wiki-section ul {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.wiki-section code {
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--accent);
  border: 1px solid var(--border);
}

.wiki-list {
  list-style: none;
  padding: 0;
}

.wiki-list li {
  margin-bottom: 0.75rem;
  padding-left: 1rem;
  position: relative;
  color: var(--text-muted);
}

.wiki-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.wiki-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.wiki-table th,
.wiki-table td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.wiki-table th {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}

.wiki-table tr:last-child td {
  border-bottom: none;
}

.wiki-table tr:hover td {
  background: rgba(34, 197, 94, 0.05);
}

.wiki-table code {
  background: var(--bg-dark);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .wiki-main {
    flex-direction: column;
    padding: 1.5rem 1rem 3rem;
  }

  .wiki-sidebar {
    position: static;
    width: 100%;
  }

  .wiki-nav > ul > li > ul {
    margin-bottom: 0.5rem;
  }
}
