/**
 * Page-Specific CSS for Dedicated Game SEO Pages
 * Reuses core site CSS variables and typography tokens
 */

/* Breadcrumb Navigation */
.breadcrumb-nav {
  padding: 8px 0 16px 0;
  width: 100%;
}

.breadcrumb-list {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  word-break: break-word;
}

.breadcrumb-item {
  display: inline-flex !important;
  align-items: center !important;
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  display: inline-block;
  margin: 0 8px;
  color: var(--color-text-muted);
  opacity: 0.5;
  font-weight: 400;
  font-size: 0.85rem;
}

.breadcrumb-item a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.breadcrumb-item a:hover {
  color: var(--color-navy);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--color-text-heading);
  font-weight: 600;
}

@media (max-width: 600px) {
  .breadcrumb-nav {
    padding: 6px 0 12px 0;
  }
  .breadcrumb-list {
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .breadcrumb-item + .breadcrumb-item::before {
    margin: 0 5px;
    font-size: 0.75rem;
  }
}

/* Game Hero Header */
.game-page-hero {
  background: linear-gradient(135deg, rgba(26, 20, 56, 0.04) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 32px 0;
  margin-bottom: 32px;
}

.game-page-header-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 868px) {
  .game-page-header-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.game-page-thumb-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  max-width: 100%;
}

.game-page-thumb-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

@media (max-width: 600px) {
  .game-page-hero {
    padding: 16px 0 20px;
    margin-bottom: 20px;
  }
  .game-page-thumb-box {
    border-radius: 10px;
  }
  .game-page-thumb-img {
    height: auto;
    max-height: 200px;
    aspect-ratio: 16 / 10;
  }
}

.game-page-title-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.game-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge-provider {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.badge-category {
  background: var(--color-surface-hover);
  color: var(--color-text);
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
}

.game-page-title {
  font-size: clamp(1.45rem, 5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-text-heading);
  line-height: 1.2;
  margin: 0;
  word-break: break-word;
}

.game-page-lead {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

.game-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
  width: 100%;
}

.game-page-actions .btn-primary {
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 700;
}

.game-page-actions .btn-real {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-page-actions .btn-real:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

@media (max-width: 600px) {
  .game-page-title-box {
    gap: 8px;
  }
  .badge-provider, .badge-category {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
  .game-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .game-page-actions .btn,
  .game-page-actions .btn-primary,
  .game-page-actions .btn-real,
  .game-page-actions .btn-gold,
  .game-page-actions .btn-secondary {
    width: 100%;
    padding: 11px 12px;
    font-size: 0.9rem;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 380px) {
  .game-page-actions {
    grid-template-columns: 1fr;
  }
}

/* Layout Grid & Article Content */
.game-page-content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 992px) {
  .game-page-content-grid {
    grid-template-columns: 100%;
    gap: 28px;
  }
}

.game-page-sidebar,
aside {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  width: 100%;
}

@media (max-width: 992px) {
  .game-page-sidebar,
  aside {
    position: static;
    top: auto;
  }
}

.quick-facts-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
}

.quick-facts-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text-heading);
}

.fact-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.fact-row:last-child {
  border-bottom: none;
}

.fact-label {
  color: var(--color-text-muted);
  font-weight: 500;
  flex: 0 0 42%;
  max-width: 48%;
  line-height: 1.4;
}

.fact-value {
  color: var(--color-text-heading);
  font-weight: 600;
  text-align: right;
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 600px) {
  .quick-facts-card {
    padding: 16px;
    border-radius: 10px;
  }
  .quick-facts-title {
    font-size: 1.05rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  .fact-row {
    padding: 8px 0;
    font-size: 0.85rem;
    gap: 8px;
  }
  .fact-label {
    font-size: 0.82rem;
    flex: 0 0 44%;
    max-width: 46%;
  }
  .fact-value {
    font-size: 0.82rem;
  }
}

/* TOC Boxes */
.toc-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-sizing: border-box;
  width: 100%;
}

@media (min-width: 993px) {
  .mobile-toc-box {
    display: none !important;
  }
}

@media (max-width: 992px) {
  .sidebar-toc-box {
    display: none !important;
  }
}

.toc-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--color-text-heading);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-list a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-word;
  line-height: 1.4;
}

