:root {
  --bg-color: #0a0a0c;
  --card-bg: #141419;
  --text-main: #d1d5db;
  --text-muted: #9ca3af;
  --accent: #8b5cf6;
  --accent-hover: #a78bfa;
  --border: #27272a;
  --font-title: 'Creepster', cursive;
  --font-body: 'Eczar', serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.7;
}

/* Header & Navigation Layout */
header {
  background-color: #050507;
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-title);
  font-size: 2.2rem;
  letter-spacing: 3px;
  color: #e0e7ff;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 135px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 1.1rem;
  transition: color 0.2s;
}

nav a:hover, 
nav a.active { 
  color: var(--accent); 
}

/* Main Container & Page Typography */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

h1 {
  font-family: var(--font-title);
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: #f3f4f6;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Home Page Specific Layouts */
.hero {
  text-align: center;
  padding: 4rem 1rem 3rem;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 1rem auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s, transform 0.2s;
}

.btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 4rem;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--accent);
}

.card h3 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.8rem;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

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

/* Article & Method Components */
.article-card,
.method-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  margin-bottom: 2rem;
  transition: border-color 0.2s;
}

.article-card:hover {
  border-color: var(--accent);
}

.meta {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.article-card h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1rem;
}

.article-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.read-more {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.read-more:hover {
  color: var(--accent-hover);
}

/* Team Grid Component */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.team-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s;
}

.team-card:hover { 
  border-color: var(--accent); 
}

.avatar-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
  background-color: #0e0e12;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card h3 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.role {
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.team-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Equipment / List Grid */
.kit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  margin-top: 1rem;
}

.kit-item {
  background: #0e0e12;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: 4px;
  color: var(--text-main);
  font-size: 0.95rem;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  border: 1px solid #27272a;
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
}

th {
  background-color: #141419;
  border-bottom: 2px solid #8b5cf6;
  color: #ffffff;
  font-weight: 600;
}

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

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Provider Badge Styling (Global) */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: bold;
}

.badge-hn { 
  background: rgba(59, 130, 246, 0.2) !important; 
  color: #60a5fa !important; 
  border: 1px solid rgba(59, 130, 246, 0.4) !important; 
}

.badge-ram { 
  background: rgba(239, 68, 68, 0.2) !important; 
  color: #f87171 !important; 
  border: 1px solid rgba(239, 68, 68, 0.4) !important; 
}

.badge-pabs {
  background: rgba(139, 92, 246, 0.25) !important;
  color: #c084fc !important;
  border: 1px solid rgba(139, 92, 246, 0.6) !important;
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.3) !important;
}

/* Evidence Status Badges (High-Contrast Spectral Theme) */
.badge-debunked {
  background-color: rgba(248, 113, 113, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.6) !important;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.2) !important;
}

.badge-paranormal {
  background-color: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3) !important;
}

/* Evidence Vault Filter Buttons */
.filters {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: #141419;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

/* Filter Specific Badge Outlines */
.filter-btn[data-filter="all"] {
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.15);
}

.filter-btn[data-filter="paranormal"] {
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.6);
  background: #141419;
}

.filter-btn[data-filter="debunked"] {
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.6);
  background: #141419;
}

/* Active / Hover States */
.filter-btn[data-filter="all"].active,
.filter-btn[data-filter="all"]:hover {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.filter-btn[data-filter="paranormal"].active,
.filter-btn[data-filter="paranormal"]:hover {
  background-color: rgba(245, 158, 11, 0.35);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.filter-btn[data-filter="debunked"].active,
.filter-btn[data-filter="debunked"]:hover {
  background-color: rgba(248, 113, 113, 0.35);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.4);
}

/* Video Markers & Video Badge Components */
.video-marker,
.marker-tag,
.video-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

/* Paranormal Video Marker (Gold) */
.marker-paranormal,
.video-badge.paranormal {
  background-color: rgba(245, 158, 11, 0.18) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.6) !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25) !important;
}

/* Debunked Video Marker (Crimson) */
.marker-debunked,
.video-badge.debunked {
  background-color: rgba(248, 113, 113, 0.18) !important;
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.6) !important;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.25) !important;
}

/* All / General Marker (Purple) */
.marker-all,
.video-badge.all {
  background-color: rgba(139, 92, 246, 0.2) !important;
  color: #c084fc !important;
  border: 1px solid rgba(139, 92, 246, 0.6) !important;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.25) !important;
}

/* Dynamic Markdown Reader Styling (#markdown-content) */
#markdown-content h1,
#markdown-content h2,
#markdown-content h3,
#markdown-content h4 {
  font-family: var(--font-title);
  color: #ffffff;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

#markdown-content h1 { font-size: 2.5rem; }
#markdown-content h2 { font-size: 2rem; }
#markdown-content h3 { font-size: 1.5rem; }
#markdown-content h4 { font-size: 1.2rem; }

