/* ==========================================================================
   LORD OF THE MYSTERIES WIKI - GLOBAL DESIGN SYSTEM & STYLESHEET (style.css)
   Victorian Steampunk / Parchment Theme Specification
   ========================================================================== */

/* 1. DESIGN TOKENS & CSS VARIABLES */
:root {
  /* Victorian Steampunk / Parchment Color Palette */
  --bg-parchment: #F4ECD8;
  /* Antique Parchment Background */
  --text-charcoal: #2D2419;
  /* Deep Vintage Charcoal Brown Body Text */
  --text-dark-gold: #C5A059;
  /* Refined Dark-Gold Typography */
  --text-bright-gold: #E5C17C;
  /* Bright Gold Accent */
  --bg-header: #5A1616;
  /* Victorian Crimson / Dark Red Header */
  --bg-footer: #121212;
  /* Pitch Black Footer */
  --bg-hero-base: #909090;
  /* Hero Console Deep Mineral Gray Base */
  --text-hero-dark: #151817;
  /* High-Contrast Charcoal for Hero Console */

  /* Auxiliary & Accent Palette */
  --ink-card: #1c2d28;
  --ink-2: #162420;
  --parchment-dim: #5c5040;
  --verdigris: #3f6b58;
  --verdigris-glow: rgba(63, 107, 88, 0.3);
  --brass: #b08d57;
  --brass-glow: rgba(176, 141, 87, 0.3);
  --wax: #8c2727;
  --wax-dark: #3d0c0e;
  --fog: #8f8b7a;
  --line-light: rgba(45, 36, 25, 0.15);
  --line-dark: rgba(233, 226, 208, 0.14);
  --radius: 6px;
}

/* 2. RESET STYLES */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-parchment);
  color: var(--text-charcoal);
  font-family: 'EB Garamond', serif;
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography & Links */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  margin-top: 0;
}

a {
  color: #7a2e2e;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

.stamp-font {
  font-family: 'Special Elite', monospace;
  letter-spacing: 0.04em;
}

.display-font {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
}

::selection {
  background: var(--brass);
  color: #121212;
}

:focus-visible {
  outline: 2px solid var(--text-dark-gold);
  outline-offset: 3px;
}

/* 3. LAYOUT GRID & CONTAINERS */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Feedback & Guide Grid Sandwich Component */
.feedback-guide-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px;
  margin: 28px 0 24px;
  width: 100%;
}

.feedback-card,
.guide-card {
  background: #EAE2CF;
  border: 2px solid #5A1616;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 6px 16px rgba(90, 22, 22, 0.08);
}

.feedback-card h3,
.guide-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.65rem;
  color: #5A1616;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed rgba(90, 22, 22, 0.25);
  padding-bottom: 8px;
}

.feedback-card p {
  font-size: 1.02rem;
  color: var(--text-charcoal);
  margin: 0 0 16px;
  line-height: 1.6;
}

.guide-link {
  color: #5A1616;
  font-weight: 700;
  text-decoration: underline;
}

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

.date-badge {
  display: inline-block;
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  color: #5A1616;
  background: rgba(90, 22, 22, 0.1);
  border: 1px dashed #5A1616;
  padding: 6px 12px;
  border-radius: 4px;
  margin-top: 6px;
  font-weight: 600;
}

.guide-list {
  list-style: square;
  padding-left: 20px;
  margin: 0;
  color: var(--text-charcoal);
}

.guide-list li {
  font-size: 1rem;
  margin-bottom: 10px;
  line-height: 1.5;
}

.guide-list li:last-child {
  margin-bottom: 0;
}

/* Button Navigation Row */
.nav-buttons-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 0 36px !important;
  padding: 18px 24px !important;
  background: #EAE2CF !important;
  border: 2px solid #5A1616 !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

.nav-buttons-row a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: 'Special Elite', monospace !important;
  font-size: 13px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #5A1616 !important;
  background: #F4ECD8 !important;
  border: 1.5px solid #5A1616 !important;
  padding: 10px 18px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.2s ease !important;
}

.nav-buttons-row a:hover,
.nav-buttons-row a.active {
  background: #5A1616 !important;
  color: #FFF8EB !important;
  border-color: #C5A059 !important;
  box-shadow: 0 4px 12px rgba(90, 22, 22, 0.3) !important;
  transform: translateY(-1px) !important;
}

