/* Copyright (c) 2026 Jericho Crosby (Chalwk). All rights reserved. */

:root {
  --bg: #0f172a;
  --bg-alt: #182235;
  --panel: #233044;
  --panel-2: #5a594d;
  --panel-3: #445066;
  --border: #0b1020;
  --border-soft: #8b6d3f;
  --text: #f8edd8;
  --text-muted: #d8c7a4;
  --heading: #fff8e8;
  --accent: #d3a256;
  --accent-2: #f8edd8;
  --accent-dark: #8b6d3f;
  --link: #9fd86b;
  --link-hover: #f5f0e8;
  --danger: #d97373;
  --discord: #7380ff;
  --shadow: 0 10px 24px rgba(17, 14, 21, 0.35);
  --shadow-strong: 0 14px 30px rgba(17, 14, 21, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --max-width: 1200px;
  --transition: 180ms ease;
  --gray-light: #cbd5e1;
  --primary: #1e88e5;
  --primary-dark: #1565c0;
  --darker: #0f172a;
  --radius: 8px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04), rgba(8, 12, 24, 0.22)),
    repeating-linear-gradient(45deg,
      rgba(211, 162, 86, 0.08) 0,
      rgba(211, 162, 86, 0.08) 2px,
      transparent 2px,
      transparent 8px);
  background-attachment: fixed;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  display: block;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition), transform var(--transition);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  font-family: "Cinzel", "Georgia", serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--heading);
  text-shadow: 1px 1px 0 rgba(8, 12, 24, 0.32);
}

p {
  margin-top: 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  background: #0f172a;
  border-bottom: 4px solid var(--accent);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05), var(--shadow);
  background: linear-gradient(180deg, #0f172a, #182235);
}

.header-top {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.logo-link:hover {
  color: inherit;
}

.header-logo {
  width: auto;
  height: 58px;
  filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.35));
  flex-shrink: 0;
}

.header-top h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  color: var(--heading);
  text-shadow: 2px 2px 0 #0d1320;
  white-space: nowrap;
}

.main-nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav ul li a {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  text-shadow: 1px 1px 0 #0d1320;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  transition: border-color var(--transition), color var(--transition),
    text-shadow var(--transition), transform var(--transition);
  white-space: nowrap;
}

.main-nav ul li a:hover {
  color: var(--heading);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px rgba(211, 162, 86, 0.45);
  transform: translateY(-1px);
}

.dropdown-toggle .fa-caret-down {
  margin-left: 0.3rem;
  transition: transform var(--transition);
}

.dropdown.open .dropdown-toggle .fa-caret-down {
  transform: rotate(180deg);
}

.main-nav .dropdown {
  position: relative;
}

.main-nav .dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  display: none;
  min-width: 200px;
  padding: 0.45rem 0;
  margin: 0;
  list-style: none;
  background: var(--panel-2);
  border: 3px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-strong);
  overflow: hidden;
}

.main-nav .dropdown.open .dropdown-menu {
  display: block;
}

.main-nav .dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  color: var(--heading);
  border-bottom: 1px solid rgba(8, 12, 24, 0.18);
  border-radius: 0;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), text-shadow var(--transition);
}

.main-nav .dropdown-menu li:last-child a {
  border-bottom: 0;
}

.main-nav .dropdown-menu li a:hover {
  color: #0b1020;
  background: var(--accent);
  text-shadow: none;
}

.nav-toggle {
  grid-column: 3;
  justify-self: end;
  display: none;
  padding: 0.3rem 0.6rem;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--heading);
  cursor: pointer;
  background: rgba(10, 16, 34, 0.45);
  border: 2px solid var(--accent);
  border-radius: 10px;
  transition: background var(--transition), transform var(--transition);
}

.nav-toggle:hover {
  background: rgba(10, 16, 34, 0.62);
  transform: translateY(-1px);
}

.nav-toggle button {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 768px) {
  .header {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: none;
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
  }

  .main-nav.show {
    display: flex;
  }

  .main-nav ul {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .main-nav ul li a {
    width: 100%;
    padding: 0.7rem 1rem;
    white-space: normal;
    border-bottom: 2px solid transparent;
  }

  .main-nav ul li a:hover {
    border-bottom-color: var(--accent);
    text-shadow: 0 0 8px rgba(211, 162, 86, 0.45);
  }

  .main-nav .dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 0.25rem;
    border: 0;
    border-left: 4px solid var(--accent);
    border-radius: 0;
    box-shadow: none;
    background: rgba(8, 12, 24, 0.15);
  }

  .main-nav .dropdown-menu li a {
    padding-left: 1.25rem;
  }

  .toc-content {
    padding: 0.5rem 1rem 0.75rem 1.5rem;
  }
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-content {
  margin-bottom: 2rem;
  padding: 2rem;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(8, 12, 24, 0.08)),
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 2px,
      transparent 2px,
      transparent 8px),
    linear-gradient(180deg, rgba(35, 48, 68, 0.98), rgba(24, 34, 53, 0.98));
  border: 4px solid rgba(139, 109, 63, 0.85);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 0 0 1px rgba(211, 162, 86, 0.35),
    0 18px 32px rgba(8, 12, 24, 0.35);
}

