/* ============================================
   DARK MODE THEME
   ============================================ */

[data-theme="dark"] {
  --primary-color: #4da6ff;
  --text-color: #e0e0e0;
  --text-light: #b0b0b0;
  --border-color: #404040;
  --background-light: #1a1a1a;
  --background-white: #2d2d2d;
}

[data-theme="dark"] body {
  background: #1a1a1a;
  color: #e0e0e0;
}

/* Header */
[data-theme="dark"] .site-header {
  background: #2d2d2d;
  border-bottom-color: var(--primary-color);
}

[data-theme="dark"] .nav-menu li a {
  color: #e0e0e0;
}

/* Cards and boxes */
[data-theme="dark"] .welcome,
[data-theme="dark"] .post-preview,
[data-theme="dark"] .sidebar-section,
[data-theme="dark"] .game-page,
[data-theme="dark"] .variant-page,
[data-theme="dark"] .case-type-page,
[data-theme="dark"] .page-content,
[data-theme="dark"] .blog-post,
[data-theme="dark"] .games-index-page,
[data-theme="dark"] .alphabetical-index-page,
[data-theme="dark"] .list-page,
[data-theme="dark"] .container {
  background: #2d2d2d;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Borders */
[data-theme="dark"] .game-header,
[data-theme="dark"] .variant-header,
[data-theme="dark"] .page-header {
  border-bottom-color: #404040;
}

[data-theme="dark"] .games-section,
[data-theme="dark"] .releases {
  border-top-color: #404040;
}

/* Input fields */
[data-theme="dark"] .pagefind-ui__search-input {
  background: #3d3d3d;
  color: #e0e0e0;
  border-color: #555;
}

[data-theme="dark"] #search .pagefind-ui__results {
  background: #2d2d2d;
  border-color: #555;
}

/* Tables */
[data-theme="dark"] .variants-table {
  background: #2d2d2d;
}

[data-theme="dark"] .variants-table thead {
  background: #1a1a1a;
}

[data-theme="dark"] .variants-table td {
  border-bottom-color: #404040;
}

[data-theme="dark"] .variants-table tbody tr:hover {
  background: #3d3d3d;
}

/* Images - keep borders visible */
[data-theme="dark"] .game-images img,
[data-theme="dark"] .cover-image,
[data-theme="dark"] .page-content img,
[data-theme="dark"] .case-type-content img {
  border-color: #555;
}

/* Special boxes */
[data-theme="dark"] .collector-notes {
  background: #3d2d1a;
  border-left-color: #ffb800;
}

[data-theme="dark"] .game-content-section,
[data-theme="dark"] .variant-content-section {
  background: #3d3d3d;
}

[data-theme="dark"] .aka {
  background: #3d3d3d;
}

[data-theme="dark"] .release-info-compact {
  background: #3d3d3d;
}

/* Progress bars */
[data-theme="dark"] .stat {
  background: #3d3d3d;
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .stat-number {
  color: #e0e0e0;
}

[data-theme="dark"] .progress-bar {
  background: #404040;
}

[data-theme="dark"] .progress-label,
[data-theme="dark"] .progress-label span,
[data-theme="dark"] .progress-percent {
  color: #e0e0e0;
}

[data-theme="dark"] .completeness h3 {
  color: #e0e0e0;
}

/* Letter boxes */
[data-theme="dark"] .letter-box {
  background: #3d3d3d;
  border-color: #555;
  color: #e0e0e0;
}

[data-theme="dark"] .letter-box:hover {
  background: #4d4d4d;
}

/* No image placeholder */
[data-theme="dark"] .no-image {
  background: #3d3d3d;
  border-color: #555;
}

/* Release type cards */
[data-theme="dark"] .release-type-card {
  background: #2d2d2d;
  border-color: #555;
}

[data-theme="dark"] .release-type-card:hover {
  border-color: #4da6ff;
}

/* Post previews */
[data-theme="dark"] .post-preview {
  border-left-color: var(--primary-color);
}

/* View all link */
[data-theme="dark"] .view-all a {
  color: #ffffff;
  background: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}

[data-theme="dark"] .view-all a:hover {
  background: #66b3ff;
}

/* Breadcrumb */
[data-theme="dark"] .breadcrumb a {
  color: var(--primary-color);
}

/* Footer */
[data-theme="dark"] .site-footer {
  background: #1a1a1a;
  border-top: 2px solid #404040;
}

/* Headings */
[data-theme="dark"] .page-header h1,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: #e0e0e0;
}

[data-theme="dark"] .welcome h1,
[data-theme="dark"] .game-info h1,
[data-theme="dark"] .variant-page h1,
[data-theme="dark"] .post-header h1 {
  color: var(--primary-color);
}

/* Links */
[data-theme="dark"] a {
  color: var(--primary-color);
}

/* Text elements - ensure proper contrast */
[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] .page-content p,
[data-theme="dark"] .page-content li {
  color: #e0e0e0;
}

[data-theme="dark"] strong,
[data-theme="dark"] b {
  color: #f0f0f0;
}

/* Tags */
[data-theme="dark"] .tag {
  background: #3d3d3d;
  color: #b0b0b0;
}

/* Banner container for release types */
[data-theme="dark"] .banner-container {
  border: 1px solid #555;
}

/* Entity pages (publisher/developer) */
[data-theme="dark"] .entity-header {
  border-bottom-color: #404040;
}

[data-theme="dark"] .entity-tagline {
  color: #b0b0b0;
}

[data-theme="dark"] .entity-logo,
[data-theme="dark"] .inline-logo {
  /* Logos work fine in dark mode, no changes needed */
}

/* Base ad container styling */
.ad-container {
  margin: 2rem 0;
  padding: 1rem;
  text-align: center;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

/* Horizontal ads (between content) */
.ad-horizontal {
  max-width: 100%;
  min-height: 90px;
}

/* Sidebar ads */
.ad-sidebar {
  position: sticky;
  top: 20px;
  margin: 1rem 0;
  min-height: 250px;
}

/* In-feed ads (within game listings) */
.ad-infeed {
  grid-column: 1 / -1; /* If using CSS Grid for game listings */
  margin: 1rem 0;
  min-height: 100px;
}

/* Optional: Add a subtle "Advertisement" label */
.ad-container::before {
  content: "Advertisement";
  display: block;
  font-size: 0.75rem;
  color: #999;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ad-sidebar {
    position: static;
    margin: 1.5rem 0;
  }

  .ad-container {
    margin: 1.5rem 0;
  }
}

/* Dark mode support (if your site has it) */
@media (prefers-color-scheme: dark) {
  .ad-container {
    background: #2a2a2a;
    border-color: #404040;
  }

  .ad-container::before {
    color: #666;
  }
}
/* ============================================
   FOOTER STYLES - DARK MODE
   ============================================ */

[data-theme="dark"] .variant-footer,
[data-theme="dark"] .game-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top-color: #404040;
}

[data-theme="dark"] .last-updated {
  color: #b0b0b0;
}

/* ============================================
   DATA PROCESSING NOTICE BOXES - DARK MODE
   ============================================ */

[data-theme="dark"] .data-processing-notice {
  background: #2a2a2a;
  border-color: #404040;
}

[data-theme="dark"] .notice-box {
  background: #3d3d3d;
  border-left-color: #4da6ff;
  padding: 1rem;
}

[data-theme="dark"] .notice-box h3 {
  color: #4da6ff;
}

[data-theme="dark"] .notice-box p {
  color: #e0e0e0;
}

[data-theme="dark"] .processing-note {
  background: #4a4020;
  color: #f0e0c0;
}