:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #101726;
  --bg-card: rgba(18, 26, 44, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-gold: rgba(255, 193, 7, 0.35);
  
  --color-gold: #ffc107;
  --color-gold-glow: rgba(255, 193, 7, 0.6);
  --color-teal: #00e5ff;
  --color-coral: #ff5252;
  --color-green: #00e676;
  --color-purple: #b388ff;
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at 10% 20%, #0d1b2a 0%, #080d16 100%);
  color: var(--text-main);
  font-family: var(--font-heading);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Glassmorphism scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal);
}

/* Header & Brand Banner */
.wiki-header {
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.98) 0%, rgba(10, 14, 23, 0.85) 100%);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  height: 48px;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.4));
  transition: transform 0.3s ease;
}
.brand-logo:hover {
  transform: scale(1.05) rotate(-2deg);
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #fff 0%, var(--color-teal) 50%, var(--color-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.search-box-container {
  flex: 1;
  max-width: 480px;
  margin: 0 2rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  transition: all 0.25s ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
  background: rgba(15, 23, 42, 1);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 180, 216, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
}

.btn-gold {
  background: linear-gradient(135deg, #ffb703 0%, #fb8500 100%);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(251, 133, 0, 0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 133, 0, 0.5);
}

.btn-glass {
  background: var(--bg-glass);
  border-color: var(--border-glass);
  color: var(--text-main);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Main Layout Grid */
.layout-container {
  display: grid;
  grid-template-columns: 450px 1fr;
  flex: 1;
  position: relative;
}

/* Sidebar navigation */
.wiki-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-glass);
  padding: 1.5rem 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 72px);
  position: sticky;
  top: 72px;
}

.sidebar-category {
  margin-bottom: 1.75rem;
}

.category-title {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  padding-left: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.nav-item:hover {
  background: var(--bg-glass);
  color: var(--color-teal);
  transform: translateX(4px);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.15) 0%, transparent 100%);
  color: var(--color-teal);
  border-left: 3px solid var(--color-teal);
  font-weight: 600;
}

.nav-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.nav-badge.boss {
  background: rgba(255, 193, 7, 0.2);
  color: var(--color-gold);
  border: 1px solid var(--border-gold);
}

/* Content Area */
.wiki-content-pane {
  padding: 2rem 3rem;
  max-width: 1300px;
}

/* Interactive Top Tabs & Mode Switcher */
.content-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.article-headline {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.article-headline h2 {
  font-size: 2.2rem;
  font-family: var(--font-serif);
  color: #fff;
}
.status-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pill-verified {
  background: rgba(0, 230, 118, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.view-mode-toggles {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}
.toggle-btn {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.toggle-btn.active {
  background: var(--bg-card);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Article Grid Layout */
.article-body-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
}

/* Portable Infobox (Fandom-Authentic & Modernized) */
.portable-infobox {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  position: sticky;
  top: 100px;
}

.pi-title {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 1rem;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
  letter-spacing: 0.5px;
}

.pi-image-wrapper {
  padding: 1.25rem 1rem;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(10, 14, 23, 0.95) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.pi-image {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.7));
  transition: transform 0.3s ease;
}
.pi-image:hover {
  transform: scale(1.04);
}

.pi-group {
  padding: 0.5rem 1rem;
}
.pi-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-teal);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
  margin-bottom: 0.5rem;
}

.pi-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.pi-row:last-child {
  border-bottom: none;
}
.pi-label {
  color: var(--text-muted);
}
.pi-data {
  font-weight: 600;
  color: #fff;
  text-align: right;
}
.pi-data.highlight-hp {
  color: var(--color-coral);
  font-family: var(--font-mono);
}
.pi-data.highlight-gold {
  color: var(--color-gold);
  font-family: var(--font-mono);
}

/* Article Prose & Sections */
.article-prose {
  line-height: 1.7;
  font-size: 1.05rem;
}
.article-prose h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--color-teal);
  margin: 1.75rem 0 0.75rem 0;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.35rem;
}
.article-prose h4 {
  font-size: 1.15rem;
  color: #fff;
  margin: 1.25rem 0 0.5rem 0;
}
.article-prose p {
  margin-bottom: 1rem;
  color: #cbd5e1;
}
.article-prose ul, .article-prose ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: #cbd5e1;
}
.article-prose li {
  margin-bottom: 0.4rem;
}

.quote-box {
  background: rgba(0, 229, 255, 0.05);
  border-left: 4px solid var(--color-teal);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  margin: 1.25rem 0;
  color: #94a3b8;
}

