/* Dark Horror Theme Variables */
:root {
  /* Dark Horror Color Palette */
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --text-light: #e0e0e0;
  --text-muted: #888888;
  --text-dark-theme: #ffffff;
  --accent-horror: #8b0000;
  --accent-blood: #dc2626;
  --border-dark: #333333;
  --gray-dark: #404040;

  /* Horror Effects */
  --glow-red: 0 0 15px rgba(139, 0, 0, 0.4);
  --glow-red-hover: 0 0 25px rgba(139, 0, 0, 0.6);
  --shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.6);
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);

  /* Noise Texture */
  --noise-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* Dark Theme Body Override */
.dark-theme {
  background: var(--bg-primary);
  color: var(--text-light);
}

/* Unified Breadcrumb Styles - Dark Theme Compatible */
.games-hero .breadcrumb {
  font-size: 0.875rem;
  margin-bottom: 2rem;
  color: rgba(224, 224, 224, 0.8);
  text-align: left;
}

.games-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.games-hero .breadcrumb a:hover {
  color: var(--accent-horror);
  text-decoration: underline;
  text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
}

.games-hero .breadcrumb-separator {
  margin: 0 0.5rem;
  color: rgba(224, 224, 224, 0.6);
}

.games-hero .breadcrumb-current {
  color: rgba(224, 224, 224, 0.6);
}

/* Games Hero Section */
.games-hero {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.games-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise-texture);
  opacity: 0.1;
  pointer-events: none;
}

.games-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

.games-hero .hero-title {
  font-family: 'VT323', monospace;
  font-size: 3.5rem;
  color: var(--text-dark-theme);
  margin-bottom: 1rem;
  letter-spacing: 3px;
  text-shadow: 2px 2px 8px rgba(139, 0, 0, 0.6), 0 0 20px rgba(139, 0, 0, 0.3);
}

.games-hero .hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.games-hero .hero-description {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.75;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
  opacity: 0.9;
}

/* Filters Section */
.filters-section {
  background: var(--bg-secondary);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-dark);
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filters-title {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  color: var(--text-dark-theme);
  margin: 0;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(139, 0, 0, 0.5);
}

.games-count {
  color: var(--accent-horror);
  font-weight: 500;
  font-size: 1.5rem;
  text-shadow: 0 0 8px rgba(139, 0, 0, 0.6);
}

.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-tertiary);
  color: var(--text-light);
  border: 1px solid var(--border-dark);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-filters-btn:hover {
  background: var(--accent-horror);
  color: var(--text-dark-theme);
  box-shadow: var(--glow-red);
  border-color: var(--accent-horror);
}

.clear-icon {
  width: 1rem;
  height: 1rem;
}

.filters-container {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.filters-grid {
  display: flex;
  gap: 1.5rem;
  min-width: max-content;
  padding: 0 0.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  flex-shrink: 0;
}

.filter-label {
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-dark);
  border-radius: 0.375rem;
  background: var(--bg-tertiary);
  color: var(--text-light);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-horror);
  box-shadow: var(--glow-red);
  background: var(--bg-secondary);
}

.filter-select option {
  background: var(--bg-tertiary);
  color: var(--text-light);
}

/* Games Section */
.games-section {
  padding: 4rem 0;
  background: var(--bg-primary);
  min-height: 60vh;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Game Card Styles */
.game-card {
  background: var(--bg-secondary);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-dark);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-dark);
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise-texture);
  opacity: 0.03;
  pointer-events: none;
}

.game-card:hover {
  box-shadow: var(--shadow-dark), var(--glow-red);
  transform: translateY(-3px);
  border-color: var(--accent-horror);
}

.game-image {
  width: 100%;
  height: 200px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  filter: brightness(0.8) contrast(1.1);
}

.game-card:hover .game-image img {
  transform: scale(1.05);
  filter: brightness(0.9) contrast(1.2);
}

.game-image-placeholder {
  color: var(--text-muted);
  font-size: 3rem;
  font-family: 'VT323', monospace;
}

.game-content {
  padding: 1.5rem;
  position: relative;
  z-index: 2;
}

