:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-sidebar: #0d1322;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #00d2ff;
  --primary-hover: #3a7bd5;
  --accent: #8a2be2;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --green: #10b981;
  --blue: #3b82f6;
  --red: #ef4444;
  --purple: #a855f7;
  --gold: #f59e0b;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  background: rgba(13, 19, 34, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.3rem;
  cursor: pointer;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 1px;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
}

.wiki-tag {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  margin-left: 4px;
}

.nav-search {
  position: relative;
  width: 42%;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-search input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 99px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}

.nav-search input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.25);
}

.search-kbd {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Live Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #111728;
  border: 1px solid rgba(0, 210, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 210, 255, 0.15);
  max-height: 480px;
  overflow-y: auto;
  z-index: 10000;
  display: none;
  backdrop-filter: blur(12px);
}

.search-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-dropdown-header .esc-hint kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  font-size: 0.7rem;
}

.search-dropdown-footer {
  padding: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(0, 210, 255, 0.08);
  border-left: 3px solid var(--primary);
  padding-left: 13px;
}

.result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.result-body {
  flex: 1;
  min-width: 0;
}

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.result-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}

.result-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
  white-space: normal;
}

.result-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge-cmd {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.badge-item {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.badge-sec {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.search-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
}

.search-empty i {
  font-size: 2rem;
  color: #ffaa00;
  margin-bottom: 10px;
}

.search-empty p {
  font-size: 0.85rem;
  margin-top: 6px;
  color: var(--text-muted);
}

/* Neon Target Scroll Highlight Pulse */
@keyframes neonPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.8);
    background-color: rgba(0, 210, 255, 0.18);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(0, 210, 255, 0);
    background-color: rgba(0, 210, 255, 0.1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 210, 255, 0);
    background-color: transparent;
  }
}

.search-highlight-pulse {
  animation: neonPulse 2s ease-out;
  border-radius: 6px;
}

mark {
  background: rgba(0, 210, 255, 0.3);
  color: #fff;
  padding: 1px 3px;
  border-radius: 3px;
}

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

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.map-btn {
  background: rgba(0, 210, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 210, 255, 0.3);
}

.map-btn:hover {
  background: rgba(0, 210, 255, 0.2);
  transform: translateY(-1px);
}

.server-ip-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.server-ip-box:hover {
  border-color: var(--primary);
  background: rgba(0, 210, 255, 0.06);
}

.ip-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ip-text {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--primary);
}

/* Layout */
.layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 290px;
  height: calc(100vh - 65px);
  position: sticky;
  top: 65px;
  padding: 1.5rem 1rem;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
}

.sidebar-search-box {
  display: none;
  position: relative;
  margin-bottom: 1.2rem;
}

.sidebar-search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sidebar-search-box input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.3rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
}

@media (max-width: 900px) {
  .sidebar-search-box {
    display: block;
  }
}

.sidebar-search-mobile {
  display: none;
  margin-bottom: 1rem;
}

.sidebar-search-mobile input {
  width: 100%;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
}

.sidebar-group {
  margin-bottom: 1.8rem;
}

.sidebar-heading {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  margin-bottom: 0.6rem;
  padding-left: 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--primary);
  background: rgba(0, 210, 255, 0.08);
}

.sidebar-link i {
  width: 16px;
  text-align: center;
}

/* Content */
.content {
  flex: 1;
  padding: 2.5rem 4rem;
  max-width: 960px;
}

.doc-section {
  margin-bottom: 4rem;
  scroll-margin-top: 85px;
}

.badge-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-tag.green { background: rgba(16, 185, 129, 0.12); color: var(--green); }
.badge-tag.blue { background: rgba(59, 130, 246, 0.12); color: var(--blue); }
.badge-tag.purple { background: rgba(168, 85, 247, 0.12); color: var(--purple); }
.badge-tag.red { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.badge-tag.gold { background: rgba(245, 158, 11, 0.12); color: var(--gold); }

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5rem 0 0.8rem 0;
}

h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  backdrop-filter: blur(8px);
}

.card-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.info-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-card ul {
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--primary);
  margin-top: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.code-box:hover {
  border-color: var(--primary);
  background: rgba(0, 210, 255, 0.05);
}

.link-box {
  text-decoration: none;
}

/* Callouts */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 10px;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.callout-tip {
  background: rgba(0, 210, 255, 0.08);
  border-left: 4px solid var(--primary);
  color: #cffafe;
}

.callout-tip i {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 2px;
}

/* Steps */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  position: relative;
}

.step-num {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
}

.step-card h4 {
  margin-bottom: 0.4rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.timeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.step-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.step-badge.green { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.step-badge.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.step-badge.red { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.step-badge.purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }

.timeline-step h3 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.timeline-step p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Styled List */
.styled-list {
  padding-left: 1.5rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.styled-list li {
  margin-bottom: 0.6rem;
}

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

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.doc-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.85rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.doc-table td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}

code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(0, 210, 255, 0.1);
  color: var(--primary);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Essences */
.essence-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
}

.essence-card.life { border-left: 4px solid var(--green); }
.essence-card.flame { border-left: 4px solid var(--red); }
.essence-card.void { border-left: 4px solid var(--purple); }
.essence-card.earth { border-left: 4px solid var(--gold); }

.essence-card h4 {
  margin-bottom: 0.6rem;
}

.essence-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

/* Crafting & Weapons */
.crafting-card, .weapon-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.4rem;
  margin-bottom: 1.2rem;
}

.craft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.craft-tag {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.recipe-text {
  margin-top: 0.8rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.88rem;
  border-left: 3px solid var(--primary);
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
  margin: 1.2rem 0;
}

.food-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
}

.food-item h4 {
  margin-bottom: 0.4rem;
}

.food-item p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

.food-buff {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(16, 185, 129, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.faq-item h4 {
  margin-bottom: 0.4rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: -290px;
    top: 65px;
    z-index: 99;
    transition: left 0.3s ease;
    box-shadow: 4px 0 16px rgba(0,0,0,0.5);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .sidebar-search-mobile {
    display: block;
  }

  .content {
    padding: 2rem 1.5rem;
  }

  .nav-search {
    display: none;
  }
}

/* Download Banner */
.download-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(0, 210, 255, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 1.8rem 2rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.download-banner-text h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.download-banner-text p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.pack-meta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pack-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #e2e8f0;
}

.download-banner-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 1rem 1.6rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

.download-banner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  filter: brightness(1.1);
}

.pack-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.pack-btn:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #10b981;
}
