/*
Theme Name: Elegant PCG Theme (Dark Edition)
Theme URI: https://playco-opgame.com/
Author: Custom Build
Description: Dark Theme รีดีไซน์หน้าโพสต์แบบ Game Description First เน้น SEO อ่านง่าย สบายตา เห็น Featured Video ตั้งแต่เข้าหน้าโพสต์ รองรับ Custom Field, Ads, Widgets เดิม และปรับ [pcg_info] / [howtomulti_info] โดยไม่มี WooCommerce
Version: 3.0.0
Text Domain: elegant-pcg
*/

:root {
  --bg: #101216;
  --panel: #171b21;
  --panel2: #1d232b;
  --line: #2a313b;
  --text: #edf1f5;
  --muted: #9aa5b2;
  --accent: #55a9ff;
  --green: #63d6a0;
  --red: #ff8585;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 "Inter", "Noto Sans Thai", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header {
  height: 74px;
  border-bottom: 1px solid var(--line);
  background: #12161b;
  position: sticky;
  top: 0;
  z-index: 60;
}
.header-inner {
  max-width: var(--max);
  height: 100%;
  margin: auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.4px;
  font-size: 18px;
  line-height: 1.15;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #071421;
  display: grid;
  place-items: center;
  font-size: 23px;
  font-weight: 900;
}
.brand-light { color: var(--accent); }
.brand small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.5px;
  margin-top: 5px;
  font-weight: 600;
}
.primary-menu, .site-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  color: #b8c1cb;
  font-size: 13px;
  align-items: center;
}
.site-nav a:hover, .primary-menu a:hover, .text-link:hover { color: var(--accent); }

/* Page Wrap & Breadcrumbs */
.page-wrap { max-width: var(--max); margin: auto; padding: 0 24px; }
.breadcrumbs {
  display: flex;
  gap: 11px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
}
.breadcrumbs a:hover { color: var(--accent); }