@media (max-width: 768px) {
  .feedback-guide-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 4. VICTORIAN CRIMSON GLOBAL HEADER (wiki / site wide) */
header.site-header {
  background: var(--bg-header);
  border-bottom: 2px solid var(--text-dark-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .disclaimer-banner {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  font-size: 13px;
  color: var(--text-dark-gold);
  text-align: center;
  padding: 6px 16px;
  letter-spacing: 0.03em;
}

.site-header .disclaimer-banner span {
  color: var(--text-bright-gold);
  font-weight: 600;
}

.site-header .header-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-header .brand-icon {
  width: 38px;
  height: 38px;
  background: radial-gradient(circle, #8c2727 0%, #3d0c0e 100%);
  border: 1px solid var(--text-dark-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
}

.site-header .brand-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #FFF8EB;
  line-height: 1.1;
  margin: 0;
}

.site-header .brand-title em {
  font-style: normal;
  color: var(--text-dark-gold);
}

.site-header .brand-sub {
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dark-gold);
  opacity: 0.85;
  text-transform: uppercase;
}

.site-header .nav-menu {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header .nav-menu a {
  color: var(--text-dark-gold);
  padding: 6px 12px;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.site-header .nav-menu a:hover,
.site-header .nav-menu a.active {
  color: #FFF8EB;
  background: rgba(197, 160, 89, 0.2);
  border-color: var(--text-dark-gold);
}

.site-header .nav-menu .btn-nav-highlight {
  border: 1px solid var(--text-dark-gold);
  color: #FFF8EB;
  background: rgba(90, 22, 22, 0.6);
}

.site-header .nav-menu .btn-nav-highlight:hover {
  background: var(--text-dark-gold);
  color: #5A1616;
}

/* 5. HERO CONSOLE CONTAINER (.hero-container) & SLOW FOG ANIMATION */
@keyframes deepOreFlow {
  0% {
    background-position: 0% 0%, 0% 0%, 100% 0%;
  }

  50% {
    background-position: 100% 100%, -50% 50%, 0% 100%;
  }

  100% {
    background-position: 0% 0%, 0% 0%, 100% 0%;
  }
}

.hero-container {
  /* 外层容器：从上到下从浅灰过渡到深灰 */
  background: linear-gradient(180deg, #60676A 0%, #363B3E 45%, #181B1C 100%);
  border: 1px solid var(--text-dark-gold);
  border-radius: var(--radius);
  margin: 32px 0 40px;
  padding: 40px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: #FFF8EB;
}

.hero-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--text-dark-gold), #8c2727, var(--text-dark-gold), transparent);
}

.hero-header {
  text-align: center;
  margin-bottom: 30px;
}

.hero-header .eyebrow {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-bright-gold);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-header h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  line-height: 1.1;
  margin: 0 0 14px;
  color: #FFF8EB;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-header h1 em {
  font-style: italic;
  color: var(--text-bright-gold);
}

.hero-header p.lede {
  max-width: 760px;
  margin: 0 auto;
  color: #E6DFD1;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  font-weight: 400;
}

/* 里面的小容器：深绿（Rich Deep Emerald Green #122B22） */
.console-card,
.Simulator-card {
  background: #122B22;
  border: 1px solid var(--text-dark-gold);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.form-group label,
.hero-container label {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dark-gold);
  font-weight: 700;
  text-transform: uppercase;
}

.form-control {
  background: #162420;
  border: 1px solid rgba(197, 160, 89, 0.4);
  color: #FFF8EB;
  padding: 12px 14px;
  border-radius: 4px;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--text-bright-gold);
  box-shadow: 0 0 10px rgba(197, 160, 89, 0.3);
  outline: none;
}

.form-control optgroup {
  background: #162420;
  color: var(--text-dark-gold);
}

.form-control option {
  background: #162420;
  color: #FFF8EB;
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.range-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--text-dark-gold);
  cursor: pointer;
}

.range-val {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  color: var(--text-bright-gold);
  font-weight: 700;
  letter-spacing: 0.05em;
  min-width: 130px;
}

.checkbox-group {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  border: 1px dashed rgba(197, 160, 89, 0.4);
  border-radius: 4px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--text-dark-gold);
  cursor: pointer;
}

.checkbox-group span {
  font-size: 0.98rem;
  color: rgba(233, 226, 208, 0.85);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.output-section {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 4px;
  padding: 20px;
  text-align: left;
}

.progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  transition: width 0.4s ease, background 0.4s ease;
}

.risk-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #5A1616;
  margin-bottom: 6px;
}

.risk-desc {
  font-size: 1rem;
  color: var(--text-hero-dark);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* 6. SETTINGS EXPLORER & DIRECTORY LAYOUT */
.explorer-section {
  margin: 40px 0 60px;
  padding-top: 20px;
}

.section-header {
  text-align: left;
  margin-bottom: 24px;
}

.section-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  color: #5A1616;
  margin: 0 0 8px;
}

.explorer-layout {
  display: grid;
  grid-template-columns: 240px 1fr 420px;
  gap: 24px;
  align-items: start;
}