.page-content h1 {
  margin-bottom: 1.25rem;
  padding-bottom: 0.55rem;
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  color: var(--heading);
  border-bottom: 3px solid var(--accent);
}

.page-content h2 {
  margin-top: 1.75rem;
  color: var(--accent-2);
}

.page-content h3 {
  margin-top: 1.25rem;
}

.page-content p+p {
  margin-top: 1rem;
}

.page-content table {
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  background: rgba(8, 12, 24, 0.22);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.page-content th,
.page-content td {
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border-soft);
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.page-content th {
  color: var(--accent);
  background: rgba(8, 12, 24, 0.26);
}

.page-content td {
  color: var(--text);
}

.page-content code {
  padding: 0.12rem 0.38rem;
  font-size: 0.95em;
  color: var(--accent-2);
  background: #0b1020;
  border-radius: 5px;
}

.page-content img[src*="npc_shops"] {
  max-width: 500px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 20px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  margin-bottom: 2rem;
  padding: 2rem;
  text-align: center;
  border: 4px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)),
    repeating-linear-gradient(45deg,
      #d3a256 0,
      #d3a256 12px,
      #8b6d3f 12px,
      #8b6d3f 24px);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.06),
    0 18px 40px rgba(8, 12, 24, 0.42);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 2rem;
  border: 2px solid rgba(211, 162, 86, 0.65);
  border-radius: var(--radius-lg);
  background: rgba(10, 16, 34, 0.58);
  backdrop-filter: blur(4px);
}

.hero-content h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--heading);
  text-shadow: 3px 3px 0 #0d1320;
}

.hero-logo {
  max-height: 320px;
  width: auto;
  margin: 0 auto 1.2rem;
  filter: drop-shadow(2px 4px 6px rgba(10, 16, 34, 0.55));
  display: block;
}

.hero-content p {
  margin: 1rem 0 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--text);
  text-shadow: 1px 1px 0 rgba(8, 12, 24, 0.32);
}

.hero-subtitle {
  font-family: "Cinzel", "Georgia", serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 rgba(8, 12, 24, 0.32);
}

.hero-buttons .btn {
  margin: 0.35rem 0.5rem;
}

.toc-container {
  margin: 2rem 0 1.5rem 0;
  background: rgba(35, 48, 68, 0.55);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(2px);
}

.toc-details {
  background: transparent;
  border: none;
}

.toc-summary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: "Inter", "Segoe UI", sans-serif;
  cursor: pointer;
  background: rgba(211, 162, 86, 0.12);
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  transition: background 0.2s, color 0.2s;
  border-bottom: 1px solid rgba(139, 109, 63, 0.2);
}

.toc-summary::-webkit-details-marker {
  display: none;
}

.toc-summary::before {
  content: '▶';
  font-size: 0.75rem;
  display: inline-block;
  transition: transform 0.25s ease;
  color: var(--accent);
}

.toc-details[open] .toc-summary::before {
  transform: rotate(90deg);
}

.toc-summary:hover {
  background: rgba(211, 162, 86, 0.2);
  color: var(--accent-2);
}

.toc-summary i {
  color: var(--accent);
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
}

.toc-content {
  padding: 0.75rem 1.5rem 1.25rem 2rem;
  background: rgba(8, 12, 24, 0.15);
}

.toc-content ul {
  margin: 0.25rem 0;
  padding-left: 1.2rem;
  list-style: none;
}

.toc-content li {
  margin: 0.35rem 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

.toc-content a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.2s, color 0.2s, padding-left 0.2s;
  font-weight: 500;
  display: inline-block;
  padding: 0.1rem 0;
}

.toc-content a:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent);
  padding-left: 4px;
}

.toc-content ul ul {
  margin-left: 1rem;
  border-left: 2px solid rgba(211, 162, 86, 0.2);
  padding-left: 1rem;
}

.btn,
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.2rem;
  border: 3px solid var(--border);
  border-radius: 999px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition);
  text-shadow: none;
  color: #0b1020;
  background: var(--accent);
}

