/*
Theme Name: GameOffline Dark
Theme URI: https://gamecuhay.com
Author: GameCuHay
Author URI: https://gamecuhay.com
Description: Dark gaming theme với sidebar danh mục và product grid
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: gameoffline
Tags: dark, gaming, e-commerce, blog
*/

/* ===========================
   CSS VARIABLES
=========================== */
:root {
  --bg-primary: #0d0d0f;
  --bg-secondary: #161618;
  --bg-card: #1a1a1e;
  --bg-card-hover: #1e1e24;
  --accent: #6c5ce7;
  --accent-hover: #7d6df0;
  --accent-2: #e84393;
  --text-primary: #f0f0f2;
  --text-secondary: #9a9aa8;
  --text-muted: #5a5a6a;
  --border: #2a2a35;
  --border-light: #333340;
  --badge-hot: #e84393;
  --badge-sold: #6b7280;
  --price-main: #6c5ce7;
  --price-old: #5a5a6a;
  --discount: #e84393;
  --btn-bg: #6c5ce7;
  --btn-hover: #7d6df0;
  --sidebar-active: #6c5ce7;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.3);
  --font-main: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Ngăn flash khi load trang ở light mode */
html.preload-light body { background-color: #f4f4f7; }
html.preload-dark body  { background-color: #0d0d0f; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* ===========================
   TYPOGRAPHY
=========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

/* ===========================
   HEADER
=========================== */
#site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}

.site-logo {
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.site-logo span { color: var(--accent); }

/* Primary nav */
#primary-nav { flex: 1; }

#primary-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

#primary-nav ul li a {
  display: block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all .2s;
}

#primary-nav ul li a:hover,
#primary-nav ul li.current-menu-item > a,
#primary-nav ul li.current_page_item > a {
  color: var(--text-primary);
  background: rgba(108,92,231,0.15);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-search {
  position: relative;
}

.header-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 7px 36px 7px 14px;
  font-size: 13px;
  width: 220px;
  outline: none;
  transition: border-color .2s;
  font-family: var(--font-main);
}

.header-search input:focus { border-color: var(--accent); }
.header-search input::placeholder { color: var(--text-muted); }

.header-search button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  display: flex;
}

.btn-login {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font-main);
  text-decoration: none;
}

.btn-login:hover { border-color: var(--accent); color: var(--accent); }

.btn-register {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font-main);
  text-decoration: none;
}

.btn-register:hover { background: var(--accent-hover); color: #fff; }

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  cursor: pointer;
}

/* ===========================
   BREADCRUMB
=========================== */
.breadcrumb-wrap {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 0 14px 0;
  margin-bottom: 4px;
}

.breadcrumb-wrap .container {
  /* breadcrumb now inside main content, no need for max-width container */
  max-width: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-wrap a { color: var(--text-muted); }
.breadcrumb-wrap a:hover { color: var(--accent); }
.breadcrumb-wrap span.sep { margin: 0 8px; }
.breadcrumb-wrap span.current { color: var(--text-secondary); }

/* ===========================
   MAIN LAYOUT
=========================== */
#content-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: grid;
  grid-template-columns: 220px 1fr; /* default; overridden by Customizer */
  gap: 28px;
  align-items: start;
}

#content-wrap.no-sidebar {
  grid-template-columns: 1fr;
}

/* ===========================
   SIDEBAR
=========================== */
#sidebar {
  position: sticky;
  top: 88px;
  background: transparent; /* Mặc định trong suốt; Customizer: sidebar_col_bg */
}

.sidebar-widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md); /* Customizer: sidebar_widget_radius */
  overflow: hidden;
  margin-bottom: 20px; /* Customizer: sidebar_widget_gap */
}

.widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

/* Category menu in sidebar */
.sidebar-cat-list { padding: 8px 0; }

.sidebar-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all .15s;
}

.sidebar-cat-list li a:hover {
  color: var(--text-primary);
  background: rgba(108,92,231,0.08);
  border-left-color: var(--accent);
}

.sidebar-cat-list li.current-cat > a,
.sidebar-cat-list li.cat-active > a {
  color: var(--text-primary);
  background: rgba(108,92,231,0.12);
  border-left-color: var(--accent);
  font-weight: 600;
}

.cat-count {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
}

/* WP widget areas */
.widget { margin-bottom: 20px; }
.widget ul { padding: 8px 0; }
.widget ul li a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-secondary);
}
.widget ul li a:hover { color: var(--accent); }

/* ===========================
   POSTS GRID (Homepage)
=========================== */
#main-content { min-width: 0; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.card-thumb {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
}

.card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.game-card:hover .card-thumb img { transform: scale(1.04); }

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  z-index: 2;
}

.badge-hot {
  background: var(--badge-hot);
  color: #fff;
}