.toc-list a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .toc-box,
  .mobile-toc-box {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  .toc-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
  .toc-list {
    gap: 6px;
  }
  .toc-list a {
    font-size: 0.85rem;
  }
}

/* Editorial Article Content */
.editorial-article {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.editorial-article h2 {
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 700;
  color: var(--color-text-heading);
  margin-top: 36px;
  margin-bottom: 16px;
  scroll-margin-top: 90px;
  line-height: 1.3;
}

.editorial-article h3 {
  font-size: clamp(1.05rem, 3.8vw, 1.25rem);
  font-weight: 600;
  color: var(--color-text-heading);
  margin-top: 24px;
  margin-bottom: 12px;
  line-height: 1.35;
}

.editorial-article p {
  margin-bottom: 20px;
}

.editorial-article ul, .editorial-article ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.editorial-article li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .editorial-article {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .editorial-article h2 {
    margin-top: 28px;
    margin-bottom: 12px;
    scroll-margin-top: 75px;
  }
  .editorial-article h3 {
    margin-top: 20px;
    margin-bottom: 8px;
  }
  .editorial-article p {
    margin-bottom: 16px;
  }
  .editorial-article ul, .editorial-article ol {
    margin-bottom: 18px;
    padding-left: 18px;
  }
  .editorial-article li {
    margin-bottom: 6px;
  }
}

/* Responsive Tables */
.editorial-table-wrapper,
.table-wrapper,
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border-radius: 12px;
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--color-border, #e2e8f0);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
  display: block;
}

.spec-table,
.specs-table,
.editorial-table,
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text, #334155);
}

.spec-table thead,
.specs-table thead,
.editorial-table thead,
.comparison-table thead {
  background: #0f172a;
}

.spec-table th,
.specs-table th,
.editorial-table th,
.comparison-table th {
  padding: 14px 18px;
  text-align: left;
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--color-gold, #f4b740);
  white-space: nowrap;
}

.spec-table th:first-child,
.specs-table th:first-child,
.editorial-table th:first-child,
.comparison-table th:first-child {
  border-top-left-radius: 11px;
}

.spec-table th:last-child,
.specs-table th:last-child,
.editorial-table th:last-child,
.comparison-table th:last-child {
  border-top-right-radius: 11px;
}

.spec-table td,
.specs-table td,
.editorial-table td,
.comparison-table td {
  padding: 14px 18px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s ease;
}

.spec-table tbody tr:nth-child(even),
.specs-table tbody tr:nth-child(even),
.editorial-table tbody tr:nth-child(even),
.comparison-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

.spec-table tbody tr:hover,
.specs-table tbody tr:hover,
.editorial-table tbody tr:hover,
.comparison-table tbody tr:hover {
  background-color: rgba(244, 183, 64, 0.06);
}

.spec-table tbody tr:last-child td,
.specs-table tbody tr:last-child td,
.editorial-table tbody tr:last-child td,
.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table td strong,
.specs-table td strong,
.editorial-table td strong,
.comparison-table td strong {
  color: #0f172a;
  font-weight: 700;
}

@media (max-width: 768px) {
  .editorial-table-wrapper,
  .table-wrapper,
  .table-responsive {
    margin: 1.25rem 0;
    border-radius: 8px;
  }
  .spec-table,
  .specs-table,
  .editorial-table,
  .comparison-table {
    font-size: 0.82rem;
    line-height: 1.45;
    min-width: 460px;
  }
  .spec-table th,
  .specs-table th,
  .editorial-table th,
  .comparison-table th {
    padding: 10px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
  }
  .spec-table td,
  .specs-table td,
  .editorial-table td,
  .comparison-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}

.spec-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.spec-badge-gold {
  background: rgba(244, 183, 64, 0.15);
  color: #92400e;
  border: 1px solid rgba(244, 183, 64, 0.4);
}

/* Article Image Spacers & Figures */
.article-image-placeholder {
  margin: 32px 0;
  display: block;
  width: 100%;
}

.article-image-placeholder__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-surface, #f8fafc);
  border: 2px dashed #a855f7;
  border-radius: 12px;
  padding: 32px 20px;
  min-height: 220px;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  box-sizing: border-box;
}

