/* ===============================================
   DEATHLAB UNIVERSAL PAGE OVERRIDES
   Ensures ALL pages use DeathLAB aesthetic
   =============================================== */

/* ============================
   GLOBAL BODY CLASS OVERRIDES
   ============================ */

/* Force DeathLAB theme on ALL page types */
body.home-template,
body.post-template,
body.page-template,
body.tag-template,
body.author-template,
body.paged,
body.error-template,
body.private-template,
body.tag-template,
body.tags-template,
body.signin-template,
body.signup-template,
body.membership-template,
body.vendors-template,
body.protocol-template,
body:has(.protocol-page),
body:has(.vendors-page),
body:has(.adhd-page),
body:has(.prototype-page),
html {
  background: var(--death-black) !important;
  color: var(--death-text) !important;
}

/* ============================
   POST PAGES - ARTICLE CONTENT
   ============================ */

/* Post template styling */
.post-template,
.page-template,
.post-content,
.page-content {
  background: var(--death-black) !important;
}

/* Article content area */
.gh-content,
.kg-prose,
.post-full-content {
  background: var(--death-black-secondary) !important;
  border: 1px solid var(--death-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 3rem !important;
  margin: 2rem 0 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.8) !important;
}

/* Post headers */
.post-full-header,
.page-header {
  background: var(--death-black) !important;
  color: var(--death-text) !important;
  padding: 3rem 0 !important;
  text-align: center !important;
}

.post-full-title,
.page-title {
  color: var(--death-text) !important;
  font-family: var(--font-headings) !important;
  font-weight: 700 !important;
  font-size: 3rem !important;
  margin-bottom: 1rem !important;
}

.post-full-meta,
.page-meta {
  color: var(--death-text-muted) !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
}

/* ============================
   TAG & ARCHIVE PAGES
   ============================ */

.tag-template,
.tags-template,
.paged {
  background: var(--death-black) !important;
}

.tag-header,
.paged-header {
  background: var(--death-black) !important;
  padding: 3rem 0 !important;
  text-align: center !important;
  border-bottom: 1px solid var(--death-border) !important;
}

.tag-name,
.paged-title {
  color: var(--death-text) !important;
  font-family: var(--font-headings) !important;
  font-weight: 700 !important;
  font-size: 2.5rem !important;
  margin-bottom: 1rem !important;
}

.tag-description,
.paged-description {
  color: var(--death-text-secondary) !important;
  max-width: 600px !important;
  margin: 0 auto !important;
}

/* ============================
   AUTHOR PAGES
   ============================ */

.author-template {
  background: var(--death-black) !important;
}

.author-header {
  background: var(--death-black) !important;
  padding: 3rem 0 !important;
  text-align: center !important;
  border-bottom: 1px solid var(--death-border) !important;
}

.author-avatar {
  border: 2px solid var(--death-chrome) !important;
  border-radius: 50% !important;
  filter: grayscale(100%) !important;
}

.author-name {
  color: var(--death-text) !important;
  font-family: var(--font-headings) !important;
  font-weight: 700 !important;
  font-size: 2.5rem !important;
  margin: 1rem 0 !important;
}

.author-bio {
  color: var(--death-text-secondary) !important;
  max-width: 600px !important;
  margin: 0 auto !important;
}

/* ============================
   ERROR PAGES
   ============================ */

.error-template {
  background: var(--death-black) !important;
  min-height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.error-content {
  text-align: center !important;
  padding: 3rem !important;
  background: var(--death-black-secondary) !important;
  border: 1px solid var(--death-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.8) !important;
}

.error-code {
  font-size: 5rem !important;
  font-weight: 700 !important;
  color: var(--death-red) !important;
  font-family: var(--font-headings) !important;
  margin-bottom: 1rem !important;
}

.error-description {
  color: var(--death-text-secondary) !important;
  font-size: 1.2rem !important;
  margin-bottom: 2rem !important;
}

/* ============================
   MEMBERSHIP & AUTH PAGES
   ============================ */

.signin-template,
.signup-template,
.membership-template {
  background: var(--death-black) !important;
  min-height: 100vh !important;
}

.auth-form,
.membership-form {
  background: var(--death-black-secondary) !important;
  border: 1px solid var(--death-border) !important;
  border-radius: var(--radius-md) !important;
  padding: 3rem !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.8) !important;
  max-width: 400px !important;
  margin: 0 auto !important;
  margin-top: 5rem !important;
}

.auth-form h1,
.membership-form h1 {
  color: var(--death-text) !important;
  font-family: var(--font-headings) !important;
  font-weight: 700 !important;
  text-align: center !important;
  margin-bottom: 2rem !important;
}

/* ============================
   VENDOR & PROTOCOL PAGES
   ============================ */