.badge-sold-out {
  background: var(--badge-sold);
  color: #fff;
}

.card-body {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-excerpt {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price-main {
  font-size: 16px;
  font-weight: 700;
  color: var(--price-main);
}

.price-old {
  font-size: 12px;
  color: var(--price-old);
  text-decoration: line-through;
}

.price-discount {
  font-size: 11px;
  font-weight: 700;
  color: var(--discount);
}

.card-btn {
  display: block;
  background: var(--btn-bg);
  color: #fff;
  text-align: center;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  width: 100%;
}

.card-btn:hover { background: var(--btn-hover); color: #fff; }

.card-btn.btn-disabled {
  background: var(--badge-sold);
  cursor: not-allowed;
}

/* ===========================
   PAGINATION
=========================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all .2s;
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }

.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===========================
   SINGLE POST / PAGE — REDESIGNED
=========================== */
.single-post-layout,
.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  align-items: start;
}

/* ── Entry Header ── */
.entry-header {
  margin-bottom: 28px;
  position: relative;
}

.entry-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(108,92,231,0.15);
  border: 1px solid rgba(108,92,231,0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-decoration: none;
  transition: all .2s;
}
.entry-category-badge:hover {
  background: rgba(108,92,231,0.25);
  color: var(--accent);
}

.entry-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #f0f0f2 60%, #9a9aa8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.entry-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-right: 1px solid var(--border);
}
.entry-meta-item:first-child { padding-left: 0; }
.entry-meta-item:last-child { border-right: none; }

.entry-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
.entry-meta a { color: var(--text-muted); transition: color .2s; }
.entry-meta a:hover { color: var(--accent); }

/* ── Entry Thumbnail with Depth ── */
.entry-thumbnail {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  /* Multi-layer depth shadow */
  box-shadow:
    0 1px 2px rgba(0,0,0,0.4),
    0 4px 16px rgba(0,0,0,0.5),
    0 16px 40px rgba(0,0,0,0.4),
    0 32px 64px rgba(0,0,0,0.25);
}

.entry-thumbnail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(13,13,15,0.7) 100%
  );
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

.entry-thumbnail::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: 2;
}

.entry-thumbnail img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.entry-thumbnail:hover img { transform: scale(1.02); }

/* ── Content Typography ── */
.entry-content {
  font-size: 16px;
  line-height: 1.85;
  color: #c8c8d4;
  font-weight: 400;
}

.entry-content > * + * { margin-top: 1.4em; }

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  margin-top: 2em;
  margin-bottom: 0.6em;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.entry-content h1 {
  font-size: 28px;
  color: #fff;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.entry-content h2 {
  font-size: 22px;
  color: #f0f0f2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.entry-content h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  border-radius: 2px;
  flex-shrink: 0;
}

.entry-content h3 {
  font-size: 18px;
  color: #e0e0ea;
}
.entry-content h3::before {
  content: none;
}

.entry-content h4 { font-size: 16px; color: #d0d0dc; }

.entry-content p { margin-bottom: 0; }

.entry-content ul,
.entry-content ol {
  padding-left: 0;
  margin: 0;
}

.entry-content ul li,
.entry-content ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: #c8c8d4;
}

.entry-content ul li::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.entry-content ol {
  counter-reset: ol-counter;
}
.entry-content ol li {
  counter-increment: ol-counter;
}
.entry-content ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(108,92,231,0.4);
  text-underline-offset: 3px;
  transition: all .2s;
}
.entry-content a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}

/* Images inside content — depth effect */
.entry-content img {
  border-radius: var(--radius-md);
  margin: 28px auto; /* Customizer: content_img_margin */
  display: block;
  max-width: 100%;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.4),
    0 8px 24px rgba(0,0,0,0.4),
    0 24px 48px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform .4s ease, box-shadow .4s ease; /* Customizer: img_hover_transition */
}
.entry-content img:hover {
  /* Customizer: img_hover_lift, img_hover_scale, img_hover_shadow_level */
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.5),
    0 16px 40px rgba(0,0,0,0.5),
    0 32px 64px rgba(0,0,0,0.35);
}

.entry-content figure {
  margin: 28px 0; /* Customizer: figure_margin */
}
.entry-content figcaption {
  text-align: center; /* Customizer: caption_align */
  font-size: 13px; /* Customizer: caption_font_size */
  color: var(--text-muted);
  margin-top: 10px; /* Customizer: caption_margin_top */
  font-style: italic;
}

