/* ==========================================================================
   ROBLOX APK THEME - MAIN STYLES (Optimized & Deduplicated)
   ========================================================================== */

/* CSS Variables */
:root {
	--primary: #00A2FF;
	--primary-dark: #0080CC;
	--primary-light: #E6F6FF;
	--secondary: #111827;
	--accent: #00D084;
	--accent-dark: #00A86B;
	--bg: #F8FAFC;
	--bg-white: #FFFFFF;
	--bg-soft: #F1F5F9;
	--danger: #FF4D4F;
	--warning: #FFB800;
	--text: #111827;
	--text-muted: #6B7280;
	--text-light: #9CA3AF;
	--border: #E5E7EB;
	--border-soft: #F3F4F6;
	--radius-sm: 8px;
	--radius: 12px;
	--radius-lg: 16px;
	--radius-xl: 24px;
	--shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.05);
	--shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
	--shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.10);
	--shadow-primary: 0 8px 24px rgba(0, 162, 255, 0.30);
	--container: 1200px;
	--container-narrow: 800px;
	--font: 'Be Vietnam Pro', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	--header-height: 72px;
	--top-bar-height: 36px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: 100px;
	overflow-x: hidden; /* đặt ở html thay vì body để không clip position:fixed */
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--text);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden; /* iOS Safari cần cả body + html để chặn scroll ngang */
	max-width: 100vw;   /* Safety net tuyệt đối */
}

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
	font-weight: 700;
	line-height: 1.25;
	color: var(--text);
	margin: 0 0 16px;
	letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; font-weight: 800; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 16px; }
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== Layout ===== */
.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}
.container-narrow { max-width: var(--container-narrow); }

/* ===== Accessibility ===== */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--primary);
	color: white;
	padding: 8px 16px;
	z-index: 9999;
}
.skip-link:focus { top: 0; }

.screen-reader-text {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ===== Top Bar ===== */
.top-bar {
	background: linear-gradient(90deg, var(--secondary), #1F2937);
	color: white;
	font-size: 13px;
	height: var(--top-bar-height);
	display: flex;
	align-items: center;
}
.top-bar .container {
	display: flex;
	gap: 24px;
	justify-content: center;
	align-items: center;
}
.trust-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: rgba(255,255,255,0.85);
}
.trust-item .dot {
	width: 8px; height: 8px;
	background: var(--accent);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgba(0,208,132,0.2);
}

/* ===== Header ===== */
.site-header {
	background: var(--bg-white);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 200; /* tăng lên để menu mobile (z-index:9999) rõ ràng cao hơn */
	border-bottom: 1px solid var(--border-soft);
}
.header-inner {
	display: flex;
	align-items: center;
	gap: 24px;
	height: var(--header-height);
}
.site-branding { flex-shrink: 0; }
.site-title-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 22px;
	color: var(--secondary);
	text-decoration: none;
	letter-spacing: -0.03em;
}
.site-title-link:hover { color: var(--primary); }

.logo-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	border-radius: 10px;
	box-shadow: var(--shadow-primary);
}
.logo-icon svg { width: 26px; height: 26px; }
.custom-logo-link img { max-height: 48px; width: auto; }

/* ===== Navigation ===== */
.main-navigation { flex: 1; }
.nav-menu {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0; padding: 0;
	justify-content: center;
}
.nav-menu li a {
	display: block;
	padding: 10px 16px;
	color: var(--text);
	font-weight: 600;
	font-size: 15px;
	border-radius: var(--radius-sm);
	transition: all 0.2s ease;
}
.nav-menu li a:hover,
.nav-menu li.current-menu-item > a {
	background: var(--primary-light);
	color: var(--primary);
}
.nav-menu .sub-menu {
	display: none;
	position: absolute;
	background: var(--bg-white);
	box-shadow: var(--shadow-lg);
	border-radius: var(--radius);
	padding: 8px;
	min-width: 200px;
	list-style: none;
	margin: 8px 0 0;
}
.nav-menu li:hover > .sub-menu { display: block; }

/* Mobile nav bar — dòng riêng chứa hamburger, ẩn trên desktop */
.mobile-nav-bar {
	display: none;
}

.menu-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 8px;
	background: transparent;
}
.menu-toggle .bar {
	width: 24px; height: 2.5px;
	background: #111827;
	border-radius: 2px;
	display: block;
	transition: all 0.3s ease;
}
.menu-toggle-label {
	font-size: 11px;
	font-weight: 600;
	color: #111827;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-top: 2px;
}
.menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Header Search ===== */
.header-search { flex-shrink: 0; }
.search-form { position: relative; display: flex; }
.search-field {
	width: 240px;
	padding: 10px 44px 10px 16px;
	border: 1.5px solid var(--border);
	border-radius: 999px;
	background: var(--bg-soft);
	font-size: 14px;
	transition: all 0.2s ease;
}
.search-field:focus {
	outline: none;
	border-color: var(--primary);
	background: var(--bg-white);
	box-shadow: 0 0 0 4px var(--primary-light);
}
.search-submit {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px; height: 36px;
	background: var(--primary);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s ease;
}
.search-submit:hover { background: var(--primary-dark); }

/* ===== Buttons ===== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	border-radius: var(--radius);
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	border: 2px solid transparent;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.btn-primary {
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(0, 162, 255, 0.4);
	color: white;
}
.btn-outline {
	background: var(--bg-white);
	color: var(--text);
	border-color: var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-ghost:hover { background: var(--border-soft); color: var(--text); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-xl { padding: 18px 36px; font-size: 18px; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-block { display: flex; width: 100%; }

/* ===== Buttons CTA Post ===== */
.cta-block {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 24px;
  background: var(--bg-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
}

.cta-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  animation: pulse-label 2.5s ease-in-out infinite;
}