.game-header {
  margin-bottom: 1rem;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark-theme);
  margin-bottom: 0.25rem;
  line-height: 1.3;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.game-developer {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.game-description {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.game-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.meta-value {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.game-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.tag-psychological {
  background: rgba(139, 0, 0, 0.2);
  color: var(--accent-horror);
  border-color: rgba(139, 0, 0, 0.3);
}

.tag-horror {
  background: rgba(220, 38, 38, 0.2);
  color: var(--accent-blood);
  border-color: rgba(220, 38, 38, 0.3);
}

.tag-beginner {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

.tag-experienced {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.3);
}

.tag-online {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

.tag-download {
  background: rgba(107, 114, 128, 0.2);
  color: var(--text-muted);
  border-color: rgba(107, 114, 128, 0.3);
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-platforms {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent-horror);
  color: var(--text-dark-theme);
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid var(--accent-horror);
}

.play-btn:hover {
  background: var(--accent-blood);
  transform: translateY(-1px);
  box-shadow: var(--glow-red-hover);
  border-color: var(--accent-blood);
}

.play-icon {
  width: 1rem;
  height: 1rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  color: var(--text-light);
  border: 2px solid var(--border-dark);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--accent-horror);
  color: var(--text-dark-theme);
  border-color: var(--accent-horror);
  box-shadow: var(--glow-red);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-icon {
  width: 1rem;
  height: 1rem;
}

.pagination-info {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

/* FAQ Section */
.faq-section {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.faq-section .section-title {
  color: var(--text-dark-theme);
  text-shadow: 1px 1px 3px rgba(139, 0, 0, 0.5);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.faq-item {
  background: var(--bg-tertiary);
  padding: 2rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--accent-horror);
  box-shadow: var(--shadow-light);
  position: relative;
}

.faq-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise-texture);
  opacity: 0.02;
  pointer-events: none;
}

.faq-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark-theme);
  margin-bottom: 1rem;
}

.faq-answer {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  opacity: 0.9;
}

.faq-answer a {
  color: var(--accent-horror);
  text-decoration: none;
  transition: color 0.3s ease;
}

.faq-answer a:hover {
  color: var(--accent-blood);
  text-decoration: underline;
  text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
}

/* Back to Home Section */
.back-home-section {
  background: var(--bg-primary);
  padding: 4rem 0;
  text-align: center;
  position: relative;
}

.back-home-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise-texture);
  opacity: 0.05;
  pointer-events: none;
}

.back-home-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.back-home-title {
  font-family: 'VT323', monospace;
  font-size: 2rem;
  color: var(--text-dark-theme);
  margin-bottom: 1rem;
  letter-spacing: 1px;
  text-shadow: 1px 1px 3px rgba(139, 0, 0, 0.5);
}

.back-home-description {
  color: var(--text-light);
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  opacity: 0.9;
}

.back-home-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.back-btn.primary {
  background: var(--accent-horror);
  color: var(--text-dark-theme);
  border-color: var(--accent-horror);
}

.back-btn.primary:hover {
  background: var(--accent-blood);
  transform: translateY(-2px);
  box-shadow: var(--glow-red-hover);
  border-color: var(--accent-blood);
}

.back-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-light);
  border-color: var(--border-dark);
}

.back-btn.secondary:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  border-color: var(--text-muted);
}

.btn-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Loading States */
.loading {
  text-align: center;
  color: var(--text-muted);
  padding: 4rem 2rem;
  font-size: 1.125rem;
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.no-results p {
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .games-hero .hero-title {
    font-size: 2.5rem;
  }

  .games-hero .hero-subtitle {
    font-size: 1.25rem;
  }

  .filters-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .filters-container {
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  .filters-grid {
    padding: 0;
  }

  .filter-group {
    min-width: 180px;
  }

  .game-meta {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

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

  .pagination {
    flex-direction: column;
    gap: 1rem;
  }

  .pagination-btn {
    width: 100%;
    max-width: 200px;
    justify-content: center;
  }

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

  .back-home-buttons {
    flex-direction: column;
    align-items: center;
  }

  .back-btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .games-hero {
    padding: 2rem 0;
  }

  .games-hero .hero-title {
    font-size: 2rem;
  }

  .filters-section {
    padding: 1rem 0;
  }

  .filters-title {
    font-size: 1.5rem;
  }

  .games-count {
    font-size: 1.25rem;
  }

  .filter-group {
    min-width: 160px;
  }

  .game-card {
    margin: 0 0.5rem;
  }

  .game-content {
    padding: 1rem;
  }

  .faq-item {
    padding: 1.5rem;
  }

  .back-home-section {
    padding: 3rem 0;
  }

  .back-home-title {
    font-size: 1.5rem;
  }
}

/* Scrollbar Styling for Dark Theme */
.filters-container::-webkit-scrollbar {
  height: 8px;
}

.filters-container::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.filters-container::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border-radius: 4px;
}

.filters-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox scrollbar */
.filters-container {
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) var(--bg-tertiary);
}

/* 🔧 MOBILE DROPDOWN DARK MODE FIX - CORRECTED VERSION */
/* Targeted fixes that don't break layout or default states */

/* Fix only the pointer events issue without affecting layout */
.dark-theme .mobile-dropdown-toggle {
  pointer-events: auto !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  /* Don't change position or display properties */
}

/* Fix dropdown content only when it should be visible */
.dark-theme .mobile-dropdown-content {
  pointer-events: auto !important;
  /* Keep default display: none - don't override with inherit */
}

/* Fix dropdown content when it's active (visible state) */
.dark-theme .mobile-dropdown-content.active {
  pointer-events: auto !important;
  /* Only apply z-index when dropdown is actually open */
  z-index: 1001 !important;
  position: relative !important;
}

/* Fix dropdown items to be clickable */
.dark-theme .mobile-dropdown-item {
  pointer-events: auto !important;
  cursor: pointer !important;
  /* Don't override display or position */
}

/* Ensure mobile menu container doesn't block interactions */
.dark-theme .mobile-menu {
  pointer-events: auto !important;
  /* Don't change position - keep it in normal flow */
}

/* Minimal z-index fix only when needed */
.dark-theme .mobile-nav-dropdown {
  /* Don't apply high z-index by default */
}

/* Only apply high z-index when dropdown is actually being used */
.dark-theme .mobile-nav-dropdown:hover,
.dark-theme .mobile-nav-dropdown.active {
  z-index: 1000 !important;
}