.entry-content blockquote {
  position: relative;
  border: none;
  padding: 24px 28px 24px 52px;
  margin: 32px 0;
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(232,67,147,0.05));
  border-radius: var(--radius-md);
  border-left: none;
  overflow: hidden;
}
.entry-content blockquote::before {
  content: '"';
  position: absolute;
  left: 14px;
  top: 8px;
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
  font-family: Georgia, serif;
}
.entry-content blockquote::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  border-radius: 0 2px 2px 0;
}
.entry-content blockquote p {
  color: var(--text-primary);
  font-style: italic;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.entry-content pre, .entry-content code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
}
.entry-content code { padding: 2px 7px; color: #e84393; }
.entry-content pre { padding: 18px 20px; overflow-x: auto; margin: 20px 0; }
.entry-content pre code { border: none; padding: 0; background: none; color: inherit; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.entry-content th,
.entry-content td {
  padding: 10px 16px;
  border: 1px solid var(--border);
  text-align: left;
}
.entry-content th {
  background: rgba(108,92,231,0.12);
  color: var(--text-primary);
  font-weight: 600;
}
.entry-content tr:nth-child(even) td {
  background: rgba(255,255,255,0.02);
}

/* ── Entry Tags ── */
.entry-tags {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.entry-tags-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}
.entry-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all .2s;
}
.entry-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,92,231,0.1);
}

/* ── Post Navigation ── */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
}
.post-nav-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: all .2s;
  min-width: 0;
}
.post-nav-item:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
}
.post-nav-item a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.post-nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.post-nav-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-nav-item--next { text-align: right; }

/* ── Product box on single post ── */
.product-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin: 28px 0;
  position: relative;
  overflow: hidden;
}
.product-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent-2));
}
.product-box .price-main { font-size: 26px; }
.product-box .price-old { font-size: 14px; }
.product-box .card-btn { margin-top: 16px; padding: 12px; font-size: 14px; }

/* Post sidebar (right on single) */
.post-sidebar { position: sticky; top: 88px; }

/* ===========================
   RELATED POSTS SECTION
=========================== */
.related-posts {
  margin-top: 48px; /* Customizer: related_margin_top */
  padding-top: 36px;
}

.related-posts-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.related-posts-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin: 0;
}

.related-posts-title-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.related-posts-title-bar::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  border-radius: 2px;
  flex-shrink: 0;
}

.related-posts-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(108,92,231,0.4);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(108,92,231,0.15);
}

.related-card-thumb {
  position: relative;
  padding-top: 58%;
  overflow: hidden;
}

.related-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.related-card:hover .related-card-thumb img { transform: scale(1.06); }

.related-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(13,13,15,0.6) 100%);
  pointer-events: none;
}

.related-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-card-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}

.related-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.related-card-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.related-card a {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.related-card {
  position: relative;
}



/* ===========================
   COMMENTS — Facebook bubble style
   DOM WordPress: li.comment > .comment-body > (.comment-author.vcard + .comment-meta + .comment-content + .reply)
=========================== */

/* Wrapper */
.comments-area { margin-top: 32px; }

/* Header */
.comments-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.comments-title::before { content: '💬'; font-size: 16px; }

/* List */
.comment-list {
  margin: 0 0 28px 0;
  padding: 0;
  list-style: none;
}

/* ── Mỗi item comment ──
   .comment-body dùng CSS Grid để avatar (cột 1) và nội dung (cột 2) nằm cạnh nhau.
   WordPress HTML: li.comment > div.comment-body > (.comment-author.vcard + .comment-meta + .comment-content + .reply)
*/
li.comment {
  margin-top: 14px;
  padding: 0;
  background: transparent;
  border: none;
}
li.comment:first-child { margin-top: 0; }

/* Grid layout: cột 1 = avatar 38px, cột 2 = nội dung */
.comment-body {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: auto auto auto auto;
  column-gap: 10px;
}

/* ── Cột 1: Avatar (.comment-author.vcard span nhiều row) ── */
.comment-body > .comment-author.vcard {
  grid-column: 1;
  grid-row: 1 / 5;
  align-self: start;
  line-height: 0;
}
.comment-body > .comment-author.vcard img.avatar {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 2px solid var(--border) !important;
  object-fit: cover;
  display: block;
}
/* Ẩn tên trong .comment-author (tên sẽ hiện qua .comment-meta) */
.comment-body > .comment-author.vcard .fn { display: none; }

/* ── Cột 2, Row 1: Tên + Ngày (.comment-meta) ── */
.comment-body > .comment-meta {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  padding: 0;
}

/* Tên tác giả bên trong .comment-meta */
.comment-body > .comment-meta .comment-author,
.comment-body > .comment-meta cite.fn,
.comment-body > .comment-meta b.fn,
.comment-body > .comment-meta strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.comment-body > .comment-meta .comment-author a,
.comment-body > .comment-meta cite.fn a,
.comment-body > .comment-meta b.fn a {
  color: var(--text-primary);
  text-decoration: none;
}

/* Ngày giờ */
.comment-body > .comment-meta .comment-metadata a,
.comment-body > .comment-meta time,
.comment-body > .comment-meta a[href*="#comment"] {
  font-size: 11.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.comment-body > .comment-meta .comment-metadata a:hover { color: var(--text-secondary); text-decoration: underline; }

/* ── Cột 2, Row 2: Bubble nội dung (.comment-content) ── */
.comment-body > .comment-content {
  grid-column: 2;
  grid-row: 2;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 14px 14px 14px;
  padding: 10px 14px;
  transition: border-color .2s;
}
li.comment:hover .comment-body > .comment-content { border-color: var(--border-light); }
li.bypostauthor .comment-body > .comment-content {
  background: rgba(108,92,231,0.07);
  border-color: rgba(108,92,231,0.35);
}
.comment-body > .comment-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
  word-break: break-word;
}
.comment-body > .comment-content p + p { margin-top: 6px; }

/* ── Cột 2, Row 3: Nút Reply (.reply) ── */
.comment-body > .reply {
  grid-column: 2;
  grid-row: 3;
  margin-top: 5px;
  padding: 0;
}
.comment-reply-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
}
.comment-reply-link::before { content: '↩'; font-size: 13px; }
.comment-reply-link:hover { color: var(--accent); }

