/* ============================================================
   Zogrush - game portal theme
   ============================================================ */

:root {
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--accent: #f59e0b;
	--dark: #0f172a;
	--dark-2: #1e293b;
	--bg: #f4f6fb;
	--surface: #ffffff;
	--text: #1e293b;
	--muted: #64748b;
	--border: #e2e8f0;
	--radius: 12px;
	--shadow: 0 1px 3px rgba(15,23,42,.08), 0 4px 14px rgba(15,23,42,.06);
	--shadow-hover: 0 6px 18px rgba(15,23,42,.14);
	--header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: var(--text);
	background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--dark); }
p { margin: 0 0 1em; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.zg-container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.zg-main { min-height: 60vh; }

/* ---------------- Header ---------------- */

.zg-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--dark);
	box-shadow: 0 2px 10px rgba(15,23,42,.25);
}
.zg-header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.zg-brand { flex-shrink: 0; }
.zg-brand-link { font-size: 1.5rem; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.zg-brand-dot { color: var(--accent); }
.zg-brand img { max-height: 40px; width: auto; }

.zg-nav { flex: 1; }
.zg-nav-list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.zg-nav-list > li { position: relative; }
.zg-nav-list a {
	display: block; padding: 8px 12px; border-radius: 8px;
	color: #cbd5e1; font-weight: 600; font-size: .95rem;
}
.zg-nav-list a:hover { color: #fff; background: rgba(255,255,255,.08); }
.zg-caret { font-size: .75em; }
.zg-nav-has-children:hover .zg-dropdown { display: block; }
.zg-dropdown {
	display: none; position: absolute; top: 100%; left: 0; min-width: 200px;
	background: var(--surface); border-radius: 10px; box-shadow: var(--shadow-hover);
	padding: 8px; margin: 4px 0 0; list-style: none; z-index: 50;
}
.zg-dropdown a {
	color: var(--text); font-weight: 500; padding: 8px 10px; border-radius: 6px;
}
.zg-dropdown a:hover { background: #eef2ff; color: var(--primary); }

.zg-header-actions { display: flex; align-items: center; gap: 10px; }

.zg-search { display: flex; align-items: center; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px; }
.zg-search-input {
	border: 0; outline: 0; background: transparent; color: #fff;
	padding: 7px 8px 7px 14px; width: 180px; font-size: .9rem;
}
.zg-search-input::placeholder { color: #94a3b8; }
.zg-search-btn {
	border: 0; background: var(--primary); color: #fff; cursor: pointer;
	width: 34px; height: 34px; border-radius: 50%; font-size: .9rem; padding: 0;
}
.zg-search-btn:hover { background: var(--primary-dark); }

.zg-nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.zg-nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; border-radius: 2px; }

/* ---------------- Hero ---------------- */

.zg-hero {
	background: linear-gradient(135deg, #1e3a8a 0%, #312e81 55%, #1e293b 100%);
	color: #fff; text-align: center; padding: 56px 0 48px;
}
.zg-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: .25em; }
.zg-hero-sub { color: #c7d2fe; font-size: 1.1rem; max-width: 640px; margin: 0 auto 28px; }
.zg-hero-search { max-width: 480px; margin: 0 auto; }
.zg-hero-search .zg-search { background: #fff; box-shadow: var(--shadow-hover); }
.zg-hero-search .zg-search-input { color: var(--text); width: 100%; }
.zg-hero-search .zg-search-input::placeholder { color: var(--muted); }

.zg-hero-scroll {
	display: flex; gap: 14px; overflow-x: auto; margin-top: 36px;
	padding-bottom: 8px; scroll-snap-type: x mandatory;
	scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent;
}
.zg-hero-card {
	flex: 0 0 auto; width: 180px; scroll-snap-align: start;
	background: rgba(255,255,255,.08); border-radius: var(--radius);
	overflow: hidden; border: 1px solid rgba(255,255,255,.12);
}
.zg-hero-card img { width: 180px; height: 101px; object-fit: cover; }
.zg-hero-card-title {
	display: block; padding: 8px 10px; color: #e2e8f0; font-size: .85rem;
	font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zg-hero-card:hover { transform: translateY(-3px); }
.zg-hero-card:hover .zg-hero-card-title { color: #fff; }

/* ---------------- Sections & grids ---------------- */

.zg-container.zg-home-sections { padding-top: 36px; padding-bottom: 48px; }
.zg-section { margin-bottom: 44px; }
.zg-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.zg-section-head h2 { font-size: 1.45rem; }
.zg-section-link { font-weight: 600; font-size: .9rem; }

.zg-grid {
	display: grid; gap: 18px;
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .zg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .zg-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1180px) { .zg-grid { grid-template-columns: repeat(5, 1fr); } }

.zg-card {
	background: var(--surface); border-radius: var(--radius);
	box-shadow: var(--shadow); overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
.zg-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.zg-card-thumb { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; }
.zg-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
.zg-card:hover .zg-card-thumb img { transform: scale(1.05); }
.zg-card-play {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background: rgba(15,23,42,.55); color: #fff; font-weight: 700; font-size: 1.05rem;
	opacity: 0; transition: opacity .15s ease;
}
.zg-card:hover .zg-card-play { opacity: 1; }
.zg-card-body { padding: 10px 12px 12px; }
.zg-card-title { font-size: .95rem; margin: 0 0 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.zg-card-title a { color: var(--text); }
.zg-card-title a:hover { color: var(--primary); }
.zg-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); }
.zg-card-cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zg-card-rating { color: var(--accent); font-weight: 700; flex-shrink: 0; }
.zg-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.zg-grid-blog { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.zg-blog-excerpt { font-size: .9rem; color: var(--muted); margin: 0; }
.zg-blog-meta { font-size: .8rem; color: var(--muted); margin: 0 0 6px; }

/* ---------------- Category cards ---------------- */

.zg-cat-grid {
	display: grid; gap: 14px;
	grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .zg-cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .zg-cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1180px) { .zg-cat-grid { grid-template-columns: repeat(6, 1fr); } }

.zg-cat-card {
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 22px 14px; text-align: center;
	transition: transform .15s ease, box-shadow .15s ease;
}
.zg-cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.zg-cat-emoji { font-size: 2rem; }
.zg-cat-name { font-weight: 700; color: var(--text); font-size: .95rem; }
.zg-cat-count { font-size: .8rem; color: var(--muted); }

/* ---------------- Single game ---------------- */

.zg-single-game-wrap { padding-top: 24px; padding-bottom: 48px; }
.zg-breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.zg-breadcrumbs a { color: var(--muted); }
.zg-breadcrumbs a:hover { color: var(--primary); }
.zg-bc-current { color: var(--text); }
.zg-bc-sep { margin: 0 6px; }

.zg-game-layout { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .zg-game-layout { grid-template-columns: 1fr 320px; } }

.zg-game-main { min-width: 0; }
.zg-game-head { margin-bottom: 14px; }
.zg-game-title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 10px; }
.zg-game-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.zg-chip {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: 999px; padding: 4px 12px; font-size: .85rem; color: var(--text);
}

.zg-game-stage { position: relative; margin: 14px 0; }
.zg-game-frame {
	position: relative; width: 100%; aspect-ratio: 16/9;
	background: #0b1220; border-radius: var(--radius); overflow: hidden;
	box-shadow: var(--shadow);
}
.zg-game-frame iframe {
	position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.zg-game-loading {
	position: absolute; inset: 0; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 12px;
	color: #94a3b8; font-size: .9rem; z-index: 1;
}
.zg-game-loading.is-hidden { display: none; }
.zg-spinner {
	width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.2);
	border-top-color: var(--primary); border-radius: 50%;
	animation: zg-spin .8s linear infinite;
}
@keyframes zg-spin { to { transform: rotate(360deg); } }
.zg-fullscreen-btn {
	position: absolute; top: 10px; right: 10px; z-index: 5;
	background: rgba(15,23,42,.75); color: #fff; border: 0; cursor: pointer;
	width: 42px; height: 42px; border-radius: 10px; font-size: 1.2rem;
	backdrop-filter: blur(4px);
}
.zg-fullscreen-btn:hover { background: var(--primary); }

.zg-game-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.zg-tag {
	background: #eef2ff; color: var(--primary-dark); border-radius: 999px;
	padding: 4px 12px; font-size: .82rem; font-weight: 600;
}
.zg-tag:hover { background: var(--primary); color: #fff; }
.zg-tag-alt { background: #f1f5f9; color: var(--muted); }
.zg-tag-alt:hover { background: var(--dark-2); color: #fff; }

.zg-game-content { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 18px; }
.zg-game-content h2, .zg-game-section h2 { font-size: 1.2rem; margin-top: 0; }
.zg-game-thumb-seo { margin-bottom: 16px; }
.zg-game-thumb-seo img { width: 100%; border-radius: 8px; }
.zg-game-section { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); margin-top: 16px; }
.zg-game-section p { margin: 0; }

/* ---------------- Sidebar ---------------- */

.zg-game-side { display: flex; flex-direction: column; gap: 22px; }
.zg-side-section { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.zg-side-section h2 { font-size: 1.05rem; margin-bottom: 12px; }
.zg-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.zg-side-list a { display: flex; align-items: center; gap: 10px; color: var(--text); }
.zg-side-list a:hover { color: var(--primary); }
.zg-side-list img { width: 80px; height: 45px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.zg-side-name { font-size: .88rem; font-weight: 600; }
.zg-side-cats { list-style: none; margin: 0; padding: 0; }
.zg-side-cats li { margin-bottom: 6px; }
.zg-side-cats a { color: var(--text); font-size: .9rem; }
.zg-side-cats a:hover { color: var(--primary); }

/* ---------------- Ad slots ---------------- */

.zg-ad {
	min-height: 90px; margin: 16px 0;
	background: repeating-linear-gradient(45deg, #eef2f7, #eef2f7 10px, #e7ecf3 10px, #e7ecf3 20px);
	border: 1px dashed var(--border); border-radius: 8px;
	display: flex; align-items: center; justify-content: center;
	color: var(--muted); font-size: .8rem;
}
.zg-ad::after { content: "Ad unit — replace with AdSense snippet"; }
.zg-ad-sidebar { min-height: 250px; }

/* ---------------- Archive / pages ---------------- */

.zg-archive-wrap { padding-top: 28px; padding-bottom: 48px; }
.zg-archive-head { margin-bottom: 22px; }
.zg-archive-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 6px; }
.zg-archive-sub { color: var(--muted); margin: 0; }
.zg-archive-desc { color: var(--muted); max-width: 760px; }
.zg-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.zg-chip-filter {
	background: var(--surface); border: 1px solid var(--border); color: var(--text);
	border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600;
}
.zg-chip-filter:hover { border-color: var(--primary); color: var(--primary); }
.zg-chip-filter.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.zg-article-wrap { max-width: 820px; padding-top: 32px; padding-bottom: 48px; }
.zg-article { background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.zg-article-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.zg-article-meta { color: var(--muted); font-size: .9rem; }
.zg-article-thumb { margin: 16px 0; }
.zg-article-thumb img { border-radius: 8px; }
.zg-article-content h2 { font-size: 1.4rem; margin-top: 1.4em; }
.zg-article-content ul { padding-left: 1.4em; }
.zg-article-tags { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }

.zg-pagination { margin: 28px 0 0; text-align: center; }
.zg-pagination .nav-links { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.zg-pagination .page-numbers {
	background: var(--surface); border: 1px solid var(--border); color: var(--text);
	border-radius: 8px; padding: 7px 13px; font-weight: 600;
}
.zg-pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }

.zg-404 { text-align: center; padding-top: 60px; }
.zg-search-again { max-width: 420px; margin: 16px auto; }
.zg-btn {
	display: inline-block; background: var(--primary); color: #fff; font-weight: 700;
	padding: 10px 22px; border-radius: 999px;
}
.zg-btn:hover { background: var(--primary-dark); color: #fff; }

/* ---------------- Footer ---------------- */

.zg-footer { background: var(--dark); color: #94a3b8; margin-top: 40px; }
.zg-footer-inner {
	display: grid; gap: 28px; padding-top: 40px; padding-bottom: 32px;
	grid-template-columns: 1fr;
}
@media (min-width: 800px) { .zg-footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.zg-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.zg-footer p { font-size: .9rem; }
.zg-footer ul { list-style: none; margin: 0; padding: 0; }
.zg-footer li { margin-bottom: 8px; }
.zg-footer a { color: #94a3b8; font-size: .9rem; }
.zg-footer a:hover { color: #fff; }
.zg-footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; }
.zg-footer-bottom p { margin: 0; font-size: .8rem; text-align: center; }

/* ---------------- Mobile nav ---------------- */

@media (max-width: 900px) {
	.zg-nav {
		display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
		background: var(--dark); padding: 12px 20px 20px;
		box-shadow: 0 10px 20px rgba(15,23,42,.4);
	}
	.zg-nav.is-open { display: block; }
	.zg-nav-list { flex-direction: column; gap: 4px; }
	.zg-dropdown {
		display: block; position: static; box-shadow: none; background: transparent;
		padding: 0 0 0 14px; margin: 0;
	}
	.zg-dropdown a { color: #94a3b8; }
	.zg-nav-toggle { display: block; }
	.zg-search-input { width: 120px; }
	@media (max-width: 560px) {
		.zg-search-input { width: 90px; }
	}
}
