/* Neoxene.io Wiki - Game Wiki Style Design */

:root {
  /* Rich color palette */
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-tertiary: #0f3460;
  --bg-card: #1a1a2e;
  --bg-sidebar: #16213e;

  /* Text colors */
  --text-primary: #eaeaea;
  --text-secondary: #a0a0a0;
  --text-muted: #707070;

  /* Accent colors */
  --accent-primary: #e94560;
  --accent-secondary: #533483;
  --accent-cyan: #00d9ff;
  --accent-green: #00ff88;
  --accent-gold: #ffd700;
  --accent-orange: #ff6b35;

  /* Border colors */
  --border-light: #2a2a4a;
  --border-medium: #3a3a5a;
  --border-accent: #e94560;

  /* Status colors */
  --status-draft: #ffaa00;
  --status-published: #00ff88;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #e94560 0%, #533483 100%);
  --gradient-card: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
  --gradient-hero: linear-gradient(180deg, rgba(233, 69, 96, 0.1) 0%, rgba(83, 52, 131, 0.05) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(233, 69, 96, 0.3);
}

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

body {
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== HEADER ==================== */
header {
  background: var(--bg-secondary);
  border-bottom: 3px solid var(--accent-primary);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: 3px;
  text-transform: uppercase;
  filter: drop-shadow(0 0 10px rgba(233, 69, 96, 0.5));
}

.main-nav {
  display: flex;
  gap: 5px;
}

.main-nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
}

.main-nav a:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
  background: var(--gradient-hero);
  padding: 40px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 30px;
}

.hero-section h1 {
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.hero-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* ==================== MAIN LAYOUT ==================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin-top: 20px;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.sidebar-panel {
  background: var(--bg-sidebar);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-panel-header {
  background: var(--gradient-primary);
  padding: 12px 15px;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-panel-body {
  padding: 15px;
}

.search-box input {
  width: 100%;
  padding: 12px 15px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(233, 69, 96, 0.3);
}

.search-box button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: var(--gradient-primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

.categories ul {
  list-style: none;
}

.categories li {
  margin-bottom: 2px;
}

.categories a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  transition: all 0.3s;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.categories a:hover,
.categories a.active {
  background: rgba(233, 69, 96, 0.1);
  color: var(--accent-primary);
  border-left-color: var(--accent-primary);
  padding-left: 15px;
}

.category-count {
  float: right;
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

/* ==================== PAGE GRID ==================== */
.content {
  min-height: 400px;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

.page-card {
  background: var(--gradient-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all 0.3s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.page-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s;
}

.page-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(233, 69, 96, 0.2);
  border-color: var(--accent-primary);
}

.page-card:hover::before {
  opacity: 1;
}

.page-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--accent-secondary) 100%);
  position: relative;
}

.page-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(26, 26, 46, 0.9));
}

.page-card-content {
  padding: 20px;
}

.page-card-category {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.page-card-title {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.page-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.page-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-light);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==================== SINGLE PAGE ==================== */
.single-page {
  background: var(--gradient-card);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 25px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s;
}

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

.breadcrumbs separator {
  color: var(--text-muted);
}

.single-page h1 {
  font-size: 2.8rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  font-weight: 900;
}

.single-page .meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 2px solid var(--border-light);
  font-size: 0.9rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-label {
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.meta-value a {
  color: var(--accent-primary);
  text-decoration: none;
}

.meta-value a:hover {
  text-decoration: underline;
}

.single-page .content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.single-page h2 {
  color: var(--accent-primary);
  margin-top: 50px;
  margin-bottom: 20px;
  font-size: 2rem;
  font-weight: 800;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-primary);
}

.single-page h3 {
  color: var(--accent-cyan);
  margin-top: 35px;
  margin-bottom: 15px;
  font-size: 1.5rem;
  font-weight: 700;
}

.single-page p {
  margin-bottom: 20px;
}

.single-page ul,
.single-page ol {
  margin-left: 30px;
  margin-bottom: 25px;
}

.single-page li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.single-page ul li {
  list-style-type: none;
  position: relative;
  padding-left: 25px;
}

.single-page ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-size: 1.2rem;
}

.single-page a {
  color: var(--accent-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s;
}

.single-page a:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.single-page img {
  max-width: 100%;
  border-radius: 12px;
  margin: 25px 0;
  box-shadow: var(--shadow-md);
}

.single-page figure.wiki-image {
  margin: 35px 0;
  text-align: center;
}

.single-page figure.wiki-image img {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--border-light);
}

.single-page figure.wiki-image figcaption {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 15px;
  font-style: italic;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.single-page hr {
  border: none;
  border-top: 2px solid var(--border-light);
  margin: 50px 0;
  position: relative;
}

.single-page hr::after {
  content: '◆';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  padding: 0 15px;
  color: var(--accent-primary);
}

/* ==================== SEARCH RESULTS ==================== */
.search-results {
  margin-top: 30px;
}

.search-results h2 {
  color: var(--accent-primary);
  margin-bottom: 25px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-results h2::before {
  content: '🔍';
  font-size: 1.5rem;
}

.search-result-item {
  background: var(--gradient-card);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.search-result-item:hover {
  border-color: var(--accent-primary);
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.search-result-item h3 {
  color: var(--accent-primary);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.search-result-item p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.search-result-item .category-badge {
  display: inline-block;
  background: var(--bg-tertiary);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  color: var(--accent-cyan);
}

/* ==================== LOADING & STATES ==================== */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 15px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

/* ==================== FOOTER ==================== */
footer {
  margin-top: 80px;
  padding: 40px 20px;
  border-top: 2px solid var(--border-light);
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

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

.footer-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: white !important;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  margin-top: 15px;
  transition: all 0.3s;
}

.footer-discord:hover {
  background: #4752C4;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .page-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

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

  .single-page {
    padding: 30px 25px;
  }

  .single-page h1 {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

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

  .logo a {
    font-size: 1.5rem;
  }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-card {
  animation: fadeInUp 0.5s ease-out;
}

.page-card:nth-child(1) { animation-delay: 0.1s; }
.page-card:nth-child(2) { animation-delay: 0.2s; }
.page-card:nth-child(3) { animation-delay: 0.3s; }
.page-card:nth-child(4) { animation-delay: 0.4s; }
.page-card:nth-child(5) { animation-delay: 0.5s; }
.page-card:nth-child(6) { animation-delay: 0.6s; }

/* ==================== SPECIAL WIKI TABLES ==================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table th {
  background: var(--gradient-primary);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-light);
}

table tr:last-child td {
  border-bottom: none;
}

table tr:hover {
  background: rgba(233, 69, 96, 0.05);
}

table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* Info boxes for game stats */
.infobox {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-primary);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0;
  box-shadow: var(--shadow-md);
}

.infobox-title {
  background: var(--gradient-primary);
  color: white;
  padding: 10px 15px;
  margin: -20px -20px 20px -20px;
  border-radius: 10px 10px 0 0;
  font-weight: 700;
  font-size: 1.1rem;
}

.infobox-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.infobox-row:last-child {
  border-bottom: none;
}

.infobox-label {
  font-weight: 600;
  color: var(--accent-cyan);
}