/* ── Cột 2, Row 4: Awaiting moderation ── */
.comment-awaiting-moderation {
  grid-column: 2;
  grid-row: 4;
  display: inline-block;
  font-size: 11px;
  color: #f0b429;
  background: rgba(240,180,41,0.1);
  border: 1px solid rgba(240,180,41,0.25);
  border-radius: 4px;
  padding: 2px 8px;
  margin-top: 4px;
}

/* Badge "Tác giả" cho bypostauthor */
li.bypostauthor .comment-body > .comment-meta::after {
  content: 'Tác giả';
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  padding: 1px 7px;
  border-radius: 20px;
}

/* ── Nested replies (.children) ── */
.children {
  list-style: none;
  margin: 10px 0 0 19px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}
.children li.comment { margin-top: 10px; }
.children li.comment:first-child { margin-top: 0; }
.children .comment-body {
  grid-template-columns: 30px 1fr;
}
.children .comment-body > .comment-author.vcard img.avatar {
  width: 30px !important;
  height: 30px !important;
}


/* ═══════════════════════════════════════════════════════
   COMMENT FORM — Facebook-style
   ═══════════════════════════════════════════════════════ */
.comment-respond {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.comment-respond::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

#reply-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#reply-title::before {
  content: '✏️';
  font-size: 14px;
}

/* Cancel reply link */
#cancel-comment-reply-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all .15s;
  vertical-align: middle;
}

#cancel-comment-reply-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.comment-notes {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.comment-form-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.comment-form p {
  margin-bottom: 12px;
}

.comment-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-main);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.12);
  background: var(--bg-card-hover);
}

/* Textarea rounded kiểu Facebook */
.comment-form textarea {
  min-height: 90px;
  max-height: 320px;
  resize: vertical;
  border-radius: 20px;
  padding: 12px 18px;
  line-height: 1.55;
}

.comment-form textarea::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.comment-form .form-submit {
  margin-bottom: 0;
  margin-top: 4px;
}

/* Submit button — pill shape */
.comment-form .submit {
  background: linear-gradient(135deg, var(--accent) 0%, #5a4bd1 100%);
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-main);
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.comment-form .submit::before {
  content: '↑';
  font-size: 16px;
  line-height: 1;
}

.comment-form .submit:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #6c5ce7 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}

.comment-form .submit:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Cookie consent */
.comment-form-cookies-consent label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  cursor: pointer;
}

/* ===========================
   FOOTER
=========================== */
#site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  margin-top: 24px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col p { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: var(--text-muted); }
.footer-col ul li a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===========================
   SEARCH RESULTS / ARCHIVE
=========================== */
.archive-header {
  margin-bottom: 24px;
}

.archive-header h1 {
  font-size: 22px;
  font-weight: 700;
}

.archive-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ===========================
   NO POSTS MESSAGE
=========================== */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-posts h3 { font-size: 18px; margin-bottom: 8px; color: var(--text-secondary); }

/* ===========================
   404 PAGE
=========================== */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404 .error-num {
  font-size: 100px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
}

.error-404 h2 { font-size: 24px; margin-bottom: 12px; }
.error-404 p { color: var(--text-muted); margin-bottom: 24px; }

/* Comments now in SINGLE POST section above */


