﻿/* SEO Content Layer Styles - Mobile First */

/* Show SEO content by default (crawlers see this) */
.seo-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  .seo-content {
    color: #e0e0e0;
  }
}

/* Responsive padding for larger screens */
@media (min-width: 768px) {
  .seo-content {
    padding: 2rem;
  }
}

/* Header styles */
header h1 {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 1.75rem;
  margin: 1rem auto;
  max-width: 800px;
  padding: 0 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  header h1 {
    font-size: 2.5rem;
  }
}

/* Section spacing */
.seo-content section {
  margin-bottom: 2rem;
}

.seo-content h2 {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

@media (prefers-color-scheme: dark) {
  .seo-content h2 {
    color: #e0e0e0;
  }
}

/* Paragraph styles */
.seo-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .seo-content p {
    font-size: 1.125rem;
  }
}

/* How-to list styles */
.how-to-play ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.how-to-play li {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .how-to-play li {
    font-size: 1.125rem;
  }
}

.how-to-play strong {
  color: #2c3e50;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .how-to-play strong {
    color: #64b5f6;
  }
}

/* FAQ styles - definition list */
.faq dl {
  margin: 0;
}

.faq dt {
  font-weight: 600;
  font-size: 1.125rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

@media (prefers-color-scheme: dark) {
  .faq dt {
    color: #64b5f6;
  }
}

.faq dd {
  margin-left: 0;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid #e0e0e0;
  font-size: 1rem;
}

@media (prefers-color-scheme: dark) {
  .faq dd {
    border-left-color: #424242;
  }
}

/* Noscript warning */
.noscript-warning {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 4px;
  padding: 1rem;
  margin: 2rem 0;
  color: #856404;
  font-weight: 500;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .noscript-warning {
    background-color: #5d4a1f;
    border-color: #ffc107;
    color: #ffd54f;
  }
}

/* === FOOTER OPTIMIZATION - Subtle & Centered === */
footer {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  margin-top: 4rem;
  border-top: 1px solid #e5e5e5;
}

@media (prefers-color-scheme: dark) {
  footer {
    border-top-color: #3a3a3a;
  }
}

/* Footer navigation - centered, subtle colors */
.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 auto 1.5rem;
  max-width: 600px;
}

.footer-nav a {
  color: #757575;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
  border-radius: 4px;
  font-weight: 400;
  font-size: 0.875rem;
}

.footer-nav a:hover,
.footer-nav a:focus {
  color: #424242;
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

@media (prefers-color-scheme: dark) {
  .footer-nav a {
    color: #909090;
  }
  
  .footer-nav a:hover,
  .footer-nav a:focus {
    color: #b0b0b0;
    background: rgba(255, 255, 255, 0.06);
  }
}

/* Separator between links */
.footer-nav .separator {
  color: #d5d5d5;
  user-select: none;
  font-weight: 300;
}

@media (prefers-color-scheme: dark) {
  .footer-nav .separator {
    color: #4a4a4a;
  }
}

/* Copyright text - fully centered, subtle */
.copyright {
  margin: 0 auto;
  padding: 0;
  font-size: 0.813rem;
  color: #9e9e9e;
  max-width: 90%;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .copyright {
    color: #6a6a6a;
  }
}

/* Mobile optimization */
@media (max-width: 480px) {
  .footer-nav {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-nav a {
    min-width: 200px;
    text-align: center;
  }
  
  .footer-nav .separator {
    display: none;
  }
  
  footer {
    padding: 2rem 1rem 1.5rem;
  }
}

/* Hide when game loads (set by JavaScript) */
.seo-content.hidden {
  display: none !important;
}

/* Game root hidden until JS loads */
.pd-game-root:empty {
  display: none;
}

/* Ensure main has min-height */
main {
  min-height: 100vh;
}

/* Touch-friendly links and buttons (48x48px minimum) */
.seo-content a,
.seo-content button {
  min-height: 48px;
  min-width: 48px;
  display: inline-block;
  padding: 0.5rem 1rem;
}

/* Accessibility improvements */
.seo-content :focus {
  outline: 2px solid #64b5f6;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Game-first layout optimization */
.pd-game-root {
  /* Game always visible and on top */
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

/* SEO content below the game */
.seo-content {
  position: relative;
  z-index: 5;
  /* Reduced top margin for better flow */
  margin-top: 2rem;
  padding-top: 2rem;
}

/* When JavaScript loads and hides SEO content, remove it completely */
.seo-content.hidden {
  display: none !important;
  /* Also remove from layout to prevent any space */
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
}

/* Header inside SEO content (not at page top) */
.seo-content header h1 {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 1.75rem;
  margin: 0 auto 2rem;
  max-width: 800px;
  padding: 0 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .seo-content header h1 {
    font-size: 2.5rem;
  }
}