#markdown-content p {
  color: var(--text-main);
  margin-bottom: 1.2rem;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Global Markdown & Article Image Scaling (Prevents Image Overflow) */
#markdown-content img,
.article-card img,
.card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

#markdown-content a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

#markdown-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

#markdown-content ul, 
#markdown-content ol {
  margin-left: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

#markdown-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

#markdown-content blockquote {
  border-left: 3px solid var(--accent);
  background: rgba(139, 92, 246, 0.05);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
  color: var(--text-muted);
  font-style: italic;
}

#markdown-content hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

#markdown-content code {
  background: #0e0e12;
  color: #c084fc;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

#markdown-content pre code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Footer Styling */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  margin-top: 4rem;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
    padding: 1rem;
  }

  .logo {
    flex-direction: column;
    gap: 0.5rem;
  }

  .logo-img {
    height: 75px;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }

  nav a {
    margin-left: 0;
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
  }
}

/* Brevo Newsletter Form Complete Dark Theme Overrides */
.newsletter-section {
  margin-top: 3rem;
}

.newsletter-section,
.sib-form,
.sib-form-container,
#sib-container,
#sib-container * {
  background-color: var(--card-bg) !important;
  background: var(--card-bg) !important;
  color: var(--text-main) !important;
}

#sib-container {
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 2.5rem !important;
  box-sizing: border-box !important;
}

/* Header Text / Creepster Styling inside Brevo */
#sib-container h1,
#sib-container h2,
#sib-container .sib-form-block__heading {
  font-family: var(--font-title) !important;
  color: #ffffff !important;
  font-size: 2.2rem !important;
}

#sib-container p,
#sib-container label,
#sib-container span {
  color: var(--text-muted) !important;
}

/* Input Fields */
#sib-container input[type="text"],
#sib-container input[type="email"] {
  background-color: #0e0e12 !important;
  background: #0e0e12 !important;
  border: 1px solid var(--border) !important;
  color: #ffffff !important;
  padding: 0.8rem 1rem !important;
  border-radius: 4px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#sib-container input::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.8 !important;
}

#sib-container input:focus {
  border-color: var(--accent) !important;
  outline: none !important;
}

/* Checkbox and Legal Disclaimer Text */
#sib-container input[type="checkbox"] {
  accent-color: var(--accent) !important;
}

#sib-container .sib-entry__error-msg,
#sib-container .sib-sms-tooltip {
  color: #f87171 !important;
}

/* Submit Button */
#sib-container .sib-form-block__button,
#sib-container button[type="submit"] {
  background-color: var(--accent) !important;
  background: var(--accent) !important;
  color: #ffffff !important;
  padding: 0.8rem 1.6rem !important;
  border-radius: 6px !important;
  border: none !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background-color 0.2s, transform 0.2s !important;
}

#sib-container .sib-form-block__button:hover,
#sib-container button[type="submit"]:hover {
  background-color: var(--accent-hover) !important;
  background: var(--accent-hover) !important;
  transform: translateY(-2px) !important;
}

/* ==========================================
   LINKS PAGE STYLES & SVG OVERRIDES
   ========================================== */

/* Enforce strict sizes on SVGs inside buttons/links so they don't blow up */
.link-card svg,
.links-list svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  flex-shrink: 0 !important;
  fill: currentColor !important;
  display: inline-block !important;
}

/* Container & Layout */
.links-wrapper {
  max-width: 500px;
  margin: 2rem auto;
  text-align: center;
  padding: 0 1rem;
}

.profile-card {
  background: rgba(20, 20, 25, 0.95);
  border: 1px solid #333;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
}

.avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid #6b21a8;
  box-shadow: 0 0 18px rgba(107, 33, 168, 0.6);
  object-fit: cover;
  margin: 0 auto 1rem auto;
  display: block;
}

.links-wrapper h1 {
  font-family: 'Creepster', cursive, sans-serif;
  font-size: 2.2rem;
  letter-spacing: 2px;
  margin-bottom: 0.25rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

.links-wrapper .subtitle {
  font-family: 'Eczar', serif;
  color: #9ca3af;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Link Cards / Buttons Override */
.link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0.9rem 1.25rem;
  background: #0e0e12;
  border: 1px solid #333;
  border-radius: 8px;
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: 'Eczar', serif;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.25s ease-in-out;
  box-sizing: border-box;
}

.link-card:hover {
  border-color: #a855f7;
  background: #1a0f2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
  color: #ffffff !important;
}

/* Featured YouTube Card */
.link-card.featured {
  background: linear-gradient(135deg, #3b0764, #1e1b4b);
  border: 1px solid #a855f7;
}

.link-card.featured:hover {
  background: linear-gradient(135deg, #581c87, #2e1065);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
}


/* Mobile Navigation Styles */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-nav-toggle {
    display: block !important;
  }

  header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
  }

  header nav.nav-open {
    display: flex;
  }
}
