/* Gaming Cinema — shared stylesheet v2 */
:root {
  --accent: #8B0000;
  --accent-light: #b71c1c;
  --accent-soft: #fbe9e9;
  --dark: #1a1a1a;
  --text: #2a2a2a;
  --muted: #666;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --bg-card: #ffffff;
  --border: #e6e6e8;
  --sidebar-width: 260px;
  --max-content: 1100px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--bg-soft);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
header.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand a {
  color: var(--accent);
  font-weight: 800;
  font-size: 1.35em;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand .tagline {
  color: var(--muted);
  font-size: 0.82em;
  font-weight: 400;
  display: block;
  margin-top: 2px;
}
nav.primary a {
  color: var(--dark);
  margin-left: 18px;
  font-size: 0.95em;
  font-weight: 500;
}
nav.primary a:hover { color: var(--accent); }
.sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  font-size: 1.2em;
  padding: 4px 12px;
  cursor: pointer;
  border-radius: 6px;
  color: var(--dark);
}

/* Layout with sidebar */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  max-width: 1400px;
  margin: 0 auto;
  gap: 0;
}

aside.sidebar {
  background: var(--bg);
  border-right: 1px solid var(--border);
  min-height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.sidebar-inner { padding: 24px 16px 24px 24px; }
.sidebar-section { margin-bottom: 28px; }
.sidebar-section h4 {
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
  padding-left: 8px;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li { margin: 0; }
.sidebar-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9em;
  transition: background 0.12s;
  text-decoration: none;
}
.sidebar-list a:hover { background: var(--bg-soft); color: var(--accent); }
.sidebar-list a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-list .count {
  color: var(--muted);
  font-size: 0.85em;
  background: var(--bg-soft);
  padding: 1px 8px;
  border-radius: 100px;
  margin-left: 6px;
}
.sidebar-list a.active .count {
  background: var(--accent);
  color: white;
}

main {
  padding: 32px 24px 80px;
  min-width: 0;
}

/* Hero */
.hero {
  text-align: center;
  padding: 16px 0 24px;
}
.hero h1 {
  color: var(--accent);
  font-size: 2.2em;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.hero .lead {
  font-size: 1.08em;
  color: var(--muted);
  margin: 0 auto;
  max-width: 720px;
}

/* Search */
.search-bar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 20px 0 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.search-bar input[type="search"] {
  flex: 1 1 280px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 1em;
  background: var(--bg-soft);
  outline: none;
  transition: border-color 0.15s;
}
.search-bar input[type="search"]:focus {
  border-color: var(--accent);
  background: var(--bg);
}
.results-count {
  font-size: 0.85em;
  color: var(--muted);
  margin-left: auto;
}

/* Active filter banner */
.active-filter {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.9em;
}
.active-filter .filter-label {
  color: var(--muted);
  font-weight: 500;
}
.active-filter .filter-value {
  color: var(--accent);
  font-weight: 700;
}
.active-filter a {
  margin-left: auto;
  font-size: 0.85em;
}

/* Game grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.game-card a.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.game-card .thumb {
  aspect-ratio: 16/9;
  background: #000 center/cover no-repeat;
  position: relative;
}
.game-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4));
}
.game-card .meta {
  padding: 13px 15px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-card h3 {
  margin: 0 0 5px;
  font-size: 1em;
  color: var(--dark);
  line-height: 1.3;
}
.game-card .submeta {
  font-size: 0.8em;
  color: var(--muted);
  margin-bottom: 10px;
}
.game-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}
.game-card .tag {
  font-size: 0.7em;
  padding: 2px 8px;
  background: var(--bg-soft);
  border-radius: 100px;
  color: var(--muted);
}
.game-card .badge-age {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(183, 28, 28, 0.95);
  color: white;
  font-size: 0.72em;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  z-index: 1;
}
.game-card .badge-chapters {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.75);
  color: white;
  font-size: 0.7em;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}

.no-results {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Game page */
.game-page {
  max-width: var(--max-content);
  margin: 0 auto;
}

.game-hero {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.game-hero h1 {
  color: var(--accent);
  font-size: 1.9em;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.game-hero .subtitle {
  color: var(--muted);
  font-size: 1.02em;
  margin: 0 0 14px;
  font-style: italic;
}
.game-hero .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.meta-pill {
  font-size: 0.78em;
  padding: 4px 12px;
  background: var(--bg-soft);
  border-radius: 100px;
  color: var(--text);
  border: 1px solid var(--border);
}
.age-pill {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #f5cccc;
  font-weight: 600;
}

.seo-keywords {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0 24px;
  font-size: 0.82em;
  color: var(--muted);
  line-height: 1.5;
}
.seo-keywords strong { color: var(--accent); font-weight: 600; }

.specs {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 16px 22px;
  margin: 24px 0;
  font-size: 0.92em;
}
.specs strong { color: var(--accent); }
.specs p { margin: 0; }

.video-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 20px 0;
}
.video-block h2 {
  margin: 0 0 6px;
  color: var(--dark);
  font-size: 1.3em;
}
.video-block .duration {
  font-size: 0.85em;
  color: var(--muted);
  margin-bottom: 14px;
}
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.guide {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin: 24px 0;
}
.guide h2 {
  color: var(--dark);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-top: 0;
  font-size: 1.4em;
}
.guide p {
  font-size: 1em;
  color: var(--text);
}

/* Chapters section */
.chapters {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin: 24px 0;
}
.chapters h2 {
  color: var(--dark);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin-top: 0;
  font-size: 1.4em;
}
.chapters-intro {
  color: var(--muted);
  font-size: 0.95em;
  margin: 8px 0 24px;
}
.chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: chapter;
}
.chapter-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85em;
}
.chapter-body { flex: 1; }
.chapter-body h3 {
  margin: 0 0 4px;
  color: var(--dark);
  font-size: 1.02em;
  font-weight: 600;
}
.chapter-body p {
  margin: 0;
  color: var(--text);
  font-size: 0.94em;
  line-height: 1.55;
}

.back-link {
  display: inline-block;
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 500;
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 28px 24px;
  margin-top: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88em;
}
}

footer.site-footer a {
  color: var(--accent);
  text-decoration: none;
}
footer.site-footer a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  aside.sidebar {
    position: fixed;
    top: 0; left: -300px;
    width: 280px; height: 100vh;
    z-index: 100;
    transition: left 0.25s ease;
    overflow-y: auto;
  }
  aside.sidebar.open { left: 0; }
  .sidebar-toggle { display: block; }
}
@media (max-width: 600px) {
  .games-grid { grid-template-columns: 1fr; }
}

/* Collapsible sidebar sections */
.sidebar-section.collapsible .section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin: 0 0 10px;
  padding: 4px 0;
}
.sidebar-section.collapsible .section-toggle:hover {
  color: var(--accent, #f5b341);
}
.sidebar-section.collapsible .chevron {
  font-size: 0.78em;
  transition: transform 0.2s ease;
  opacity: 0.6;
}
.sidebar-section.collapsible.collapsed .chevron {
  transform: rotate(-90deg);
}
.sidebar-section.collapsible.collapsed .sidebar-list {
  display: none;
}