/* Custom Wikitable */
.wikitable {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}
.wikitable th {
  background: #1e293b;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.85rem;
  color: var(--color-teal);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wikitable td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-glass);
  font-size: 0.9rem;
}
.wikitable tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Interactive Calculators & Simulators */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.tool-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radar-display {
  height: 180px;
  background: radial-gradient(circle at center, #062b3a 0%, #03141e 80%);
  border: 1px solid var(--color-teal);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
}
.radar-ring {
  position: absolute;
  border: 1px dashed rgba(0, 229, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
}
.signal-pip {
  width: 14px;
  height: 14px;
  background: var(--color-gold);
  border-radius: 50%;
  position: absolute;
  box-shadow: 0 0 16px var(--color-gold);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: all 0.1s ease;
}

/* Code / Wikitext Raw View */
.raw-code-container {
  background: #090d16;
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 600px;
  overflow-y: auto;
  position: relative;
}

.copy-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* Category footer tags */
.category-tags {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.tag-badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}
.tag-badge:hover {
  color: var(--color-teal);
  border-color: var(--color-teal);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .layout-container {
    grid-template-columns: 1fr;
  }
  .wiki-sidebar {
    display: none;
  }
  .article-body-grid {
    grid-template-columns: 1fr;
  }
  .portable-infobox {
    position: static;
    margin-bottom: 2rem;
  }
}

/* Interactive Cross-Article Links */
.wiki-link {
  color: var(--color-teal);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted rgba(0, 229, 255, 0.4);
  padding-bottom: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wiki-link:hover {
  color: #fff;
  border-bottom: 1px solid var(--color-teal);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.wiki-link.gold {
  color: var(--color-gold);
  border-bottom-color: rgba(255, 193, 7, 0.4);
}
.wiki-link.gold:hover {
  color: #fff;
  border-bottom-color: var(--color-gold);
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.7);
}

.wiki-link.coral {
  color: var(--color-coral);
  border-bottom-color: rgba(255, 82, 82, 0.4);
}
.wiki-link.coral:hover {
  color: #fff;
  border-bottom-color: var(--color-coral);
  text-shadow: 0 0 10px rgba(255, 82, 82, 0.7);
}

/* Enhanced Wiki Tables */
.wiki-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-glass);
}

.wiki-table th {
  background: rgba(30, 41, 59, 0.8);
  color: var(--color-gold);
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wiki-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: var(--text-main);
}

.wiki-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ===== Home page, category pages & sidebar overview ===== */
a.brand-wrapper {
  text-decoration: none;
  color: inherit;
}

.category-link {
  cursor: pointer;
  transition: color 0.2s ease;
}
.category-link:hover {
  color: var(--color-teal);
}

/* Sidebar overview */
.sidebar-overview {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.overview-home {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-main);
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.14) 0%, rgba(255, 193, 7, 0.1) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  transition: all 0.2s ease;
}
.overview-home:hover,
.overview-home.active {
  border-color: var(--color-teal);
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.2);
}
.overview-home-icon {
  font-size: 1.6rem;
}
.overview-home-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.overview-home-text strong {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.5px;
}
.overview-home-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.overview-home-go {
  color: var(--color-teal);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
.overview-home:hover .overview-home-go {
  transform: translateX(4px);
}

.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.overview-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 104px;
  padding: 0.8rem 0.85rem;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 20%, #111a2c) 0%, #0d1422 75%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.overview-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 22%, transparent);
}
.overview-tile.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.overview-art {
  position: absolute;
  right: -12px;
  bottom: -14px;
  width: 84px;
  height: 84px;
  object-fit: contain;
  opacity: 0.8;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.overview-tile:hover .overview-art {
  transform: rotate(-8deg) scale(1.1);
  opacity: 1;
}
.overview-icon {
  font-size: 1.35rem;
  line-height: 1;
}
.overview-name {
  position: relative;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #fff;
  max-width: 72%;
  margin-top: 0.25rem;
}
.overview-count {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-top: auto;
}

/* Home hero */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2.75rem 3rem;
  margin-bottom: 2.75rem;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(8, 13, 22, 0.95) 0%, rgba(8, 13, 22, 0) 32%),
    linear-gradient(100deg, rgba(8, 13, 22, 0.97) 0%, rgba(8, 13, 22, 0.85) 45%, rgba(8, 13, 22, 0.35) 100%),
    url("assets/shot_43.jpg") center bottom / cover;
  border: 1px solid var(--border-gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.home-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-gold);
}
.home-hero h2 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1.12;
  color: #fff;
  margin: 0.6rem 0 1rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.home-hero p {
  color: var(--text-main);
  opacity: 0.85;
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 580px;
}
.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.6rem 0;
}
.home-stat {
  min-width: 96px;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(6px);
}
.home-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--color-gold);
}
.home-stat span {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.home-hero-logo {
  width: 100%;
  max-width: 400px;
  justify-self: center;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.6));
  animation: home-float 6s ease-in-out infinite;
}
@keyframes home-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.home-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  margin: 0 0 1.25rem;
}
.home-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-gold), transparent);
}

