:root {
  --background: #101117;
  --surface: #1a1b25;
  --surface-hover: #232533;
  --green: #54d985;
  --purple: #ad70ed;
  --text: #f0f1f5;
  --muted: #a8abb9;
  --border: #343543;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px max(24px, calc((100vw - 1150px) / 2));
  border-bottom: 1px solid var(--border);
  background: #15161e;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.brand strong {
  color: var(--green);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

nav a {
  color: var(--muted);
  font-weight: 500;
}

nav a:hover {
  color: var(--green);
}

.hero {
  text-align: center;
  padding: 75px 20px 65px;
  background:
    radial-gradient(ellipse at top, #293249 0%, transparent 65%);
}

.hero-logo {
  width: 145px;
  height: 145px;
  object-fit: contain;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin: 0 0 20px;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 650px;
  margin: auto;
}

.content {
  max-width: 1150px;
  margin: auto;
  padding: 40px 24px 90px;
}

.content h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.rule-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: transform .2s, border-color .2s, background .2s;
}

.rule-card:hover {
  transform: translateY(-4px);
  border-color: var(--purple);
  background: var(--surface-hover);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.rule-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.rule-card p {
  color: var(--muted);
  margin: 0 0 24px;
  flex: 1;
}

.rule-card span {
  color: var(--green);
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 25px 20px;
  color: var(--muted);
  font-size: .85rem;
}

footer p {
  margin: 5px;
}

@media (max-width: 700px) {
  .site-header {
    flex-direction: column;
    padding: 15px;
  }

  nav {
    justify-content: center;
    gap: 16px;
    font-size: .9rem;
  }

  .hero {
    padding: 50px 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .rule-card {
    padding: 24px;
  }
}

/* Minecraft Rules Pages */

.rules-content {
  max-width: 1000px;
}

.draft-notice {
  margin: 20px auto 0 !important;
  color: #e9c97a !important;
  font-size: .9rem !important;
}

.rules-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 55px;
}

.rules-nav strong {
  display: block;
  margin-bottom: 15px;
}

.rules-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.rules-links a {
  background: #292b39;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--green);
  font-size: .9rem;
}

.rules-links a:hover {
  border-color: var(--purple);
}

.rules-section {
  padding: 30px 0 45px;
  margin-bottom: 35px;
  border-bottom: 2px solid var(--border);
  scroll-margin-top: 30px;
}

.rules-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--green);
  margin: 0 0 8px;
}

.section-description {
  color: var(--muted);
  margin: 0 0 30px;
}

.rule {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 15px;
}

.rule h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.rule p {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 700px) {
  .rules-nav {
    padding: 18px;
  }

  .rule {
    padding: 18px;
  }
}

.text-link,
.rules-content a.text-link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--purple);
}

/* Smooth Page Transitions */

@media (prefers-reduced-motion: no-preference) {
  main {
    animation: page-enter 320ms ease-out both;
  }

  body.page-leaving main {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 220ms ease-in, transform 220ms ease-in;
    animation: none;
  }

  @keyframes page-enter {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Legal disclaimer */
.legal-disclaimer {
  max-width: 850px;
  margin: 20px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.6;
  text-align: center;
}