/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  #content-wrap {
    grid-template-columns: 1fr;
    padding: 20px 16px 40px;
    gap: 0;
  }

  #sidebar {
    position: static;
    order: -1;
    margin-bottom: 4px;
  }

  /* Sidebar collapsible toggle button */
  #sidebar-toggle {
    display: none;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
  }
  #sidebar-toggle .toggle-icon {
    transition: transform 0.2s;
    font-size: 10px;
    opacity: 0.6;
  }
  #sidebar.collapsed #sidebar-toggle .toggle-icon { transform: rotate(180deg); }
  #sidebar.collapsed .sidebar-widget { display: none; }

  .single-post-layout,
  .page-layout {
    grid-template-columns: 1fr;
  }

  .entry-title { font-size: 26px; }
  .entry-meta { flex-direction: column; gap: 0; }
  .entry-meta-item { border-right: none; border-bottom: 1px solid var(--border); padding: 10px 0; }
  .entry-meta-item:last-child { border-bottom: none; }

  /* Breadcrumb mobile */
  .breadcrumb-wrap { font-size: 12px; padding-bottom: 10px; }
}

@media (max-width: 700px) {
  /* Header gọn hơn */
  .header-inner { gap: 8px; padding: 0 14px; }
  .header-search input { width: 110px; font-size: 13px; }
  .menu-toggle { display: flex; align-items: center; gap: 6px; }

  /* ── Mobile Nav: full-width slide-down ── */
  #primary-nav {
    display: block;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 8px 0 16px;

    /* hidden by default */
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .2s ease;
  }
  #primary-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  #primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0 16px;
  }
  #primary-nav ul li {
    border-bottom: 1px solid var(--border);
  }
  #primary-nav ul li:last-child { border-bottom: none; }
  #primary-nav ul li a {
    display: flex;
    align-items: center;
    padding: 13px 6px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 0;
    background: none !important;
    color: var(--text-primary);
    transition: color .15s, padding-left .15s;
  }
  #primary-nav ul li a:hover,
  #primary-nav ul li.current-menu-item > a,
  #primary-nav ul li.current_page_item > a {
    color: var(--accent);
    padding-left: 12px;
    background: none !important;
  }

  /* Mobile nav overlay backdrop */
  #mobile-nav-backdrop {
    display: none;
    position: fixed;
    inset: 60px 0 0;
    z-index: 190;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    animation: fadeIn .2s ease;
  }
  #mobile-nav-backdrop.show { display: block; }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  /* Hamburger animate to X */
  .menu-toggle.is-open .bar-top    { transform: translateY(6px) rotate(45deg); }
  .menu-toggle.is-open .bar-mid    { opacity: 0; transform: scaleX(0); }
  .menu-toggle.is-open .bar-bot    { transform: translateY(-6px) rotate(-45deg); }
  .menu-toggle svg rect { transition: transform .2s ease, opacity .15s ease; transform-origin: center; }

  /* Cards */
  .posts-grid { grid-template-columns: 1fr; gap: 12px; }
  .game-card { border-radius: 10px; }
  .card-body { padding: 12px 14px; }
  .card-title a { font-size: 15px; }
  .card-excerpt { font-size: 13px; -webkit-line-clamp: 2; }
  .card-thumb { aspect-ratio: 16/9; }

  .footer-inner { grid-template-columns: 1fr; }
  .entry-title { font-size: 20px; line-height: 1.3; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .post-navigation { grid-template-columns: 1fr; }
  .comment-form-fields-row { grid-template-columns: 1fr; }
  .children { margin-left: 28px; padding-left: 10px; }
  .comment-body { grid-template-columns: 30px 1fr; }
  .comment-body > .comment-author.vcard img.avatar { width: 30px !important; height: 30px !important; }
  .children { margin-left: 15px; padding-left: 10px; }

  /* Article headings mobile */
  .entry-content h2 { font-size: 18px; gap: 8px; }
  .entry-content h2::before { height: 18px; }
  .entry-content h3 { font-size: 16px; }
  .entry-content h4 { font-size: 14px; }

  /* Entry body padding */
  .entry-body { padding: 16px 14px; }

  /* Theme toggle label ẩn trên mobile nhỏ */
  .theme-toggle-label { display: none; }
  .theme-toggle-btn { padding: 6px 8px; }
}

@media (max-width: 480px) {
  #content-wrap { padding: 12px 10px 32px; }
  #site-header { padding: 0 12px; }
  .comment-respond { padding: 16px 12px; }
  .card-btn { font-size: 13px; padding: 8px 14px; }
  .card-price { gap: 6px; }
  .price-main { font-size: 18px; }

  /* Sidebar compact on very small screens */
  .sidebar-cat-list li a { padding: 8px 10px; font-size: 13px; }
  .widget-title { font-size: 11px; padding: 8px 10px; }
}