@keyframes pulse-label {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
/* ===== Color Variants — shared by app-tile & game-card-icon ===== */
.blue   { background: linear-gradient(135deg, #00A2FF, #0080CC); }
.green  { background: linear-gradient(135deg, #00D084, #00A86B); }
.yellow { background: linear-gradient(135deg, #FFB800, #FF8800); }
.red    { background: linear-gradient(135deg, #FF4D4F, #CC2929); }
.purple { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.orange { background: linear-gradient(135deg, #F97316, #EA580C); }
.cyan   { background: linear-gradient(135deg, #06B6D4, #0891B2); }
.pink   { background: linear-gradient(135deg, #EC4899, #BE185D); }

/* ===== Hero Section ===== */
.hero-section {
	position: relative;
	background: linear-gradient(135deg, #F0F9FF 0%, #FFFFFF 50%, #ECFDF5 100%);
	padding: 80px 0 100px;
	overflow: hidden;
}
.hero-bg-shapes {
	position: absolute; inset: 0;
	pointer-events: none; overflow: hidden;
}
.hero-bg-shapes .shape {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: 0.4;
}
.shape-1 { width: 400px; height: 400px; background: var(--primary); top: -100px; left: -100px; }
.shape-2 { width: 350px; height: 350px; background: var(--accent); bottom: -80px; right: 10%; }
.shape-3 { width: 250px; height: 250px; background: var(--warning); top: 30%; right: -50px; opacity: 0.25; }

.hero-content {
	position: relative;
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 60px;
	align-items: center;
}
.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	background: white;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	margin-bottom: 20px;
	box-shadow: var(--shadow-sm);
}
.hero-badge .dot {
	width: 8px; height: 8px;
	background: var(--accent);
	border-radius: 50%;
}
.hero-title {
	font-size: 3.25rem;
	font-weight: 800;
	line-height: 1.1;
	margin-bottom: 20px;
	letter-spacing: -0.03em;
}
.text-gradient {
	background: linear-gradient(135deg, var(--primary), var(--accent));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.hero-subtitle {
	font-size: 1.125rem;
	color: var(--text-muted);
	margin-bottom: 32px;
	line-height: 1.6;
}
.hero-actions {
	display: flex;
	gap: 12px;
	margin-bottom: 40px;
	flex-wrap: wrap;
}
.hero-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	padding: 24px;
	background: rgba(255,255,255,0.7);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,0.5);
	border-radius: var(--radius-lg);
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat strong {
	display: block;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--primary);
	margin-bottom: 2px;
}
.hero-stats .stat span { font-size: 12px; color: var(--text-muted); }

/* Hero Visual */
.hero-visual {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.phone-mockup {
	width: 300px; height: 600px;
	background: var(--secondary);
	border-radius: 40px;
	padding: 14px;
	box-shadow: 0 30px 60px rgba(17,24,39,0.3);
	position: relative;
}
.phone-mockup::before {
	content: '';
	position: absolute;
	top: 24px; left: 50%;
	transform: translateX(-50%);
	width: 100px; height: 24px;
	background: var(--secondary);
	border-radius: 0 0 16px 16px;
	z-index: 2;
}
.phone-screen {
	width: 100%; height: 100%;
	background: linear-gradient(135deg, #1E40AF 0%, #00A2FF 100%);
	border-radius: 28px;
	padding: 50px 24px 24px;
	overflow: hidden;
}
.app-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.app-tile {
	aspect-ratio: 1;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-weight: 800;
	font-size: 28px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.floating-card {
	position: absolute;
	background: white;
	padding: 12px 18px;
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	font-size: 14px;
}
.floating-card .card-icon { font-size: 20px; }
.card-1 { top: 20%; left: -10%; }
.card-2 { bottom: 15%; right: -10%; }

/* ===== Sections ===== */
.section { padding: 60px 0; }
.section-padded { padding: 80px 0; }
.section-alt { background: var(--bg-white); }

.section-header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 48px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
}
.section-header.section-header-flex {
	flex-direction: row;
	justify-content: space-between;
	max-width: var(--container);
	text-align: left;
}
.section-title {
	font-size: 2rem;
	font-weight: 800;
	margin: 0 0 18px;
}
.section-subtitle { font-size: 1.0625rem; color: var(--text-muted); margin: 0; }
.section-link { font-weight: 600; color: var(--primary); }

/* ===== Featured APK Card ===== */
.featured-apk-card {
	background: var(--bg-white);
	border-radius: var(--radius-xl);
	padding: 40px;
	box-shadow: var(--shadow-lg);
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 40px;
	align-items: start;
	border: 1px solid var(--border-soft);
}
.apk-icon .icon-square {
	width: 160px; height: 160px;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	border-radius: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-primary);
	position: relative;
}
.apk-icon .icon-r { font-size: 80px; font-weight: 900; color: white; transform: skewX(-8deg); }
.apk-info .apk-name { font-size: 2rem; margin: 0 0 8px; }
.apk-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.star-rating {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 16px;
	color: var(--warning);
}
.star-rating .star.empty { color: var(--border); }
.star-rating .rating-value { margin-left: 8px; color: var(--text); font-weight: 700; }
.apk-downloads { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.apk-specs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 20px;
	padding: 20px;
	background: var(--bg-soft);
	border-radius: var(--radius);
}
.spec { display: flex; flex-direction: column; gap: 4px; }
.spec-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.spec-value { font-size: 15px; font-weight: 700; color: var(--text); }
.apk-description { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.apk-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Game Grid & Cards ===== */
.game-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
}
.game-grid-related { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.game-card {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: all 0.3s ease;
	border: 1px solid var(--border-soft);
	display: flex;
	flex-direction: column;
}
.game-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary-light);
}
.game-card-link {
	color: inherit;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.game-card-link:hover { color: inherit; }
.game-card-thumb {
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--bg-soft);
}
.game-card-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.game-card:hover .game-card-thumb img { transform: scale(1.05); }
.game-card-icon {
	width: 100%;
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 64px;
	font-weight: 900;
}
.game-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.game-card-title {
	font-size: 1rem;
	margin: 0;
	font-weight: 700;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.game-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	color: var(--text-muted);
}
.game-card-meta .rating { color: var(--warning); font-weight: 700; }
.game-card-action { padding: 0 16px 16px; }

/* ===== Steps Grid ===== */
.steps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	padding-top: 20px;
}
.step-card {
	background: var(--bg-white);
	padding: 40px 28px 32px;
	border-radius: var(--radius-lg);
	text-align: center;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-soft);
	position: relative;
	transition: all 0.3s ease;
	margin-top: 20px;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-number {
	position: absolute;
	top: -20px; left: 50%;
	transform: translateX(-50%);
	width: 48px; height: 48px;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 20px;
	box-shadow: var(--shadow-primary);
}
.step-icon {
	margin: 16px auto 20px;
	width: 80px; height: 80px;
	background: var(--primary-light);
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.step-card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.step-card p { color: var(--text-muted); margin: 0; font-size: 14px; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
	background: var(--bg-white);
	border-radius: var(--radius);
	border: 1px solid var(--border-soft);
	overflow: hidden;
	transition: all 0.2s ease;
}
.faq-item[open] { border-color: var(--primary); box-shadow: var(--shadow); }
.faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	cursor: pointer;
	font-weight: 700;
	font-size: 1.0625rem;
	color: var(--text);
	list-style: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-toggle {
	flex-shrink: 0;
	width: 28px; height: 28px;
	background: var(--primary-light);
	color: var(--primary);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: 700;
	transition: transform 0.2s ease;
}
.faq-item[open] .faq-toggle {
	transform: rotate(45deg);
	background: var(--primary);
	color: white;
}
.faq-answer { padding: 0 24px 20px; color: var(--text-muted); line-height: 1.7; }

/* ===== News Grid & Cards ===== */
.news-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.news-card {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-soft);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-thumb {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--bg-soft);
}
.news-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-thumb-placeholder {
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	font-weight: 900;
}
.news-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.news-date { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.news-title { font-size: 1.0625rem; margin: 0; font-weight: 700; line-height: 1.4; }
.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { color: var(--primary); }
.news-excerpt {
	font-size: 14px;
	color: var(--text-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ===== Category Grid ===== */
.category-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 16px;
}
.category-tile {
	aspect-ratio: 1;
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px;
	text-decoration: none;
	color: var(--text);
	border: 1px solid var(--border-soft);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.category-tile::after {
	content: "";
	position: absolute;
	top: -50%; left: -60%;
	width: 40%; height: 200%;
	background: linear-gradient(120deg,rgba(255,255,255,0) 0%,rgba(255,255,255,0.25) 50%,rgba(255,255,255,0) 100%);
	transform: rotate(25deg);
	opacity: 0;
}
.category-tile:hover::after { animation: shineSweep 0.8s ease forwards; opacity: 1; }
@keyframes shineSweep {
	0%   { left: -60%; opacity: 0; }
	20%  { opacity: 1; }
	100% { left: 140%; opacity: 0; }
}
.category-tile.blue:hover   { border-color: #00A2FF; }
.category-tile.green:hover  { border-color: #00D084; }
.category-tile.purple:hover { border-color: #8B5CF6; }
.category-tile.red:hover    { border-color: #FF4D4F; }
.category-tile.orange:hover { border-color: #F97316; }
.category-tile.cyan:hover   { border-color: #06B6D4; }
.category-tile.yellow:hover { border-color: #FFB800; }
.category-tile.pink:hover   { border-color: #EC4899; }
.cat-emoji { font-size: 32px; }
.cat-name  { font-size: 13px; font-weight: 600; }

/* ===== Content Area ===== */
.content-area {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 40px;
	padding: 32px 0 60px;
}
/* Grid children phải có min-width:0 — nếu không, ảnh to sẽ ép cột ra và đẩy sidebar */
.content-area > * {
	min-width: 0;
}
.content-area-full {
	grid-template-columns: 1fr;
	max-width: 900px;
	margin: 0 auto;
}

/* ===== Sidebar & Widgets ===== */
.widget-area { display: flex; flex-direction: column; gap: 24px; }
.widget {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	padding: 24px;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-soft);
}
.widget-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--border-soft);
}
.top-games-list,
.hot-posts-list {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.top-games-list li { display: flex; align-items: center; gap: 12px; }
.rank {
	flex-shrink: 0;
	width: 32px; height: 32px;
	background: var(--bg-soft);
	color: var(--text-muted);
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 14px;
}
.rank-1 { background: #FFB800; color: white; }
.rank-2 { background: #94A3B8; color: white; }
.rank-3 { background: #FB923C; color: white; }
.top-games-list a { color: var(--text); font-weight: 600; font-size: 14px; }
.top-games-list a:hover { color: var(--primary); }

.hot-post-link { display: flex; gap: 12px; align-items: center; color: var(--text); }
.hot-post-thumb {
	flex-shrink: 0;
	width: 60px; height: 60px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-soft);
}
.hot-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hot-post-content { display: flex; flex-direction: column; gap: 4px; }
.hot-post-title {
	font-weight: 600; font-size: 13px; line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--text);
}
.hot-post-date { font-size: 11px; color: var(--text-muted); }

/* Widget CTA */
.widget-cta { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; text-align: center; border: 0; }
.widget-cta-title { color: white; font-size: 1.25rem; margin: 0 0 8px; }
.widget-cta p { color: rgba(255,255,255,0.9); margin: 0 0 16px; font-size: 14px; }
.widget-cta .btn { background: white; color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.widget-cta .btn:hover { background: var(--bg-soft); color: var(--primary-dark); }

/* Widget game category */
.widget-game-category ul,
.game-category-list {
	list-style: none;
	padding: 0; margin: 0;
}
.widget-game-category li,
.game-category-list li { margin-bottom: 10px; }
.widget-game-category a,
.game-category-list a {
	display: flex;
	justify-content: space-between;
	padding: 10px 14px;
	background: var(--bg-soft);
	border-radius: 10px;
	text-decoration: none;
	color: var(--text);
	transition: all 0.2s ease;
}
.widget-game-category a:hover,
.game-category-list a:hover {
	background: var(--primary);
	color: #fff;
	transform: translateX(4px);
}
.widget-game-category li.current-cat a,
.game-category-list li.current-cat a {
	background: var(--primary);
	color: #fff;
	font-weight: 700;
}

/* ===== Single Post ===== */
.single-post {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	padding: 40px;
	box-shadow: var(--shadow-sm);
	margin-bottom: 32px;
	overflow: hidden;
}
.entry-header { margin-bottom: 24px; }
.entry-cat {
	display: inline-block;
	padding: 4px 12px;
	background: var(--primary-light);
	color: var(--primary);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 12px;
}
.entry-title { font-size: 2.25rem; margin: 0 0 16px; line-height: 1.2; }
.entry-meta { display: flex; gap: 20px; color: var(--text-muted); font-size: 14px; flex-wrap: wrap; }
.meta-item { display: inline-flex; align-items: center; gap: 6px; }
.entry-thumbnail {
    margin: 0 0 32px;
    overflow: hidden;
    border-radius: var(--radius);
}
.entry-thumbnail img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}
.entry-content,
.entry-content * {
    max-width: 100%;
}
.entry-content {
    overflow-x: hidden;
}
.entry-content .click-anchor,
a.click-anchor {
    display: inline;
    color: var(--primary);
    font-weight: 700;
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    background: linear-gradient(180deg, transparent 58%, rgba(37, 99, 235, .14) 0);
    border-radius: 4px;
    transition: color .2s ease, background .2s ease;
}
.entry-content .click-anchor:hover,
a.click-anchor:hover {
    color: var(--primary-dark);
    background: linear-gradient(180deg, transparent 48%, rgba(37, 99, 235, .24) 0);
}

.entry-content h2 { font-size: 1.75rem; margin: 32px 0 16px; }
.entry-content h3 { font-size: 1.375rem; margin: 24px 0 12px; }
.entry-content blockquote {
	border-left: 4px solid var(--primary);
	background: var(--primary-light);
	padding: 16px 24px;
	margin: 24px 0;
	border-radius: 0 var(--radius) var(--radius) 0;
	color: var(--text);
	font-style: italic;
}
.entry-content img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 16px auto;
    object-fit: contain;
}
/* ===== WordPress Image Alignment & Captions ===== */
.entry-content figure,
.entry-content .wp-caption,
.entry-content .wp-block-image {
    width: auto !important;
    max-width: 100% !important;
    margin: 16px auto !important;
    float: none !important;
    display: block;
}
.entry-content figure img,
.entry-content .wp-caption img,
.entry-content .wp-block-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    float: none !important;
}
.entry-content .alignright,
.entry-content .alignleft,
.entry-content .aligncenter {
    float: none !important;
    margin: 16px auto !important;
    display: block;
    max-width: 100% !important;
    width: auto !important;
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.entry-content th { background: var(--bg-soft); font-weight: 700; }
.entry-content iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    display: block;
}

/* ===== APK Info Box ===== */
.apk-info-box {
	background: linear-gradient(135deg, #F0F9FF 0%, #FFFFFF 100%);
	border: 1px solid var(--primary-light);
	border-radius: var(--radius-lg);
	padding: 28px;
	margin: 24px 0 32px;
}
.apk-info-header {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 20px;
	align-items: center;
	margin-bottom: 24px;
}
.apk-info-icon {
	width: 96px; height: 96px;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: var(--shadow);
}
.apk-info-icon .apk-icon-img { width: 100%; height: 100%; object-fit: cover; }
.icon-fallback {
	width: 100%; height: 100%;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	font-weight: 900;
}
.apk-info-title h2 { font-size: 1.5rem; margin: 0 0 6px; }
.apk-info-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.apk-developer { font-size: 14px; color: var(--text-muted); }
.apk-info-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-success { background: rgba(0,208,132,0.15); color: var(--accent-dark); }
.tag-primary { background: var(--primary-light); color: var(--primary); }

/* APK Specs Table - Game APK Style */

.apk-specs-table{
    width:100%;
    border-collapse:collapse;
    margin:24px 0;
    overflow:hidden;
    background:#ffffff;
    border:1px solid #dbe4f0;
    border-radius:14px;
}

/* Row */

.apk-specs-table tr{
    transition:background .2s ease;
}

.apk-specs-table tr:nth-child(even){
    background:#f8fbff;
}

.apk-specs-table tr:hover{
    background:#eef6ff;
}

/* Cells */

.apk-specs-table th,
.apk-specs-table td{
    padding:18px 22px;
    border:1px solid #e3ebf5;
    font-size:16px;
    line-height:1.5;
}

/* Header */

.apk-specs-table th{
    width:22%;
    background:#f1f7ff;
    color:#4b5563;
    font-weight:700;
    text-align:left;
    white-space:nowrap;
}

/* Value */

.apk-specs-table td{
    background:#ffffff;
    color:#111827;
    font-weight:600;
}

/* Highlight important values */

.apk-specs-table td strong{
    color:#2563eb;
}

/* Download Button */

.apk-specs-table .download-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 18px;
    background:linear-gradient(135deg,#3b82f6,#2563eb);
    color:#fff;
    font-size:15px;
    font-weight:700;
    text-decoration:none;
    border-radius:10px;
    transition:all .2s ease;
}

.apk-specs-table .download-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 6px 16px rgba(37,99,235,.25);
}

/* Responsive */

@media (max-width:768px){

    .apk-specs-table,
    .apk-specs-table tbody,
    .apk-specs-table tr,
    .apk-specs-table th,
    .apk-specs-table td{
        display:block;
        width:100%;
    }

    .apk-specs-table tr{
        border-bottom:1px solid #e5edf7;
    }

    .apk-specs-table tr:last-child{
        border-bottom:none;
    }

    .apk-specs-table th,
    .apk-specs-table td{
        border:none;
        padding:14px 16px;
    }

    .apk-specs-table th{
        background:#f1f7ff;
        font-size:13px;
        color:#64748b;
        padding-bottom:6px;
    }

    .apk-specs-table td{
        font-size:16px;
        padding-top:0;
        font-weight:700;
    }

    .apk-specs-table .download-btn{
        width:100%;
        text-align:center;
    }

}

.trust-row {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-top: 12px;
	color: var(--accent-dark);
	font-size: 13px;
	font-weight: 600;
	flex-wrap: wrap;
}


/* ===== TOC ===== */
.toc-wrapper {
	background: var(--bg-soft);
	border-left: 4px solid var(--primary);
	padding: 20px 24px;
	border-radius: 0 var(--radius) var(--radius) 0;
	margin: 24px 0;
}
.toc-title { font-weight: 700; font-size: 1.0625rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.toc-list { margin: 0; padding-left: 20px; }
.toc-list li { margin: 6px 0; }
.toc-list a { color: var(--text); text-decoration: none; }
.toc-list a:hover { color: var(--primary); text-decoration: underline; }
.toc-list .toc-h3 { margin-left: 20px; font-size: 14px; }

/* ===== Big Download CTA ===== */
.big-download-cta {
	background: linear-gradient(135deg, var(--primary), var(--accent));
	color: white;
	border-radius: var(--radius-xl);
	padding: 48px 32px;
	text-align: center;
	margin: 32px 0;
}
.big-download-cta h2 { color: white; font-size: 2rem; margin: 0 0 8px; }
.big-download-cta p { color: rgba(255,255,255,0.9); font-size: 1.0625rem; margin: 0 0 24px; }
.big-download-cta .btn-primary { background: white; color: var(--primary); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.big-download-cta .btn-primary:hover { background: var(--bg-soft); color: var(--primary-dark); }
.download-trust-row {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin-top: 24px;
	color: rgba(255,255,255,0.95);
	font-size: 14px;
	font-weight: 600;
	flex-wrap: wrap;
}

/* ===== Entry Footer ===== */
.entry-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-soft); }
.entry-tags { margin-bottom: 16px; font-size: 14px; }
.tag-link {
	display: inline-block;
	padding: 4px 10px;
	background: var(--bg-soft);
	color: var(--text-muted);
	border-radius: 999px;
	font-size: 13px;
	margin: 0 4px 4px 0;
	font-weight: 500;
}
.tag-link:hover { background: var(--primary-light); color: var(--primary); }
.entry-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.share-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	background: var(--bg-soft);
	color: var(--text);
	border: 0;
	cursor: pointer;
	transition: all 0.2s ease;
}
.share-btn.fb { background: #1877F2; color: white; }
.share-btn.tw { background: #0F1419; color: white; }
.share-btn.tg { background: #229ED9; color: white; }
.share-btn:hover { transform: translateY(-1px); color: white; }
.share-btn.copy:hover { background: var(--primary); color: white; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { padding: 16px 0; font-size: 14px; }
.breadcrumb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item:not(:first-child)::before { content: '/'; margin-right: 8px; color: var(--text-light); }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--text); font-weight: 600; }

/* ===== Archive ===== */
.archive-header {
	margin-bottom: 32px;
	padding: 32px;
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}
.archive-title { font-size: 2rem; margin: 0 0 8px; }
.archive-description { color: var(--text-muted); }
.archive-acf-content {
	margin: 0 0 32px;
	padding: 32px;
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}
.archive-acf-content-bottom {
	margin: 40px 0 0;
}

/* ===== Pagination ===== */
.navigation.pagination,
.posts-navigation,
.comments-pagination { margin-top: 32px; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	background: var(--bg-white);
	color: var(--text);
	font-weight: 600;
	font-size: 14px;
	border: 1px solid var(--border-soft);
}
.page-numbers:hover,
.page-numbers.current {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

/* ===== Taxonomy / Category Pages ===== */
.taxonomy-header {
	background: linear-gradient(135deg, var(--primary-light), #FFFFFF);
	padding: 40px 0 32px;
	border-bottom: 1px solid var(--border-soft);
}
.taxonomy-hero { text-align: center; }
.taxonomy-label {
	display: inline-block;
	padding: 4px 12px;
	background: var(--primary-light);
	color: var(--primary);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 12px;
}
.taxonomy-hero h1 { font-size: 2.5rem; margin: 0; }

.blog-category { padding: 32px 0 48px; }
.taxonomy-games { padding: 32px 0 48px; }
.taxonomy-posts { padding: 0 0 48px; }
.taxonomy-content { padding: 0 0 48px; }

/* Category switcher */
.category-switcher {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 8px 0 28px;
	padding: 10px 0;
	border-top: 1px solid var(--border-soft);
	border-bottom: 1px solid var(--border-soft);
}
.category-switcher-label {
	flex: 0 0 auto;
	color: var(--text-muted);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}
.category-switcher-list {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	min-width: 0;
}
.category-chip {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 7px 13px;
	border: 1px solid var(--border-soft);
	border-radius: 999px;
	background: rgba(255,255,255,.74);
	color: var(--text);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	box-shadow: 0 1px 4px rgba(15,23,42,.04);
	transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.category-chip:hover {
	background: var(--primary-light);
	border-color: rgba(0,162,255,.32);
	color: var(--primary);
	box-shadow: 0 4px 14px rgba(0,162,255,.12);
}

/* ===== Post Grid (category.php / taxonomy) ===== */
.post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	margin-top: 24px;
}

/* ===== Post Card ===== */
.post-card {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-soft);
	display: flex;
	flex-direction: column;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.post-thumb,
.post-card-thumb {
	display: block;
	overflow: hidden;
	background: var(--bg-soft);
	aspect-ratio: 16 / 9;
}
.post-thumb img,
.post-card-thumb img {
	width: 100%; height: 100%;
	max-width: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.post-card:hover .post-thumb img,
.post-card:hover .post-card-thumb img { transform: scale(1.05); }

.post-content,
.post-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.post-card-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-muted); }
.post-cat { background: var(--primary-light); color: var(--primary); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }

/* post-title used in category.php */
.post-title,
.post-card-title {
	font-size: 17px;
	margin: 0;
	line-height: 1.4;
	font-weight: 700;
}
.post-title a,
.post-card-title a { color: var(--text); text-decoration: none; }
.post-title a:hover,
.post-card-title a:hover { color: var(--primary); }

.post-excerpt,
.post-card-excerpt {
	font-size: 14px;
	color: var(--text-muted);
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.read-more-link { font-size: 13px; font-weight: 600; color: var(--primary); margin-top: auto; }
.read-more-link:hover { color: var(--primary-dark); }

/* ===== Blog Card (taxonomy-game_category) ===== */
.blog-card {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border-soft);
	display: flex;
	flex-direction: row;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.blog-thumb {
	flex: 0 0 200px;
	display: block;
	overflow: hidden;
	background: var(--bg-soft);
}
.blog-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.blog-card:hover .blog-thumb img { transform: scale(1.05); }

.blog-content {
	flex: 1;
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}
.blog-content h3 { font-size: 1.125rem; line-height: 1.4; margin: 0; font-weight: 700; }
.blog-content h3 a { color: var(--text); text-decoration: none; }
.blog-content h3 a:hover { color: var(--primary); }
.blog-content p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-muted); }

/* Category content */
.category-content-wrap { margin-top: 48px; padding-top: 40px; border-top: 2px solid var(--border-soft); }
.category-desc {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	padding: 32px;
	box-shadow: var(--shadow-sm);
	font-size: 1rem;
	line-height: 1.8;
	color: var(--text-muted);
}
.category-content { font-size: 1rem; line-height: 1.8; }
.category-desc img,
.category-content img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: var(--radius);
    margin: 16px auto;
}

/* ===== Posts grid (index.php) ===== */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}

/* ===== Related Posts ===== */
.related-posts-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border-soft); }

/* ===== Comments ===== */
.comments-area {
	background: var(--bg-white);
	border-radius: var(--radius-lg);
	padding: 32px;
	margin-top: 32px;
	box-shadow: var(--shadow-sm);
}
.comments-title { margin: 0 0 20px; padding-bottom: 16px; border-bottom: 2px solid var(--border-soft); }
.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-item { margin-bottom: 24px; padding: 20px; background: var(--bg-soft); border-radius: var(--radius); }
.comment-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.comment-author-info { display: flex; flex-direction: column; }
.comment-author-info .fn { font-weight: 700; }
.comment-date { font-size: 12px; color: var(--text-muted); }
.comment-content { color: var(--text); }
.reply { margin-top: 8px; }
.comment-reply-link { font-size: 13px; font-weight: 600; }
.comment-form-wrap { background: var(--bg-soft); padding: 24px; border-radius: var(--radius); }
.comment-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: white;
	margin-bottom: 12px;
	font-size: 14px;
}
.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
}

/* ===== Footer CTA ===== */
.footer-cta {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
	background: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: white;
	border-radius: var(--radius-xl);
	padding: 32px 40px;
	margin: 0 0 60px;
}
.footer-cta-text h3 { color: white; margin: 0 0 4px; font-size: 1.5rem; }
.footer-cta-text p { color: rgba(255,255,255,0.9); margin: 0; font-size: 15px; }
.footer-cta .btn-primary { background: white; color: var(--primary); }
.footer-cta .btn-primary:hover { background: var(--bg-soft); color: var(--primary-dark); }

/* ===== Footer ===== */
.site-footer { background: var(--secondary); color: rgba(255,255,255,0.85); padding: 60px 0 30px; }
.footer-widgets { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 32px; }
.footer-col .widget-title,
.footer-col h4 { color: white; font-size: 1.125rem; margin: 0 0 16px; }
.footer-col p { color: rgba(255,255,255,0.75); font-size: 14px; line-height: 1.7; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-menu a { color: rgba(255,255,255,0.75); font-size: 14px; }
.footer-menu a:hover { color: var(--primary); }
.footer-disclaimer {
	padding: 20px 24px;
	background: rgba(255,255,255,0.05);
	border-radius: var(--radius);
	font-size: 13px;
	color: rgba(255,255,255,0.7);
	line-height: 1.7;
	margin-bottom: 24px;
}
.footer-bottom {
	padding-top: 24px;
	border-top: 1px solid rgba(255,255,255,0.1);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}
.footer-bottom p { margin: 0; font-size: 13px; color: rgba(255,255,255,0.6); }

/* ===== Sticky Download (mobile) ===== */
.sticky-download-mobile {
	display: none;
	position: fixed;
	bottom: 0; left: 0; right: 0;
	z-index: 99;
	background: white;
	padding: 12px 16px;
	box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
	border-top: 1px solid var(--border-soft);
}

/* ===== Floating CTA ===== */
.floating-cta {
	position: fixed;
	bottom: 24px; right: 24px;
	width: 56px; height: 56px;
	background: linear-gradient(135deg, var(--primary), var(--accent));
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-primary);
	z-index: 90;
	cursor: pointer;
	transition: all 0.3s ease;
}
.floating-cta:hover { transform: scale(1.1); }

/* ===== Modal ===== */
.modal-overlay {
	position: fixed; inset: 0;
	background: rgba(17,24,39,0.8);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0; visibility: hidden;
	transition: all 0.3s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }
.modal-content {
	background: white;
	border-radius: var(--radius-xl);
	padding: 32px;
	max-width: 440px;
	width: 100%;
	position: relative;
	transform: translateY(20px);
	transition: transform 0.3s ease;
}
.modal-overlay.is-open .modal-content { transform: translateY(0); }
.modal-close {
	position: absolute;
	top: 16px; right: 16px;
	width: 32px; height: 32px;
	border-radius: 50%;
	background: var(--bg-soft);
	color: var(--text);
	font-size: 24px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
}
.modal-close:hover { background: var(--border); }
.modal-header { text-align: center; margin-bottom: 24px; }
.modal-icon {
	width: 64px; height: 64px;
	background: linear-gradient(135deg, var(--accent), var(--accent-dark));
	color: white;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 32px; font-weight: 800;
	margin: 0 auto 16px;
	box-shadow: 0 8px 24px rgba(0,208,132,0.3);
}
.modal-header h3 { font-size: 1.5rem; margin: 0; }
.modal-trust-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.modal-trust-list li {
	display: flex; align-items: center; gap: 12px;
	padding: 10px 14px;
	background: var(--bg-soft);
	border-radius: 10px;
	font-size: 14px; font-weight: 500;
}
.modal-trust-list .check {
	flex-shrink: 0;
	width: 20px; height: 20px;
	background: var(--accent);
	color: white;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 12px;
}
.modal-note { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--text-muted); }
.modal-note a { color: var(--primary); }

/* ===== Misc ===== */
.no-posts { text-align: center; padding: 60px 20px; background: var(--bg-white); border-radius: var(--radius-lg); }
.search-count { margin-bottom: 24px; color: var(--text-muted); }
.page-content-wrap { background: var(--bg-white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }
img.lazy { background: var(--bg-soft); min-height: 100px; transition: opacity 0.3s ease; }
img.lazy.loaded { background: transparent; }

/* ===== APK Version History ===== */
.apk-version-history { margin: 40px 0; }
.version-table-wrap {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.version-history-table { width: 100%; border-collapse: collapse; }
.version-history-table th {
	background: var(--bg-soft);
	padding: 16px;
	font-size: 14px;
	text-align: left;
	font-weight: 700;
	color: var(--text);
}
.version-history-table td { padding: 18px 16px; border-top: 1px solid var(--border-soft); }
.version-history-table tr:hover { background: #fafcff; }

/* ===== Typography replacements (semantic demotion) ===== */
/* apk-name: was h2/h3, now p — keep visual weight */
p.apk-name {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--text);
	margin: 0 0 8px;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

/* cta-heading: was h2/h3 in CTA boxes, now p */
p.cta-heading {
	font-size: 1.5rem;
	font-weight: 800;
	color: white;
	margin: 0 0 8px;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

/* modal-heading: was h3 in modal, now p */
p.modal-heading {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--text);
	margin: 0;
	line-height: 1.25;
}

/* Container chính */
.home-mid-content {
    width: 100%;
	border-collapse: collapse;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    font-family: inherit;
    line-height: 1.6;
    color: #333;
}

/* Tiêu đề chính H2 - Thường là tên bài hướng dẫn */
.home-mid-content h2 {
    font-size: 28px;
    color: #000;
    text-transform: uppercase;
    border-left: 6px solid #ce1212; /* Màu đỏ đặc trưng của Roblox cũ hoặc chọn màu xanh dương tùy theme */
    padding-left: 15px;
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Tiêu đề mục lớn H3 - Các bước chính */
.home-mid-content h3 {
    font-size: 22px;
    color: #0074db; /* Màu xanh nước biển đặc trưng của Roblox */
    background: #f0f8ff;
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
    margin-top: 30px;
}

/* Tiêu đề phụ H4 - Các chi tiết nhỏ/Lưu ý */
.home-mid-content h4 {
    font-size: 18px;
    color: #444;
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.home-mid-content h4::before {
    content: "🎮"; /* Icon gaming cho sinh động */
    margin-right: 10px;
}

/* Đoạn văn bản nội dung */
.home-mid-content p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

/* Làm nổi bật các từ khóa quan trọng (như tên Item, mã Code) */
.home-mid-content strong {
    color: #ce1212;
    background: #fff0f0;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Hiệu ứng cho hình ảnh nếu có trong nội dung */
.home-mid-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}
/* Table Home mid content */
.home-mid-content table {
	width: 100%;
	border-collapse: collapse;
	display: block;        /* Cho phép overflow-x scroll */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.home-mid-content th,
.home-mid-content td {
	padding: 12px 16px;
	border: 1px solid var(--border-soft);
	font-size: 14px;
}
.home-mid-content th { background: var(--bg-soft); color: var(--text-muted); font-weight: 600; width: 18%; }
.home-mid-content td { font-weight: 700; }

/* ===== Core Web Vitals / Performance ===== */
img {
	content-visibility: auto;
}
.hero-section {
	contain: layout style;
}

/* ===== Apk Gallery / Video ===== */
.apk-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin: 24px 0;
}

.apk-gallery-item {
	border-radius: 14px;
	overflow: hidden;
	background: var(--bg-soft);
}

.apk-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .35s ease;
}

.apk-gallery-item:hover img {
	transform: scale(1.04);
}
@media (max-width: 768px) {

	.apk-gallery {
		grid-template-columns: 1fr;
	}

}

.apk-video {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 16px;
	margin: 24px 0;
}

.apk-video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}


/* Extra Download Table */

.apk-specs-table.extra-download-table{
    width:100%;
    margin-top:20px;
    border-collapse:collapse;
    table-layout:fixed;
}

/* Header */

.apk-specs-table.extra-download-table thead th{
    background:#eef4ff;
    color:#475569;
    font-size:15px;
    font-weight:700;
    text-align:center;
    padding:16px 18px;
    border:1px solid #dbe7f5;
}

/* Body */

.apk-specs-table.extra-download-table tbody td{
    padding:18px;
    border:1px solid #e5edf7;
    text-align:center;
    vertical-align:middle;
    background:#ffffff;
    font-size:16px;
    font-weight:600;
    color:#111827;
}

/* Alternate Row */

.apk-specs-table.extra-download-table tbody tr:nth-child(even) td{
    background:#f8fbff;
}

/* Download Button */

.apk-specs-table.extra-download-table .extra-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:140px;
    padding:12px 18px;
    border-radius:12px;
    text-decoration:none;
    font-size:15px;
    font-weight:700;
    line-height:1.2;
}

/* Remove paragraph margin */

.apk-specs-table.extra-download-table td p{
    margin:0;
}

/* Responsive */

@media (max-width:768px){

    .apk-specs-table.extra-download-table,
    .apk-specs-table.extra-download-table tbody,
    .apk-specs-table.extra-download-table tr,
    .apk-specs-table.extra-download-table td{
        display:block;
        width:100%;
    }

    .apk-specs-table.extra-download-table thead{
        display:none;
    }

    .apk-specs-table.extra-download-table tr{
        margin-bottom:14px;
        border:1px solid #e5edf7;
        border-radius:14px;
        overflow:hidden;
        background:#fff;
    }

    .apk-specs-table.extra-download-table td{
        display:flex;
        flex-direction:column;
        align-items:flex-start;
        text-align:left;
        border:none;
        border-bottom:1px solid #eef2f7;
        padding:14px 16px;
    }

    .apk-specs-table.extra-download-table td:last-child{
        border-bottom:none;
    }

    .apk-specs-table.extra-download-table td::before{
        font-size:13px;
        font-weight:700;
        color:#64748b;
        margin-bottom:6px;
    }

    .apk-specs-table.extra-download-table td:nth-child(1)::before{
        content:"File Format";
    }

    .apk-specs-table.extra-download-table td:nth-child(2)::before{
        content:"Download";
    }

    .apk-specs-table.extra-download-table td:nth-child(3)::before{
        content:"Note";
    }

    .apk-specs-table.extra-download-table .extra-btn{
        width:100%;
        justify-content:center;
    }

}

/* Format badges */
.format-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: middle;
    margin-right: 6px;
}
.format-apk  { background: #1a73e8; color: #fff; }
.format-xapk { background: #e8710a; color: #fff; }
.format-apkm { background: #188038; color: #fff; }

/* Note trên bài viết APK */
.apkm-install-note {
  margin: 24px 0;
  padding: 18px 20px;
  border: 2px solid #ffb300;
  border-left: 6px solid #ff6f00;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  color: #2b2b2b;
  font-size: 16px;
  line-height: 1.7;
  box-shadow: 0 6px 18px rgba(255, 143, 0, 0.18);
}

.apkm-install-note strong {
  display: block;
  margin-bottom: 8px;
  color: #d35400;
  font-size: 18px;
  font-weight: 700;
}