.btn:hover,
.btn-primary:hover {
  background: var(--accent-2);
  transform: scale(1.02);
  color: #0b1020;
  box-shadow: 0 0 14px rgba(211, 162, 86, 0.4);
}

.btn-secondary {
  background: #445066;
  color: var(--text-light);
  border-color: #0b1020;
}

.btn-secondary:hover {
  background: #5a6a8a;
  color: var(--text-light);
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(68, 80, 102, 0.4);
}

.btn-discord {
  background: var(--discord);
  color: #fff;
  border-color: #0b1020;
}

.btn-discord:hover {
  background: #5a67ff;
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(115, 128, 255, 0.4);
}

.btn-link {
  font-weight: 600;
  color: var(--accent-2);
  border-bottom: 2px solid var(--accent);
}

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

footer {
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.1)),
    repeating-linear-gradient(45deg,
      #182235 0,
      #182235 4px,
      #0f172a 4px,
      #0f172a 8px);
  border-top: 4px solid rgba(139, 109, 63, 0.75);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-copyright {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.social-share {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.social-icon {
  font-size: 1.5rem;
  color: #e3d3be;
  transition: color var(--transition), transform var(--transition), opacity var(--transition);
}

.social-icon:hover {
  color: var(--accent);
  transform: translateY(-2px) scale(1.1);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.6rem 1.2rem;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: #445066;
  color: var(--text-light);
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition), border-color var(--transition);
  text-shadow: none;
}

.tab-btn:hover {
  background: #5a6a8a;
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(68, 80, 102, 0.4);
}

.tab-btn.active {
  background: var(--accent);
  color: #0b1020;
  border-color: var(--border);
  box-shadow: 0 0 14px rgba(211, 162, 86, 0.4);
}

.tab-btn.active:hover {
  background: var(--accent-2);
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(211, 162, 86, 0.4);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.text-center {
  text-align: center;
}

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

.status-badge {
  padding: 4px 10px;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 0.62rem;
  line-height: 1;
}

.ban-header-section h1 {
  color: var(--accent);
  border-left-color: var(--accent);
}

.appeal-banner {
  background: rgba(211, 162, 86, 0.12);
  border-color: var(--accent);
}

.appeal-btn {
  color: #0b1020;
  background: var(--accent);
}

.appeal-btn:hover {
  background: #f8edd8;
}

.summary-card {
  background: var(--panel-2);
  border-color: var(--accent);
}

.controls-bar {
  background: rgba(8, 12, 24, 0.26);
}

.search-input {
  color: var(--heading);
  background: #0b1020;
  border-color: var(--accent);
}

.search-input::placeholder {
  color: rgba(234, 220, 196, 0.55);
}

.search-input:focus {
  border-color: var(--accent-2);
}

.ban-table th {
  color: var(--accent);
  background: #1c2740;
}

.ban-table td {
  border-bottom-color: rgba(8, 12, 24, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.features {
  margin: 3rem 0 2rem;
  text-align: center;
}

.features h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 2rem;
  color: var(--heading);
  text-shadow: 2px 2px 0 #0d1320;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 0 0.5rem;
}

.feature-item {
  padding: 1.5rem 1rem;
  background: rgba(35, 48, 68, 0.7);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  backdrop-filter: blur(2px);
}

.feature-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  border-color: var(--accent);
}

.feature-item i {
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: inline-block;
}

.feature-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0.5rem 0 0.3rem;
}

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

.quick-links {
  margin: 2.5rem 0;
  text-align: center;
}

.quick-links h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  margin-bottom: 1.5rem;
}

.link-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  background: var(--panel);
  border: 2px solid var(--border-soft);
  border-radius: 999px;
  font-weight: 600;
  color: var(--heading);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
}

.link-card:hover {
  background: var(--panel-2);
  border-color: var(--accent);
  transform: scale(1.04);
  color: var(--heading);
}

.link-card i {
  font-size: 1.2rem;
  color: var(--accent);
}

.cta {
  margin: 3rem 0 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(35, 48, 68, 0.6);
  border: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(2px);
}

.cta h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 0.5rem;
}

.cta p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.btn-vote {
  background: #f5b342;
  color: #0b1020;
  border-color: #0b1020;
}

.btn-vote:hover {
  background: #f7c35c;
  color: #0b1020;
  transform: scale(1.02);
  box-shadow: 0 0 14px rgba(245, 179, 66, 0.5);
}

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

  .link-cards {
    flex-direction: column;
    align-items: center;
  }

  .link-card {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .page-content table {
    font-size: 0.75rem;
  }

  .page-content th,
  .page-content td {
    padding: 0.4rem 0.3rem;
  }
}

.footer-disclaimer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(139, 109, 63, 0.3);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}