.vendors-template,
.protocol-template,
body:has(.vendors-page),
body:has(.protocol-page) {
  background: var(--death-black) !important;
}

.vendors-page,
.protocol-page {
  background: var(--death-black) !important;
  min-height: 100vh !important;
}

.vendors-hero,
.protocol-hero {
  background: var(--death-black) !important;
  padding: 3rem 0 !important;
  text-align: center !important;
  border-bottom: 1px solid var(--death-border) !important;
}

.vendors-hero h1,
.protocol-hero h1 {
  color: var(--death-text) !important;
  font-family: var(--font-headings) !important;
  font-weight: 700 !important;
  font-size: 3rem !important;
  margin-bottom: 1rem !important;
}

/* ============================
   FEED LAYOUTS & CARDS
   ============================ */

/* Post feed containers */
.post-feed,
.posts,
.articles {
  background: var(--death-black) !important;
  padding: 2rem 0 !important;
}

/* Override any remaining card styles */
.post-card,
.article-card,
.content-card {
  background: var(--death-black-secondary) !important;
  border: 1px solid var(--death-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 8px 32px rgba(0,0,0,0.8) !important;
  transition: all 0.3s ease !important;
}

.post-card:hover,
.article-card:hover,
.content-card:hover {
  border-color: var(--death-chrome) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 12px 48px rgba(0,0,0,0.9) !important;
  transform: translateY(-2px) !important;
}

.post-card-title,
.article-title {
  color: var(--death-text) !important;
  font-family: var(--font-headings) !important;
  font-weight: 700 !important;
}

.post-card-excerpt,
.article-excerpt {
  color: var(--death-text-secondary) !important;
}

/* ============================
   PAGINATION
   ============================ */

.pagination {
  background: var(--death-black) !important;
  padding: 2rem 0 !important;
  text-align: center !important;
}

.pagination a,
.pagination .current {
  background: var(--death-black-secondary) !important;
  color: var(--death-chrome) !important;
  border: 1px solid var(--death-border) !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: var(--radius) !important;
  text-decoration: none !important;
  margin: 0 0.5rem !important;
  font-family: var(--font-headings) !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-size: 0.875rem !important;
}

.pagination a:hover {
  background: var(--death-black-tertiary) !important;
  border-color: var(--death-red) !important;
  color: var(--death-red) !important;
}

.pagination .current {
  background: var(--death-red) !important;
  color: var(--death-black) !important;
  border-color: var(--death-red) !important;
}

/* ============================
   SEARCH & FILTER COMPONENTS
   ============================ */

.search-form,
.filter-form {
  background: var(--death-black-secondary) !important;
  border: 1px solid var(--death-border) !important;
  border-radius: var(--radius) !important;
  padding: 1rem !important;
  margin-bottom: 2rem !important;
}

.search-input,
.filter-input {
  background: var(--death-black) !important;
  border: 1px solid var(--death-border) !important;
  color: var(--death-text) !important;
  padding: 0.75rem 1rem !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  width: 100% !important;
}

.search-input:focus,
.filter-input:focus {
  border-color: var(--death-red) !important;
  box-shadow: 0 0 0 2px rgba(216,35,42,0.2) !important;
  outline: none !important;
}

/* ============================
   RESPONSIVE ADJUSTMENTS
   ============================ */

@media (max-width: 768px) {
  .post-full-title,
  .page-title,
  .tag-name,
  .archive-title,
  .author-name {
    font-size: 2rem !important;
  }

  .gh-content,
  .kg-prose,
  .post-full-content {
    padding: 2rem !important;
    margin: 1rem 0 !important;
  }

  .auth-form,
  .membership-form {
    padding: 2rem !important;
    margin-top: 2rem !important;
  }
}

/* ============================
   ENSURE NO LIGHT BACKGROUNDS
   ============================ */

/* Catch any remaining elements with light backgrounds */
div, section, article, aside, nav, header, footer, main {
  background-color: transparent !important;
}

/* Only allow DeathLAB backgrounds */
div[style*="background: white"],
div[style*="background: #fff"],
div[style*="background: #ffffff"],
section[style*="background: white"],
section[style*="background: #fff"],
section[style*="background: #ffffff"] {
  background: var(--death-black-secondary) !important;
}

/* Remove any bright gradients */
*[style*="linear-gradient"],
*[class*="gradient"]:not(.gradient-text) {
  background: var(--death-black-secondary) !important;
}

/* Ensure all text is properly colored */
h1, h2, h3, h4, h5, h6 {
  color: var(--death-text) !important;
}

p, span, div, li {
  color: var(--death-text-secondary) !important;
}

/* Links get chrome color by default */
a:not(.btn):not(.button) {
  color: var(--death-chrome) !important;
}

a:not(.btn):not(.button):hover {
  color: var(--death-red) !important;
}