/* ===========================================================================
 * common/seo-content.css — SEO Content Block Shared Styles
 * Design: dark theme, coordinates with site.css, mobile-friendly, zero JS
 * Usage: <link rel="stylesheet" href="../common/seo-content.css">
 * =========================================================================== */

/* Prevent horizontal overflow from full-bleed pseudo-elements */
html {
  overflow-x: hidden;
}

/* ---- CSS Variables (auto-override if game page defines its own) ---- */
:root {
  --seo-bg: #070b14;          /* Solid dark bg (matches typical game deep-space / dark theme) */
  --seo-max-width: 800px;
  --seo-text: #E8EEF6;
  --seo-muted: #9FB0C4;
  --seo-border: rgba(120, 160, 210, 0.18);
  --seo-panel: rgba(14, 22, 38, 0.6);
  --seo-accent: var(--blue, var(--amber-glow, #2EC4FF));
  --seo-radius: 14px;
  --seo-gap: 28px;
}

/* ---- SEO Content Container ---- */
.seo-content {
  position: relative;
  max-width: var(--seo-max-width);
  margin: 0 auto;
  padding: 80px clamp(16px, 4vw, 32px) 64px;
  color: var(--seo-text);
  line-height: 1.75;
  user-select: text;
}

/* Full-bleed gradient backdrop: transparent → solid dark */
.seo-content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  left: calc(-50vw + 50%);
  right: calc(-50vw + 50%);
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(7, 11, 20, 0.30) 30px,
    rgba(7, 11, 20, 0.65) 65px,
    rgba(7, 11, 20, 0.90) 100px,
    var(--seo-bg) 130px,
    var(--seo-bg) 100%
  );
}

/* Decorative accent line at transition zone */
.seo-content::after {
  content: '';
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(160px, 30vw, 300px);
  height: 1px;
  background: linear-gradient(to right, transparent, var(--seo-accent), transparent);
  opacity: 0.35;
}

/* ---- H1 Main Title ---- */
.seo-title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  margin: 0 0 var(--seo-gap);
  line-height: 1.3;
  letter-spacing: .01em;
}
.seo-title-sub {
  display: block;
  font-size: 0.6em;
  font-weight: 600;
  color: var(--seo-muted);
  margin-top: 4px;
  letter-spacing: .03em;
}

/* ---- H2 Section Title ---- */
.seo-h2 {
  font-size: clamp(17px, 2.5vw, 20px);
  font-weight: 700;
  margin: var(--seo-gap) 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--seo-border);
  color: var(--seo-text);
}

/* ---- Body Paragraph ---- */
.seo-p {
  margin: 0 0 16px;
  color: var(--seo-text);
  font-size: 15px;
  line-height: 1.8;
}

/* ---- Ordered List (How to Play) ---- */
.seo-ol {
  margin: 0 0 16px;
  padding-left: 24px;
  list-style: decimal;
}
.seo-ol li {
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--seo-muted);
}
.seo-ol li::marker {
  color: var(--seo-accent);
  font-weight: 700;
}

/* ---- Controls Dual Column ---- */
.seo-controls {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .seo-controls { grid-template-columns: 1fr 1fr; }
}
.control-group {
  background: var(--seo-panel);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius);
  padding: 16px 20px;
}
.control-h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--seo-accent);
}

/* ---- Bullet List ---- */
.seo-list {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
.seo-list li {
  position: relative;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--seo-muted);
}
.seo-list li::before {
  content: "\25B8";
  position: absolute;
  left: -18px;
  color: var(--seo-accent);
  font-weight: 700;
}
kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 12px;
  font-family: 'Segoe UI', monospace;
  background: var(--seo-panel);
  border: 1px solid var(--seo-border);
  border-radius: 4px;
  color: var(--seo-text);
}

/* ---- Feature Cards Grid ---- */
.seo-features {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .seo-features { grid-template-columns: 1fr 1fr; } }
.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--seo-panel);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius);
  padding: 16px 18px;
  transition: border-color .25s, transform .25s;
}
.feature-item:hover {
  border-color: var(--seo-accent);
  transform: translateY(-2px);
}
.feature-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.feature-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--seo-text);
}
.feature-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--seo-muted);
  margin: 0;
}

/* ---- FAQ Collapsible (native details/summary) ---- */
.seo-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--seo-panel);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius);
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item[open] {
  border-color: var(--seo-accent);
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--seo-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--seo-accent);
  transition: transform .25s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}
.faq-a {
  padding: 0 18px 16px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--seo-muted);
}
.faq-a p { margin: 0; }

/* ---- Related Games Links ---- */
.seo-related {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--seo-panel);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, background .2s;
}
.related-card:hover {
  border-color: var(--seo-accent);
  transform: translateX(4px);
  background: rgba(14, 22, 38, 0.9);
}
.related-tag {
  font-size: 24px;
  flex-shrink: 0;
}
.related-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--seo-text);
}
.related-desc {
  display: block;
  font-size: 13px;
  color: var(--seo-muted);
}

/* ---- Breadcrumb ---- */
.seo-breadcrumb {
  max-width: var(--seo-max-width);
  margin: 500px auto 0;
  padding: 0 clamp(16px, 4vw, 32px);
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--seo-muted);
}
.breadcrumb-item a {
  color: var(--seo-muted);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb-item a:hover {
  color: var(--seo-text);
  text-decoration: underline;
}
.breadcrumb-sep {
  opacity: 0.5;
  user-select: none;
}
.breadcrumb-current {
  color: var(--seo-text);
  font-weight: 600;
}

/* ---- Mobile Adjustments ---- */
@media (max-width: 480px) {
  .seo-content {
    padding: 100px 16px 48px;
  }
  .seo-title { font-size: 20px; }
  .seo-h2 { font-size: 16px; }
  .seo-p { font-size: 14px; }
  .feature-item { padding: 12px 14px; }

/* ---- Game Cards (Category Pages) ---- */
.game-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0 0 32px;
}
@media (min-width: 600px) {
  .game-cards { grid-template-columns: 1fr 1fr; }
}
.game-card {
  background: var(--seo-panel);
  border: 1px solid var(--seo-border);
  border-radius: var(--seo-radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.game-card:hover {
  border-color: var(--seo-accent);
  transform: translateY(-3px);
}
.game-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.game-card-img {
  width: 100%;
  aspect-ratio: 400/180;
  object-fit: cover;
  display: block;
}
.game-card-body {
  padding: 14px 18px 18px;
}
.game-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--seo-text);
}
.game-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--seo-muted);
  margin: 0 0 10px;
}
.game-card-cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--seo-accent);
}
.game-card-cta::after {
  content: " →";
}

@media (max-width: 480px) {
  .game-card-body { padding: 12px 14px 16px; }
  .game-card-title { font-size: 15px; }
  .game-card-desc { font-size: 12px; }
  .game-card-cta { font-size: 13px; }
}

  .seo-breadcrumb {
    margin-top: 200px;
    padding: 0 16px;
  }
}

/* ---- Accessibility: Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .faq-item[open] .faq-q::after { transform: none; }
}
