/* ============================================================
   lazuline.xyz — Purple Space Theme
   ============================================================ */

/* ---- Custom Properties ---- */
:root {
  --bg-deep: #0a0a14;
  --bg-card: #12122a;
  --bg-elevated: #1a1a3e;
  --accent: #7c3aed;
  --accent-glow: #a78bfa;
  --text-primary: #e2e0e7;
  --text-muted: #8b8b9e;
  --border: #2a2a4a;
  --radius: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-glow);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

/* ---- Particle Canvas ---- */
button {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Particle Canvas ---- */
canvas#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* ---- Sticky Nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-brand:hover {
  color: var(--accent-glow);
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

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

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ---- Layout Container ---- */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

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

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--accent-glow), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Split Hero (Home Page) ---- */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  text-align: left;
  padding: 3rem 1rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.hero-split .hero-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-split .hero-left h1 {
  margin-top: 0.75rem;
  font-size: 1.8rem;
}

.hero-split .hero-left p {
  text-align: center;
  margin-left: 0;
  margin-right: 0;
  max-width: 380px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-split .hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pfp {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

/* ---- Section Headers ---- */
.section-header {
  margin: 3rem 0 1.5rem;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* ---- Card Grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

/* ---- Card Component ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
}

.card h2,
.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.card-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: var(--bg-elevated);
}

.card-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-glow);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

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

/* ---- Two-Column Layout (Worlds Page) ---- */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 1.5rem;
  align-items: center;
}

.two-col-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

/* ---- Hosting Promo (Home Page) ---- */
.hosting-promo {
  text-align: left;
  margin: 4rem auto 0;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 520px;
}

.hosting-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hosting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
}

.hosting-content {
  min-width: 0;
}

.hosting-message {
  display: block;
  visibility: visible;
  opacity: 1;
  color: var(--text-primary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.hosting-message span {
  display: block;
}

.hosting-message strong {
  color: var(--accent-glow);
}

.hosting-link {
  display: inline-block;
  color: var(--accent-glow);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.hosting-link:hover {
  color: var(--accent);
}

.hosting-logo {
  width: 80px;
  height: auto;
  flex-shrink: 0;
  border-radius: 6px;
  display: block;
}

.hosting-logo-link {
  justify-self: end;
}

/* ---- Sponsor Sidebar ---- */
.sponsor-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}

.sponsor-sidebar p {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.sponsor-sidebar img {
  width: 100%;
  border-radius: 6px;
}

.sponsor-sidebar a {
  display: block;
  color: var(--accent-glow);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.sponsor-sidebar a:hover {
  color: var(--accent);
}

/* ---- Download Links ---- */
.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elevated);
  color: var(--accent-glow);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.dl-link:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-glow);
}

.dl-link.disabled {
  color: #554466;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ---- Worlds Page ---- */

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-glow);
  line-height: 1.1;
  text-align: center;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 320px;
  margin: 2rem auto 3rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Error Page (404) ---- */
.error-page {
  text-align: center;
  padding: 6rem 1rem;
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-glow), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.error-page h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.error-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.error-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent-glow);
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.error-link:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

/* ---- Quick-Links Row ---- */
.quick-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.quick-link {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  text-decoration: none;
  color: var(--text-primary);
  text-align: center;
  min-width: 180px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.quick-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
  color: var(--text-primary);
}

.quick-link .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
}

.quick-link .label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

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

.site-footer a {
  color: var(--accent-glow);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---- Changelogs ---- */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.changelog-entry {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}

.changelog-entry:hover {
  border-color: var(--accent);
}

.changelog-entry .modpack {
  font-weight: 600;
  color: var(--text-primary);
}

.changelog-entry .version {
  color: var(--accent-glow);
  font-size: 0.9rem;
}

/* ---- Changelog Detail Page ---- */
.changelog-content {
  max-width: 720px;
  margin: 0 auto;
}

.changelog-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  background: linear-gradient(135deg, var(--accent-glow), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.changelog-content .version-badge {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.changelog-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--accent-glow);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.changelog-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.changelog-content li {
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.changelog-content p {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.changelog-content a {
  color: var(--accent-glow);
  text-decoration: underline;
}

.changelog-content a:hover {
  color: var(--accent);
}

/* ---- Sponsor Bar (Home Page) ---- */
.sponsor-bar {
  text-align: center;
  margin: 3rem auto;
  padding: 1.5rem;
  max-width: 600px;
}

.sponsor-bar p {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.sponsor-bar a {
  display: inline-block;
}

.sponsor-bar img {
  max-width: 100%;
  border-radius: 6px;
}

/* ---- Worlds Page Extras ---- */
.world-card-icon {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.world-card-icon img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.world-card-icon h3 {
  margin-bottom: 0;
}

/* ---- Pagination (changelogs) ---- */
.pagination-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.pagination-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-glow);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  transition: background 0.2s, border-color 0.2s;
}

.pagination-nav a:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}

/* ---- Utility ---- */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

/* ---- Responsive: 700px Breakpoint ---- */
@media (max-width: 700px) {
  .site-nav {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
  }

  .nav-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .site-main {
    padding: 1.5rem 1rem 3rem;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero {
    padding: 2.5rem 0.5rem 2rem;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .two-col-cards {
    grid-template-columns: 1fr;
  }

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

  .card {
    padding: 1.25rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .quick-link {
    min-width: 140px;
    padding: 1rem 1.25rem;
  }

  .quick-links {
    gap: 0.75rem;
  }

  .changelog-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .sponsor-sidebar {
    max-width: 300px;
    margin: 0 auto;
  }
}
