:root {
  /* Halcyon Aces brand colors - Card theme */
  --halcyon-purple: #8B4789;
  --halcyon-lavender: #d4a5d4;
  --halcyon-blue: #0645ad;
  --halcyon-blue-visited: #0b0080;
  --wiki-bg: #ffffff;
  --wiki-text: #000000;
  --wiki-border: #a2a9b1;
  --wiki-sidebar-bg: #f6f6f6;
}

/* Override body background */
body {
  margin: 0;
  padding: 0;
  background: var(--wiki-bg);
  color: var(--wiki-text);
  font-family: sans-serif;
}

/* Remove all text shadows and glows */
* {
  text-shadow: none !important;
}

/* 3-Column Grid: Sidebar | Content | Gradient Bar */
.page-container {
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  min-height: 100vh;
  gap: 0;
}

/* LEFT SIDEBAR - Navigation */
.left-sidebar {
  background: var(--wiki-sidebar-bg);
  border-right: 1px solid var(--wiki-border);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.left-sidebar::-webkit-scrollbar {
  width: 6px;
}

.left-sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

.left-sidebar::-webkit-scrollbar-thumb {
  background: var(--wiki-border);
  border-radius: 3px;
}

.back-button {
  display: block;
  width: 100%;
  padding: 0.6rem;
  background: var(--halcyon-purple);
  color: white;
  text-decoration: none;
  text-align: center;
  border-radius: 3px;
  font-size: 0.9rem;
  font-weight: bold;
  transition: background 0.2s;
  margin-bottom: 1.5rem;
}

.back-button:hover {
  background: #6c3567;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--wiki-border);
}

.sidebar-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--wiki-text);
  margin-bottom: 0.25rem;
}

.sidebar-subtitle {
  font-size: 0.75rem;
  color: #54595d;
  margin: 0.25rem 0;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  padding: 0.3rem 0;
  color: var(--wiki-text);
  border-bottom: 1px solid var(--wiki-border);
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  margin: 0.25rem 0;
}

.nav-links a {
  display: block;
  color: var(--halcyon-blue);
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.nav-links a:hover {
  background: #e8e8e8;
  text-decoration: underline;
}

.nav-links a:visited {
  color: var(--halcyon-blue-visited);
}

.nav-links a.active {
  font-weight: bold;
  color: var(--wiki-text);
}

/* Nested navigation */
.nav-links ul {
  list-style: none;
  padding-left: 1rem;
  margin: 0.25rem 0;
}

.nav-links ul a {
  font-size: 0.85rem;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--wiki-border);
  margin: 1rem 0;
}

/* MAIN CONTENT */
.main-content {
  padding: 1.5rem 2rem;
  max-width: 1000px;
  background: white;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #54595d;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--halcyon-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  margin: 0 0.5rem;
}

.wiki-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--wiki-border);
}

.wiki-title {
  font-size: 2rem;
  font-weight: normal;
  color: var(--wiki-text);
  margin: 0 0 0.25rem 0;
  font-family: 'Linux Libertine', Georgia, Times, serif;
}

.wiki-subtitle {
  font-size: 0.9rem;
  color: #54595d;
  margin: 0;
  font-style: italic;
}

.wiki-article h2 {
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--wiki-text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--wiki-border);
  font-family: 'Linux Libertine', Georgia, Times, serif;
}

.wiki-article h3 {
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--wiki-text);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.wiki-article h4 {
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--wiki-text);
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.wiki-article p {
  line-height: 1.6;
  margin-bottom: 0.5rem;
  color: var(--wiki-text);
}

.wiki-article a {
  color: var(--halcyon-blue);
  text-decoration: none;
}

.wiki-article a:visited {
  color: var(--halcyon-blue-visited);
}

.wiki-article a:hover {
  text-decoration: underline;
}

.wiki-article ul, .wiki-article ol {
  margin-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.wiki-article strong {
  font-weight: 600;
}

.wiki-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  border: 1px solid var(--wiki-border);
}

.wiki-article th {
  background: #f8f9fa;
  border: 1px solid var(--wiki-border);
  padding: 0.5rem;
  text-align: left;
  font-weight: bold;
}

.wiki-article td {
  border: 1px solid var(--wiki-border);
  padding: 0.5rem;
}

.wiki-article tr:hover {
  background: #f8f9fa;
}

.wiki-infobox {
  background: #f8f9fa;
  border: 1px solid var(--wiki-border);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.wiki-infobox-warning {
  background: #fef6e7;
  border-left: 3px solid #fc3;
}

.wiki-infobox-card {
  background: #f5f0f6;
  border-left: 3px solid var(--halcyon-purple);
}

.wiki-infobox-title {
  font-weight: bold;
  color: var(--wiki-text);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.wiki-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.wiki-card {
  background: #f8f9fa;
  border: 1px solid var(--wiki-border);
  border-radius: 2px;
  padding: 1rem;
  text-decoration: none;
  transition: background 0.2s;
  display: block;
}

.wiki-card:hover {
  background: #eaecf0;
}

.wiki-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  color: var(--halcyon-purple);
  font-weight: bold;
}

.wiki-card p {
  font-size: 0.85rem;
  color: #54595d;
  margin: 0;
  line-height: 1.4;
}

.wiki-card-highlight {
  border: 2px solid var(--halcyon-purple);
  background: #f5f0f6;
}

/* Stat cards */
.stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-item {
  background: #f8f9fa;
  border: 1px solid var(--wiki-border);
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
}

.stat-item-icon {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.stat-item-name {
  font-weight: 600;
  color: var(--halcyon-purple);
  margin-bottom: 0.3rem;
}

.stat-item-desc {
  font-size: 0.9rem;
  color: #54595d;
}

/* Navigation arrows */
.nav-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--wiki-border);
}

.nav-footer a {
  color: var(--halcyon-blue);
  text-decoration: none;
  font-weight: 600;
}

.nav-footer a:hover {
  text-decoration: underline;
}

/* RIGHT GRADIENT BAR - Card suits theme */
.gradient-bar {
  background: linear-gradient(
    180deg,
    #8B4789 0%,
    #d4a5d4 25%,
    #a07ca0 50%,
    #d4a5d4 75%,
    #8B4789 100%
  );
  background-size: 100% 400%;
  animation: gradientFlow 20s ease infinite;
  position: sticky;
  top: 0;
  height: 100vh;
}

@keyframes gradientFlow {
  0% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* Mobile responsive */
@media (max-width: 900px) {
  .page-container {
    grid-template-columns: 1fr;
  }
  .left-sidebar, .gradient-bar {
    display: none;
  }
  .main-content {
    padding: 1rem;
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