/* Category cards */
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.75rem;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  background: linear-gradient(165deg, color-mix(in srgb, var(--accent) 16%, #121a2c) 0%, #0c1320 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.cat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--accent) 32%, transparent) 0%, transparent 60%);
  opacity: 0.7;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.cat-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cat-card:hover::before {
  opacity: 1;
}

.cat-card-art {
  position: relative;
  height: 150px;
}
.cat-cover {
  position: absolute;
  bottom: 0;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.35s ease;
}
.cat-cover-1 {
  left: 50%;
  width: 136px;
  height: 136px;
  transform: translateX(-50%);
  z-index: 2;
}
.cat-cover-2 {
  left: 12%;
  width: 96px;
  height: 96px;
  transform: rotate(-14deg);
  opacity: 0.85;
}
.cat-cover-3 {
  right: 12%;
  width: 96px;
  height: 96px;
  transform: rotate(14deg);
  opacity: 0.85;
}
.cat-card:hover .cat-cover-1 { transform: translateX(-50%) translateY(-6px) scale(1.06); }
.cat-card:hover .cat-cover-2 { transform: translateX(-10px) rotate(-22deg); }
.cat-card:hover .cat-cover-3 { transform: translateX(10px) rotate(22deg); }

.cat-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.5rem 1.4rem 1.3rem;
}
.cat-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.cat-card-icon {
  font-size: 1.4rem;
}
.cat-card-body p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0.45rem 0 0.9rem;
}
.cat-card-peek {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
  flex: 1;
  align-content: flex-start;
}
.cat-card-peek span {
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
}
.cat-card-peek .more {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.cat-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cat-card-count {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.cat-card-go {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--accent);
}
.cat-card-go b {
  display: inline-block;
  transition: transform 0.2s ease;
}
.cat-card:hover .cat-card-go b,
.featured-card:hover .cat-card-go b {
  transform: translateX(5px);
}

/* Featured article */
.featured-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  border-radius: 18px;
  text-decoration: none;
  color: var(--text-main);
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, #111a2c) 0%, #0c1320 60%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.featured-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--accent) 20%, transparent);
}
.featured-art {
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent) 0%, transparent 70%);
}
.featured-art img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.featured-body h4 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
  margin: 0.4rem 0 0.6rem;
}
.featured-body p {
  color: var(--text-main);
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 0.9rem;
}

/* Category page */
.cat-page-head {
  position: relative;
  padding: 1.75rem 2rem 1.9rem;
  margin-bottom: 1.25rem;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(115deg, color-mix(in srgb, var(--accent) 22%, #111a2c) 0%, #0c1320 65%);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.cat-crumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.cat-crumb:hover {
  color: var(--accent);
}
.cat-page-title {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.75rem 0 0.5rem;
}
.cat-page-icon {
  font-size: 2.4rem;
}
.cat-page-title h2 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: #fff;
}
.cat-page-head p {
  position: relative;
  z-index: 2;
  max-width: 55%;
  color: var(--text-main);
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.cat-page-art {
  position: absolute;
  right: 2rem;
  top: 0;
  bottom: 0;
  width: 340px;
  pointer-events: none;
}
.cat-page-art .cat-cover {
  bottom: 12px;
}
.cat-page-art .cat-cover-1 {
  width: 170px;
  height: 170px;
}
.cat-page-art .cat-cover-2,
.cat-page-art .cat-cover-3 {
  width: 115px;
  height: 115px;
}

.cat-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.cat-chip {
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: all 0.2s ease;
}
.cat-chip:hover {
  color: #fff;
  border-color: var(--accent);
}
.cat-chip.active {
  color: #fff;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 1.1rem;
  border-radius: 14px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.item-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 20%, transparent);
}
.item-art {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 70%);
}
.item-art img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.3s ease;
}
.item-card:hover .item-art img {
  transform: scale(1.08) rotate(-3deg);
}
.item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  margin: 0.6rem 0 0.45rem;
}

@media (max-width: 1024px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }
  .home-hero-logo {
    display: none;
  }
  .home-hero h2 {
    font-size: 2rem;
  }
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-art {
    max-width: 200px;
    margin: 0 auto;
  }
  .cat-page-art {
    display: none;
  }
  .cat-page-head p {
    max-width: none;
  }
}