.explorer-tabs {
  background: #EAE2CF;
  border: 1px solid #C5A059;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 90px;
}

.tab-group-title {
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #5A1616;
  text-transform: uppercase;
  font-weight: 700;
  margin: 12px 8px 4px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 12px 14px;
  color: var(--text-charcoal);
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(90, 22, 22, 0.08);
}

.tab-btn.active {
  background: #5A1616;
  border-color: #C5A059;
  color: #FFF8EB;
  font-weight: 600;
}

.tab-btn.active .tab-badge {
  background: rgba(197, 160, 89, 0.3);
  color: #E5C17C;
}

.tab-badge {
  font-family: 'Special Elite', monospace;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
  color: #5A1616;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.grid-card {
  background: #EAE2CF;
  border: 1px solid rgba(90, 22, 22, 0.2);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.grid-card:hover {
  border-color: #5A1616;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.grid-card.active {
  border-color: #5A1616;
  box-shadow: 0 0 15px rgba(90, 22, 22, 0.2);
  background: #E4D9C0;
}

.grid-card.hidden {
  display: none !important;
}

.card-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #5A1616;
  font-family: 'Special Elite', monospace;
  margin-bottom: 8px;
}

.card-title-zh {
  font-size: 1.3rem;
  font-family: 'Cormorant Garamond', serif;
  color: #2D2419;
  margin: 0 0 4px;
}

.card-title-en {
  font-size: 0.85rem;
  color: #5c5040;
  margin-bottom: 10px;
}

.card-snippet {
  font-size: 0.95rem;
  color: #3d3326;
  margin: 0 0 12px;
}

.card-footer {
  font-size: 0.85rem;
  color: #5A1616;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.detail-panel {
  background: #EAE2CF;
  border: 2px solid #5A1616;
  border-radius: var(--radius);
  padding: 24px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}

.detail-article {
  display: none;
}

.detail-article.active {
  display: block;
}

.detail-header {
  border-bottom: 1px solid rgba(90, 22, 22, 0.2);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.detail-tag-row {
  display: flex;
  gap: 10px;
  font-family: 'Special Elite', monospace;
  font-size: 11px;
  color: #5A1616;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 2rem;
  color: #2D2419;
  margin: 0 0 4px;
}

.detail-subtitle {
  font-size: 1rem;
  color: #5c5040;
  margin-bottom: 12px;
}

.detail-meta-box {
  background: rgba(90, 22, 22, 0.06);
  border-left: 3px solid #5A1616;
  padding: 8px 12px;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.detail-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: #5A1616;
  font-weight: 700;
  margin: 20px 0 12px;
  border-bottom: 1px dashed rgba(90, 22, 22, 0.3);
  padding-bottom: 4px;
}

.seq-detail-card {
  background: #F4ECD8;
  border: 1px solid rgba(90, 22, 22, 0.2);
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 12px;
}

.seq-detail-card h4 {
  font-size: 1.15rem;
  color: #5A1616;
  margin: 0 0 8px;
}

.seq-detail-card p {
  font-size: 0.95rem;
  margin: 0 0 6px;
}

/* Directory Page Search Bar Component */
.directory-search-container {
  background: #EAE2CF;
  border: 2px solid #5A1616;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 36px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.directory-search-input {
  width: 100%;
  padding: 14px 18px;
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  background: #F8F4EA;
  border: 1px solid #7a7a7a;
  border-radius: 4px;
  color: #2D2419;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.directory-search-input:focus {
  outline: none;
  border-color: #5A1616;
  box-shadow: 0 0 10px rgba(90, 22, 22, 0.2);
}

.pathway-encyclopedia {
  margin-top: 40px;
}

.encyclopedia-article {
  background: #EAE2CF;
  border: 1px solid rgba(90, 22, 22, 0.2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.encyclopedia-article h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: #5A1616;
  margin-top: 0;
  border-bottom: 1px solid rgba(90, 22, 22, 0.2);
  padding-bottom: 8px;
}

/* 7. GLOBAL PITCH BLACK FOOTER */
footer.site-footer {
  background-color: var(--bg-footer);
  color: #A0A0A0;
  border-top: 3px solid #5A1616;
  padding: 50px 24px 40px;
  margin-top: 80px;
  font-size: 0.95rem;
}

.site-footer a {
  color: #D5C19A;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-bright-gold);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: #FFF8EB;
  margin: 0 0 10px;
}

.footer-col h4 {
  font-family: 'Special Elite', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dark-gold);
  text-transform: uppercase;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-bottom {
  max-width: 1240px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'Special Elite', monospace;
  font-size: 11px;
}

.footer-links-group {
  display: flex;
  gap: 16px;
}

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

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-header .header-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header .nav-menu {
    flex-wrap: wrap;
    gap: 8px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}