/* Layout Grid */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 34px;
  align-items: start;
}
.content { min-width: 0; }

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: minmax(220px, 38%) 1fr;
  gap: 26px;
  align-items: center;
  padding: 0 0 30px;
  border-bottom: 1px solid var(--line);
}
.cover {
width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 310px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.eyebrow, .kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: var(--accent);
  text-transform: uppercase;
}
h1 {
  font-size: clamp(27px, 3.2vw, 38px);
  line-height: 1.17;
  letter-spacing: -1px;
  margin: 9px 0 13px;
  color: #ffffff;
}
.intro {
  color: #b9c2cc;
  margin: 0 0 15px;
  font-size: 15px;
  line-height: 1.65;
}
.meta { display: flex; gap: 7px; flex-wrap: wrap; }
.meta span {
  font-size: 11px;
  color: #c4cfda;
  border: 1px solid var(--line);
  background: #1a2027;
  padding: 4px 9px;
  border-radius: 5px;
}
.updated { font-size: 11px; color: #7f8b98; margin: 12px 0 0; }

/* Featured Video - เห็นทันทีตั้งแต่เปิดหน้าโพสต์ */
.featured-video-strip {
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--line);
}
.video-box {
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0c10;
}
.video-box__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
.video-box__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-box__bar {
  padding: 9px 14px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.video-box__bar a { color: var(--accent); }

/* Quick Overview */
.quick-section { padding: 30px 0 32px; border-bottom: 1px solid var(--line); }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
}
h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.45px;
  margin: 5px 0 17px;
  color: #ffffff;
}
.source-tag {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 19px;
  white-space: nowrap;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 13px;
  min-height: 110px;
}
.quick-label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.1px;
  font-weight: 800;
  margin-bottom: 8px;
}
.quick-card strong { display: block; font-size: 17px; line-height: 1.3; }
.quick-card small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 7px;
  line-height: 1.4;
}
.yes { color: var(--green); }
.no { color: #d2d8df; }

.data-note {
  font-size: 12px;
  line-height: 1.6;
  color: #b5c0cb;
  background: #1b222a;
  border-left: 3px solid #d7a85b;
  padding: 11px 14px;
  margin: 14px 0 0;
  border-radius: 0 6px 6px 0;
}

/* Sections & Feature Table */
.section { padding: 31px 0; border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 8px; }
.section-lead { color: var(--muted); font-size: 13px; margin: 0 0 17px; }
.section p, .pcg-prose p { color: #b8c2cc; font-size: 14px; }
.pcg-prose a { color: var(--accent); text-decoration: underline; }

.feature-table {
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-top: 17px;
}
.table-head, .feature-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 15px;
}
.table-head {
  background: #202731;
  color: #8f9baa;
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 800;
}
.feature-row { font-size: 13px; border-top: 1px solid var(--line); min-height: 49px; }
.feature-row:nth-child(odd) { background: rgba(255, 255, 255, 0.018); }
.feature-row > span:last-child { color: var(--muted); font-size: 12px; }
.status { font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.status:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.supported { color: var(--green); }
.unsupported { color: #a6b0bb; }

.game-facts { border-top: 1px solid var(--line); margin-top: 20px; }
.game-facts div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.game-facts span, .footnote { color: var(--muted); }
.game-facts b { font-weight: 600; color: #dce3ea; }
.footnote { font-size: 11px !important; line-height: 1.55; margin: 10px 0 0; }

/* Store Links */
.store-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 17px; }
.store-links a {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 14px;
  font-size: 12px;
}
.store-links a:hover { border-color: var(--accent); }
.store-links span { color: var(--accent); margin-left: 6px; }

/* Ads Block */
.ads-bannner {
  margin: 22px 0;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: center;
}

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq details:first-of-type { margin-top: 14px; border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 650;
  padding-right: 25px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:after {
  content: "＋";
  position: absolute;
  right: 2px;
  color: var(--accent);
  font-size: 17px;
  top: -3px;
}
.faq details[open] summary:after { content: "−"; }
.faq details p { font-size: 13px; margin: 9px 0 2px; color: var(--muted); }

/* Related Grid */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.related-grid a {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 8px;
  min-height: 93px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.related-grid a:hover { border-color: #477eae; }
.related-grid b { font-size: 13px; }
.related-type { font-size: 9px; color: var(--accent); letter-spacing: 0.8px; text-transform: uppercase; }
.text-link { font-size: 11px; color: var(--accent); white-space: nowrap; }
.editor-note { color: #7f8b98; font-size: 11px; padding: 18px 0 28px; }

/* Sidebar */
.sidebar { position: sticky; top: 90px; display: grid; gap: 14px; }
.side-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px;
}
.side-card h3 {
  font-size: 10px;
  letter-spacing: 1.3px;
  color: #a5b0bc;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.side-card > a, .side-card ul a {
  display: block;
  color: #c2cbd4;
  font-size: 12px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.side-card > a:hover, .side-card ul a:hover { color: var(--accent); }
.side-card ul { list-style: none; margin: 0; padding: 0; }
.side-card .widget { background: transparent; border: 0; padding: 0; margin: 0; }
.side-card .widget-title {
  font-size: 10px;
  letter-spacing: 1.3px;
  color: #a5b0bc;
  margin: 0 0 10px;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 11px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.footer-bottom a { color: #dce4eb; font-weight: 700; }

/* Archive / Index Cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.post-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.post-card__body { padding: 16px; }
.post-card__title { margin: 0 0 8px; font-size: 16px; line-height: 1.35; }
.post-card__title a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .cover {  aspect-ratio: 1 / 1;max-height: none;  }
}
@media (max-width: 700px) {
  .header-inner { padding: 0 17px; }
  .site-nav, .primary-menu { display: none; }
  .page-wrap { padding: 0 17px; }
  .layout { display: block; }
  .sidebar { position: static; grid-template-columns: 1fr 1fr; margin: 8px 0 25px; }
  .hero { grid-template-columns: 1fr; gap: 17px; }
  .cover { max-height: 240px; }
  .quick-grid { gap: 8px; }
  .quick-card { min-height: 100px; }
  .table-head, .feature-row { grid-template-columns: 1.05fr 0.95fr; gap: 8px; padding: 10px; }
  .table-head span:last-child { display: none; }
  .feature-row > span:last-child { grid-column: 1 / -1; margin-top: -5px; padding-left: 2px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid a { min-height: 72px; }
  .section-heading { align-items: flex-start; }
  .source-tag { margin-top: 7px; }
  .footer-bottom { gap: 10px; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  h1 { font-size: 27px; }
  .quick-card strong { font-size: 15px; }
  .quick-card { padding: 12px 10px; }
  .sidebar { grid-template-columns: 1fr; }
  .game-facts div { grid-template-columns: 90px 1fr; }
}