/* ===========================
   SCROLL TO TOP BUTTON
=========================== */
#scroll-to-top {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #5a4bd1);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(108,92,231,0.45), 0 2px 8px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  transition: opacity .3s, transform .3s, background .2s, box-shadow .2s;
  pointer-events: none;
}
#scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#scroll-to-top:hover {
  background: linear-gradient(135deg, var(--accent-hover), #6c5ce7);
  box-shadow: 0 6px 28px rgba(108,92,231,0.6), 0 2px 8px rgba(0,0,0,0.4);
  transform: translateY(-2px) scale(1.05);
}
#scroll-to-top svg { width: 18px; height: 18px; }

/* ===========================
   DARK / LIGHT MODE TOGGLE
=========================== */

/* ── Default (dark mode): sun visible, moon hidden ── */
.theme-toggle-btn .icon-light { display: block; }
.theme-toggle-btn .icon-dark  { display: none;  }

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px 6px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-main);
  transition: all .2s;
  white-space: nowrap;
  user-select: none;
}
.theme-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,92,231,0.07);
}
.theme-toggle-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.theme-toggle-label { font-size: 12px; font-weight: 600; letter-spacing: .3px; }
/* ════════════════════════════════════════
   LIGHT MODE — Toàn bộ giao diện sáng
   Kích hoạt bằng body.light-mode (JS toggle)
════════════════════════════════════════ */
body.light-mode {
  /* CSS Variables — ghi đè toàn bộ */
  --bg-primary:    #f4f4f7;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f0f0f5;
  --text-primary:  #1a1a2e;
  --text-secondary:#3a3a55;
  --text-muted:    #7070a0;
  --border:        #dddde8;
  --border-light:  #c8c8da;
  --price-old:     #9090b0;
  --shadow:        0 4px 24px rgba(0,0,0,0.1);
  --shadow-card:   0 2px 16px rgba(0,0,0,0.08);

  background-color: #f4f4f7;
  color: #3a3a55;
}

