/* ==========================================================================
   Dark Cinematic Theme — Marvel Movie Energy
   Applies to all non-homepage pages (articles, tools, custom pages)
   Homepage has its own inline dark theme in home.hbs
   ========================================================================== */

/* --- Root overrides for dark theme --- */
:root {
  --color-white: #0F1629;
  --color-lighter-gray: rgba(59, 130, 246, 0.08);
  --color-light-gray: #1E293B;
  --color-mid-gray: #334155;
  --color-dark-gray: #CBD5E1;
  --color-darker-gray: #F1F5F9;
  --color-black: #F1F5F9;
  --color-primary-text: #F1F5F9;
  --color-secondary-text: #94A3B8;
  --color-border: rgba(59, 130, 246, 0.12);
  --color-dark-border: rgba(59, 130, 246, 0.25);

  /* Accent colors */
  --accent-blue: #3B82F6;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;
  --accent-danger: #EF4444;
}

/* Force light text mode */
:root.has-dark-text {
  --color-lighter-gray: rgba(59, 130, 246, 0.08);
  --color-darker-gray: #F1F5F9;
  --color-secondary-text: #94A3B8;
  --color-border: rgba(59, 130, 246, 0.12);
  --color-dark-border: rgba(59, 130, 246, 0.25);
}

/* --- Body --- */
body {
  background: #0A0E1A !important;
  color: #F1F5F9 !important;
}

/* --- Navigation --- */
.gh-navigation {
  background: rgba(10, 14, 26, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(59, 130, 246, 0.1) !important;
}
.gh-navigation-logo {
  color: #F1F5F9 !important;
}
.gh-navigation-menu .nav a {
  color: #94A3B8 !important;
}
.gh-navigation-menu .nav a:hover {
  color: #F1F5F9 !important;
}

/* --- Footer --- */
.gh-footer {
  background: #0A0E1A !important;
  border-top: 1px solid rgba(59, 130, 246, 0.1) !important;
  color: #94A3B8 !important;
}
.gh-footer a {
  color: #94A3B8 !important;
}
.gh-footer a:hover {
  color: #F1F5F9 !important;
}

/* --- Cards --- */
.gh-card {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(59, 130, 246, 0.12) !important;
  backdrop-filter: blur(8px);
  border-radius: 12px;
}
.gh-card:hover {
  border-color: rgba(59, 130, 246, 0.25) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.08) !important;
}
.gh-card-title {
  color: #F1F5F9 !important;
}
.gh-card-excerpt {
  color: #94A3B8 !important;
}

/* --- Article Content --- */
.gh-content {
  color: #CBD5E1 !important;
}
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4,
.gh-content h5,
.gh-content h6 {
  color: #F1F5F9 !important;
}
.gh-content a {
  color: var(--accent-blue) !important;
}
.gh-content a:hover {
  color: #60A5FA !important;
}
.gh-content blockquote {
  border-left-color: var(--accent-blue) !important;
  color: #94A3B8 !important;
}
.gh-content code {
  background: rgba(59, 130, 246, 0.1) !important;
  color: var(--accent-blue) !important;
}
.gh-content pre {
  background: #141B2D !important;
  border: 1px solid rgba(59, 130, 246, 0.12) !important;
}
.gh-content pre code {
  color: #CBD5E1 !important;
}
.gh-content hr {
  border-color: rgba(59, 130, 246, 0.1) !important;
}
.gh-content table {
  color: #CBD5E1 !important;
}
.gh-content table th {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #94A3B8 !important;
  border-color: rgba(59, 130, 246, 0.12) !important;
}
.gh-content table td {
  border-color: rgba(59, 130, 246, 0.08) !important;
}
.gh-content table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.5) !important;
}

/* --- Post/Page Header --- */
.gh-article-title {
  color: #F1F5F9 !important;
}
.gh-article-excerpt {
  color: #94A3B8 !important;
}
.gh-article-meta {
  color: #64748B !important;
}

/* --- Tag pages --- */
.gh-tag-header {
  color: #F1F5F9 !important;
}

/* --- CTA sections --- */
.gh-cta {
  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

/* --- Buttons / CTAs --- */
.gh-btn {
  background: linear-gradient(135deg, #10B981, #059669) !important;
  color: #F1F5F9 !important;
  border: none !important;
}
.gh-btn:hover {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3) !important;
}

/* --- Sidebar --- */
.gh-sidebar {
  color: #94A3B8 !important;
}

/* --- Signup form --- */
.gh-subscribe-input {
  background: #141B2D !important;
  color: #F1F5F9 !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}
.gh-subscribe-input::placeholder {
  color: #64748B !important;
}

/* --- Pagination --- */
.gh-pagination a {
  color: #94A3B8 !important;
}
.gh-pagination a:hover {
  color: #F1F5F9 !important;
}

/* --- TOC --- */
.toc-list a {
  color: #94A3B8 !important;
}
.toc-list a:hover,
.toc-list a.is-active-link {
  color: var(--accent-blue) !important;
}

/* --- Search --- */
.gh-search {
  background: rgba(10, 14, 26, 0.95) !important;
}

/* --- Selection color --- */
::selection {
  background: rgba(59, 130, 246, 0.3);
  color: #F1F5F9;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0E1A; }
::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(59, 130, 246, 0.4); }

/* --- Ghost Accent Color Override --- */
.gh-navigation.has-accent-color,
.gh-footer.has-accent-color {
  --color-lighter-gray: rgba(59, 130, 246, 0.08);
  --color-darker-gray: #F1F5F9;
  --color-secondary-text: #94A3B8;
  --color-border: rgba(59, 130, 246, 0.12);
  --color-dark-border: rgba(59, 130, 246, 0.25);
}