.article-image-placeholder__box strong {
  color: var(--color-text-heading, #1e1b4b);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.article-image-placeholder__box span {
  color: var(--color-text-muted, #475569);
  font-size: 0.9rem;
  max-width: 520px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.article-image-placeholder__box small {
  color: #7e22ce;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(168, 85, 247, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.article-image-placeholder figcaption,
.article-figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--color-text-muted, #64748b);
  text-align: center;
  line-height: 1.4;
  font-style: italic;
}

.article-figure {
  margin: 32px 0;
  text-align: center;
  width: 100%;
}

.article-figure img,
.article-figure-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--color-border, #e2ddf3);
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(18, 26, 58, 0.06);
}

.article-image-spacer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: 12px;
  padding: 40px 24px;
  min-height: 220px;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
  width: 100%;
}

.article-image-spacer:hover {
  border-color: var(--color-gold);
  background: var(--color-surface-hover);
}

.article-image-spacer img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.image-spacer-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--color-gold);
  opacity: 0.85;
}

.image-spacer-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text-heading);
  margin-bottom: 6px;
}

.image-spacer-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.image-spacer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-gold);
}

@media (max-width: 600px) {
  .article-image-placeholder,
  .article-figure {
    margin: 20px 0;
  }
  .article-image-placeholder__box,
  .article-image-spacer {
    padding: 20px 14px;
    min-height: 160px;
    border-radius: 10px;
  }
  .article-image-placeholder__box strong,
  .image-spacer-title {
    font-size: 0.95rem;
  }
  .article-image-placeholder__box span,
  .image-spacer-desc {
    font-size: 0.82rem;
  }
  .article-figure img,
  .article-figure-img {
    border-radius: 8px;
  }
  .article-figcaption {
    font-size: 0.8rem;
    margin-top: 6px;
  }
}

/* FAQ Accordion */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
  width: 100%;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text-heading);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
}

.faq-answer {
  padding: 0 20px 16px 20px;
  color: var(--color-text-muted);
  line-height: 1.6;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .faq-accordion {
    gap: 10px;
    margin-top: 16px;
  }
  .faq-question {
    padding: 12px 14px;
    font-size: 0.95rem;
    gap: 8px;
  }
  .faq-answer {
    padding: 0 14px 14px 14px;
    font-size: 0.88rem;
    line-height: 1.55;
  }
}

/* Responsible Box */
.responsible-box {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: 10px;
  padding: 20px;
  margin-top: 40px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
}

.responsible-box-icon {
  background: #F59E0B;
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.responsible-box-text {
  font-size: 0.92rem;
  color: #92400E;
  margin: 0;
  line-height: 1.5;
}

.responsible-box-text a {
  color: #78350F;
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .responsible-box {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    margin-top: 28px;
  }
  .responsible-box-icon {
    align-self: flex-start;
    font-size: 0.8rem;
    padding: 3px 6px;
  }
  .responsible-box-text {
    font-size: 0.85rem;
  }
}

/* Article Meta Bar */
.article-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  margin-top: 40px;
  border-top: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  width: 100%;
}

@media (max-width: 600px) {
  .article-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 16px;
    margin-top: 28px;
    font-size: 0.8rem;
  }
}

/* Multiplier Values */
.multiplier-values-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
  width: 100%;
}

.multiplier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (max-width: 600px) {
  .multiplier-values-flex {
    gap: 6px;
    margin: 8px 0 16px;
  }
  .multiplier-badge {
    padding: 4px 10px;
    font-size: 0.82rem;
    border-radius: 6px;
  }
}

/* Related Games Grid in Game Review Pages */
@media (max-width: 640px) {
  .game-grid,
  #related-games-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

/* Dark Background Yellow Link Styling in Game Pages */
.game-detail-hero a:not(.btn):not(.btn-primary):not(.btn-secondary):not(.btn-gold),
.game-card-overlay a:not(.btn),
.demo-player-modal a:not(.btn),
.dark-section a:not(.btn),
[data-theme="dark"] a:not(.btn) {
  color: var(--color-gold, #F4B740) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

@media (max-width: 991px) {
  .game-detail-hero a:not(.btn),
  .demo-player-modal a:not(.btn) {
    color: var(--color-gold, #F4B740) !important;
  }
}
