/* PGH Games v1.0.0 — uses theme CSS vars with fallbacks */

.pghg-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 24px 16px 48px;
	color: var(--text, #1a1a1a);
}

/* ---------- Archive ---------- */
.pghg-arcade-head { margin-bottom: 22px; }
.pghg-arcade-head h1 { margin: 0 0 6px; font-size: 30px; }
.pghg-sub { margin: 0 0 14px; color: var(--muted, #6b7280); }

.pghg-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pghg-pill {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid var(--border, #e2e4e8);
	border-radius: 999px;
	font-size: 14px;
	text-decoration: none;
	color: var(--text, #1a1a1a);
	background: transparent;
}
.pghg-pill.is-active {
	background: var(--red, #c0392b);
	border-color: var(--red, #c0392b);
	color: #fff;
	font-weight: 600;
}

.pghg-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}
@media (max-width: 1024px) { .pghg-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .pghg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px)  { .pghg-grid { grid-template-columns: 1fr; } }

.pghg-card {
	display: block;
	border: 1px solid var(--border, #e2e4e8);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: var(--text, #1a1a1a);
	background: var(--bg2, #fff);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pghg-card:hover {
	transform: translateY(-3px);
	border-color: var(--red, #c0392b);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.pghg-thumb {
	aspect-ratio: 16 / 9;
	background: rgba(127, 127, 127, .12);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.pghg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pghg-thumb-ph { font-size: 42px; opacity: .45; }

.pghg-cardbody { padding: 12px 14px 14px; }
.pghg-cardbody h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.3; }

.pghg-cardmeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.pghg-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
}
.pghg-badge-m { background: rgba(34, 160, 90, .14); color: #1d8a4e; }
.pghg-badge-p { background: rgba(230, 150, 20, .15); color: #b1731a; }
.pghg-badge-d { background: rgba(127, 127, 127, .14); color: var(--muted, #6b7280); }
.pghg-plays { color: var(--muted, #6b7280); }
.pghg-genres { color: var(--muted, #6b7280); font-size: 12px; }
.pghg-genres a { color: inherit; }

.pghg-pagination { margin-top: 26px; text-align: center; }
.pghg-empty { color: var(--muted, #6b7280); padding: 40px 0; text-align: center; }

/* ---------- Arcade sections / rows ---------- */
.pghg-section { margin: 26px 0 0; }
.pghg-section h2 {
	margin: 0 0 12px;
	font-size: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.pghg-section + .pghg-grid { margin-top: 0; }

.pghg-row {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 10px;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
}
.pghg-row .pghg-card {
	flex: 0 0 230px;
	scroll-snap-align: start;
}
.pghg-row::-webkit-scrollbar { height: 8px; }
.pghg-row::-webkit-scrollbar-thumb {
	background: var(--border, #e2e4e8);
	border-radius: 999px;
}
.pghg-row::-webkit-scrollbar-thumb:hover { background: var(--red, #c0392b); }
@media (max-width: 480px) {
	.pghg-row .pghg-card { flex-basis: 180px; }
	.pghg-row .pghg-cardbody h3 { font-size: 14px; }
}

/* ---------- Single ---------- */
.pghg-crumbs { margin-bottom: 14px; font-size: 14px; }
.pghg-crumbs a { color: var(--muted, #6b7280); text-decoration: none; }
.pghg-crumbs a:hover { color: var(--red, #c0392b); }

.pghg-game-head h1 { margin: 0 0 8px; font-size: 28px; }
.pghg-game-head { margin-bottom: 16px; }

.pghg-player {
	position: relative;
	width: 100%;
	background: #000;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--border, #e2e4e8);
}
.pghg-or-landscape { aspect-ratio: 16 / 9; }
.pghg-or-square    { aspect-ratio: 1 / 1; max-width: 640px; }
.pghg-or-portrait  { aspect-ratio: 9 / 16; max-width: 420px; margin-left: auto; margin-right: auto; }

.pghg-player:fullscreen { aspect-ratio: auto; border-radius: 0; }
.pghg-player:fullscreen .pghg-frame { height: 100%; }

.pghg-poster {
	position: absolute;
	inset: 0;
	background-color: #111;
	background-size: cover;
	background-position: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
}
.pghg-poster::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .45);
}
.pghg-playbtn {
	position: relative;
	z-index: 1;
	background: var(--red, #c0392b);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-size: 18px;
	font-weight: 700;
	padding: 14px 34px;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
	transition: transform .12s ease;
}
.pghg-playbtn:hover { transform: scale(1.05); }

.pghg-warn {
	position: relative;
	z-index: 1;
	background: rgba(0, 0, 0, .65);
	color: #ffd9a0;
	font-size: 13px;
	padding: 6px 14px;
	border-radius: 999px;
}

.pghg-frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.pghg-fs {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	border: 0;
	border-radius: 8px;
	width: 38px;
	height: 38px;
	font-size: 18px;
	cursor: pointer;
}
.pghg-fs:hover { background: var(--red, #c0392b); }

.pghg-box {
	margin-top: 22px;
	border: 1px solid var(--border, #e2e4e8);
	border-radius: 12px;
	padding: 16px 18px;
	background: var(--bg2, #fff);
}
.pghg-box h2 { margin: 0 0 10px; font-size: 18px; }
.pghg-box p { margin: 0 0 8px; }
.pghg-box p:last-child { margin-bottom: 0; }
.pghg-content :last-child { margin-bottom: 0; }

.pghg-attrib a { color: var(--red, #c0392b); }
.pghg-attrib-note { color: var(--muted, #6b7280); font-size: 13px; }