/* Header */
body.light-mode #site-header {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 0 #dddde8, 0 4px 16px rgba(0,0,0,0.06);
  border-bottom: 1px solid #dddde8;
}
body.light-mode .site-logo { color: #1a1a2e; }
body.light-mode .site-logo span { color: var(--accent); }
body.light-mode #primary-nav a { color: #3a3a55; }
body.light-mode #primary-nav a:hover { color: var(--accent); }
body.light-mode .header-search input {
  background: #eeeef4;
  border-color: #dddde8;
  color: #1a1a2e;
}
body.light-mode .header-search input::placeholder { color: #9090b0; }
body.light-mode .header-search button { color: #7070a0; }
body.light-mode .menu-toggle { color: #3a3a55; }

/* Breadcrumb */
body.light-mode .breadcrumb-wrap { color: #9090b0; }
body.light-mode .breadcrumb-wrap a { color: #9090b0; }
body.light-mode .breadcrumb-wrap span.current { color: #3a3a55; }

/* Sidebar */
body.light-mode #sidebar { background: transparent; }
body.light-mode .sidebar-widget {
  background: #ffffff;
  border: 1px solid #dddde8;
}
body.light-mode .widget-title {
  background: #f0f0f5;
  color: #5a5a80;
  border-bottom: 1px solid #dddde8;
}
body.light-mode .sidebar-cat-list li a {
  color: #3a3a55;
}
body.light-mode .sidebar-cat-list li a:hover {
  background: #f0f0f5;
  color: var(--accent);
}
body.light-mode .sidebar-cat-list li.current-cat > a,
body.light-mode .sidebar-cat-list li.cat-active > a {
  background: rgba(108,92,231,0.08);
  color: var(--accent);
  border-left-color: var(--accent);
}
body.light-mode .cat-count {
  background: #ededf5;
  color: #7070a0;
}

/* Game cards */
body.light-mode .game-card {
  background: #ffffff;
  border: 1px solid #dddde8;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
body.light-mode .game-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  border-color: #c8c8da;
}
body.light-mode .card-title a { color: #1a1a2e; }
body.light-mode .card-title a:hover { color: var(--accent); }
body.light-mode .card-excerpt { color: #7070a0; }
body.light-mode .price-main { color: var(--accent); }
body.light-mode .price-old { color: #9090b0; }

/* Archive header */
body.light-mode .archive-header h1 { color: #1a1a2e; }
body.light-mode .archive-header p { color: #7070a0; }

/* Single post */
body.light-mode .entry-header { background: transparent; }
body.light-mode .entry-title {
  color: #1a1a2e;
  background: none;
  -webkit-text-fill-color: #1a1a2e;
}
body.light-mode .entry-meta { border-color: #dddde8; background: #fafafa; }
body.light-mode .entry-meta-item { color: #7070a0; border-color: #dddde8; }
body.light-mode .entry-meta-item strong { color: #3a3a55; }
body.light-mode .entry-body { background: #ffffff; border: 1px solid #dddde8; }
body.light-mode .entry-thumbnail { box-shadow: 0 2px 16px rgba(0,0,0,0.1); }

/* Content typography */
body.light-mode .entry-content { color: #3a3a55; }
body.light-mode .entry-content h2 { color: #1a1a2e; }
body.light-mode .entry-content h2::before {
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
}
body.light-mode .entry-content h3,
body.light-mode .entry-content h4,
body.light-mode .entry-content h5,
body.light-mode .entry-content h6 { color: #2a2a48; }
body.light-mode .entry-content p { color: #3a3a55; }
body.light-mode .entry-content a { color: var(--accent); }
body.light-mode .entry-content ul li,
body.light-mode .entry-content ol li { color: #3a3a55; }
body.light-mode .entry-content ul li::before { color: var(--accent); }
body.light-mode .entry-content strong { color: #1a1a2e; }
body.light-mode .entry-content em { color: #3a3a55; }
body.light-mode .entry-content blockquote {
  background: rgba(108,92,231,0.05);
  border-left-color: var(--accent);
  color: #5a5a80;
}
body.light-mode .entry-content blockquote::before { color: var(--accent); opacity: 0.3; }
body.light-mode .entry-content pre,
body.light-mode .entry-content code {
  background: #f0f0f8 !important;
  color: #2a2a4a;
  border: 1px solid #dddde8;
}
body.light-mode .entry-content table th { background: #eeeef5; color: #1a1a2e; border-color: #dddde8; }
body.light-mode .entry-content table td { border-color: #dddde8; color: #3a3a55; }
body.light-mode .entry-content table tr:nth-child(even) td { background: #f8f8fc; }

/* Product box */
body.light-mode .product-box { background: #f8f8fc; border-color: #dddde8; }
body.light-mode .product-box .price-main { color: var(--accent); }

/* Post navigation */
body.light-mode .post-navigation a { background: #ffffff; border-color: #dddde8; color: #3a3a55; }
body.light-mode .post-navigation a:hover { border-color: var(--accent); }
body.light-mode .post-nav-label { color: #9090b0; }
body.light-mode .post-nav-title { color: #1a1a2e; }

/* Related posts */
body.light-mode .related-posts { background: transparent; }
body.light-mode .related-posts-title { color: #1a1a2e; }
body.light-mode .related-card {
  background: #ffffff;
  border: 1px solid #dddde8;
}
body.light-mode .related-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
body.light-mode .related-card-title { color: #1a1a2e; }
body.light-mode .related-card-cat { color: var(--accent); }
body.light-mode .related-card-meta { color: #9090b0; }

/* Comments */
body.light-mode .comments-title { color: #1a1a2e; border-bottom-color: #dddde8; }
body.light-mode .comment-body > .comment-content { background: #f4f4f9; border-color: #dddde8; }
body.light-mode li.comment:hover .comment-body > .comment-content { border-color: #c8c8da; }
body.light-mode li.bypostauthor .comment-body > .comment-content { background: rgba(108,92,231,0.05); border-color: rgba(108,92,231,0.25); }
body.light-mode .comment-body > .comment-meta .comment-author a,
body.light-mode .comment-body > .comment-meta cite.fn a,
body.light-mode .comment-body > .comment-meta b.fn { color: #1a1a2e; }
body.light-mode .comment-body > .comment-meta .comment-metadata a,
body.light-mode .comment-body > .comment-meta time { color: #9090b0; }
body.light-mode .comment-body > .comment-content p { color: #3a3a55; }
body.light-mode .comment-reply-link { color: #7070a0; }
body.light-mode .comment-reply-link:hover { color: var(--accent); }
body.light-mode .children { border-left-color: #dddde8; }
body.light-mode .comment-respond { background: #fafafd; border-color: #dddde8; }
body.light-mode #reply-title { color: #1a1a2e; }
body.light-mode .comment-notes { color: #9090b0; }
body.light-mode .comment-form label { color: #7070a0; }
body.light-mode .comment-form input[type="text"],
body.light-mode .comment-form input[type="email"],
body.light-mode .comment-form input[type="url"],
body.light-mode .comment-form textarea {
  background: #ffffff;
  border-color: #dddde8;
  color: #1a1a2e;
}
body.light-mode .comment-form input::placeholder,
body.light-mode .comment-form textarea::placeholder { color: #9090b0; }
body.light-mode .comment-awaiting-moderation { background: rgba(240,180,41,0.08); border-color: rgba(240,180,41,0.2); }

/* Footer */
body.light-mode #site-footer { background: #ffffff; border-top: 1px solid #dddde8; }
body.light-mode .footer-col h3 { color: #3a3a55; }
body.light-mode .footer-col p,
body.light-mode .footer-col a { color: #7070a0; }
body.light-mode .footer-col a:hover { color: var(--accent); }
body.light-mode .footer-bottom { border-top-color: #dddde8; }
body.light-mode .footer-bottom p { color: #9090b0; }

/* Theme toggle button — light mode: hiện moon, ẩn sun */
body.light-mode .theme-toggle-btn .icon-dark  { display: block; }
body.light-mode .theme-toggle-btn .icon-light { display: none;  }
body.light-mode .theme-toggle-btn {
  background: #ffffff;
  border-color: #dddde8;
  color: #3a3a55;
}

/* Pagination */
body.light-mode .pagination a,
body.light-mode .pagination span { background: #ffffff; border-color: #dddde8; color: #3a3a55; }
body.light-mode .pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* No posts */
body.light-mode .no-posts h3 { color: #3a3a55; }

/* Sidebar toggle (mobile) */
body.light-mode #sidebar-toggle { background: #ffffff; border-color: #dddde8; color: #3a3a55; }


/* ===========================
   CUSTOMIZER PANEL
=========================== */
#customizer-panel {
  position: fixed;
  right: -320px;
  top: 80px;
  width: 300px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  z-index: 999;
  box-shadow: -4px 0 32px rgba(0,0,0,0.4);
  transition: right .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
#customizer-panel.open { right: 0; }

#customizer-trigger {
  position: fixed;
  right: 0;
  top: 140px;
  z-index: 1000;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: #fff;
  padding: 10px 8px;
  cursor: pointer;
  box-shadow: -2px 2px 12px rgba(0,0,0,0.3);
  transition: background .2s, transform .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  user-select: none;
}
#customizer-trigger:hover { background: var(--accent-hover); transform: translateX(-2px); }
#customizer-trigger svg { width: 16px; height: 16px; flex-shrink: 0; }

.customizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.customizer-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
#customizer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
  transition: color .15s;
}
#customizer-close:hover { color: var(--text-primary); }

.customizer-body {
  padding: 16px 18px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.customizer-section {
  margin-bottom: 20px;
}
.customizer-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Color swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
  outline: none;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: var(--text-primary); transform: scale(1.1); }

/* Font size control */
.font-size-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.font-size-control button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
}
.font-size-control button:hover { border-color: var(--accent); color: var(--accent); }
.font-size-label {
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 40px;
  text-align: center;
}

/* Line height slider */
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slider-row input[type=range] {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
  cursor: pointer;
}
.slider-val {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 30px;
  text-align: right;
}

/* Reading width toggle */
.width-options {
  display: flex;
  gap: 6px;
}
.width-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.width-btn.active, .width-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108,92,231,.08);
}

/* Toggle row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.toggle-row label {
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-switch .slider {
  position: absolute;
  inset: 0;
  background: var(--border-light);
  border-radius: 11px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-switch .slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle-switch input:checked + .slider { background: var(--accent); }
.toggle-switch input:checked + .slider::before { transform: translateX(18px); }

.customizer-reset {
  width: 100%;
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 9px;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-main);
  margin-top: 4px;
}
.customizer-reset:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* Light mode customizer */
body.light-mode #customizer-panel {
  background: #ffffff;
  border-color: #dddde8;
  box-shadow: -4px 0 32px rgba(0,0,0,0.12);
}
body.light-mode .customizer-header { border-color: #dddde8; }
body.light-mode .customizer-header h4 { color: #1a1a2e; }
body.light-mode .font-size-control button { background: #f4f4f7; border-color: #dddde8; color: #3a3a55; }
body.light-mode .width-btn { background: #f4f4f7; border-color: #dddde8; color: #7070a0; }
body.light-mode .width-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(108,92,231,.07); }
body.light-mode .customizer-reset { border-color: #dddde8; color: #9090b0; }

/* Reading width classes */
body.content-narrow .entry-body   { max-width: 680px; margin-left: auto; margin-right: auto; }
body.content-normal .entry-body   { max-width: 860px; margin-left: auto; margin-right: auto; }
body.content-wide   .entry-body   { max-width: none; }

/* Compact card view */
body.compact-cards .game-card .card-excerpt { display: none; }
body.compact-cards .posts-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }

/* Reduce motion */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  transition-duration: 0ms !important;
  animation-duration: 0ms !important;
}

/* ===========================
   PRINT STYLES
=========================== */
@media print {
  #site-header,
  #sidebar,
  #sidebar-toggle,
  .post-navigation,
  .related-posts,
  .comments-area,
  #scroll-to-top,
  #customizer-panel,
  #mobile-nav-backdrop,
  .header-actions,
  .card-btn,
  .pagination,
  .breadcrumb-wrap {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12pt;
  }
  a { color: #000 !important; text-decoration: underline; }
  .entry-content { max-width: 100% !important; }
  #content-wrap { display: block !important; }
}
