/* ==========================================================================
   XHUB main stylesheet — v0.2.0 (Part 2)
   Dark video-site UI. Burmese-capable font stack.
   ========================================================================== */

:root {
	--bg: #000000;
	--surface: #0A0A0A;
	--surface-2: #141414;
	--text: #FAFAFA;
	--muted: #8A8A8A;
	--accent: #01D73B;
	--accent-soft: rgba(1, 215, 59, 0.12);
	--radius: 8px;
	--font: "Segoe UI", Roboto, system-ui, "Noto Sans Myanmar", "Padauk",
		"Myanmar Text", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; display: block; }

.wrap {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 16px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
	background: var(--surface);
	border-bottom: 1px solid #1B1B1B;
	position: sticky;
	top: 0;
	z-index: 50;
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 56px;
}

.logo {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 0.5px;
	white-space: nowrap;
}
.logo-x { color: var(--accent); }
.logo-rest { color: var(--text); }
.logo-img { height: 34px; width: auto; display: block; }

.search-form {
	flex: 1;
	display: flex;
	max-width: 560px;
	margin: 0 auto;
}

.search-input {
	flex: 1;
	min-width: 0;
	background: var(--bg);
	border: 1px solid #262626;
	border-right: 0;
	border-radius: var(--radius) 0 0 var(--radius);
	padding: 8px 12px;
	color: var(--text);
	font-family: var(--font);
	font-size: 14px;
}
.search-input:focus { outline: none; border-color: var(--accent); }

.search-btn {
	background: var(--surface-2);
	border: 1px solid #262626;
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 0 14px;
	color: var(--muted);
	cursor: pointer;
	font-size: 14px;
}
.search-btn:hover { color: var(--text); }

.site-nav .nav-list {
	display: flex;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav a {
	color: var(--muted);
	font-size: 14px;
	font-weight: 600;
}
.site-nav a:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.site-main { padding: 20px 16px 40px; }

.page-heading {
	font-size: 20px;
	margin: 8px 0 18px;
}

.section-heading {
	font-size: 17px;
	margin: 28px 0 14px;
	padding-left: 10px;
	border-left: 3px solid var(--accent);
}

.empty-note { color: var(--muted); padding: 40px 0; text-align: center; }

/* --------------------------------------------------------------------------
   Video grid + cards
   -------------------------------------------------------------------------- */
.video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px 14px;
}

.video-card { min-width: 0; }

.card-thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--surface-2);
	border-radius: var(--radius);
	overflow: hidden;
}
.card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}
.video-card:hover .card-thumb img { transform: scale(1.04); }

.badge-duration {
	position: absolute;
	right: 6px;
	bottom: 6px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 1px 6px;
	border-radius: 4px;
}

.card-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	margin: 8px 0 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.video-card:hover .card-title { color: var(--accent); }

.card-meta {
	margin: 0;
	font-size: 12.5px;
	color: var(--muted);
}
.dot { margin: 0 4px; }

/* --------------------------------------------------------------------------
   Single video
   -------------------------------------------------------------------------- */
.single-video { max-width: 960px; margin: 0 auto; }

.player-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--radius);
	overflow: hidden;
}
.xhub-video {
	width: 100%;
	height: 100%;
	display: block;
	background: #000;
}
.play-overlay {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 76px;
	height: 76px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}
.play-overlay:hover { background: var(--accent); transform: scale(1.07); }
.play-overlay svg { width: 30px; height: 30px; fill: #fff; margin-left: 5px; }
.play-overlay.is-hidden { display: none; }

.video-title { font-size: 20px; margin: 16px 0 6px; line-height: 1.4; }

.video-meta { color: var(--muted); font-size: 13px; margin: 0 0 12px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.chip {
	background: var(--surface-2);
	color: var(--muted);
	font-size: 12.5px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}
.chip:hover { color: var(--text); background: #232323; }
.chip-cat { background: var(--accent-soft); color: var(--accent); }
.chip-cat:hover { color: var(--accent); background: rgba(255, 138, 0, 0.24); }

.video-desc { color: var(--muted); font-size: 14px; }

/* --------------------------------------------------------------------------
   Pages / prose / 404
   -------------------------------------------------------------------------- */
.page-content { max-width: 760px; margin: 0 auto; }
.prose a { color: var(--accent); }
.prose img { border-radius: var(--radius); }

.notfound { text-align: center; padding: 60px 0; }
.notfound .page-heading { font-size: 56px; color: var(--accent); margin-bottom: 4px; }

.btn {
	display: inline-block;
	background: var(--accent);
	color: #000000;
	font-weight: 700;
	padding: 8px 18px;
	border-radius: var(--radius);
	margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pagination { margin-top: 28px; }
.pagination .nav-links {
	display: flex;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
}
.pagination .page-numbers {
	background: var(--surface-2);
	color: var(--muted);
	min-width: 36px;
	text-align: center;
	padding: 6px 10px;
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
}
.pagination .page-numbers.current {
	background: var(--accent);
	color: #000000;
}
.pagination a.page-numbers:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
	background: var(--surface);
	border-top: 1px solid #1B1B1B;
	margin-top: 40px;
}
.footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	color: var(--muted);
	font-size: 13px;
}
.footer-note {
	border: 1px solid var(--muted);
	border-radius: 4px;
	padding: 0 6px;
	font-weight: 700;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
	.header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; row-gap: 8px; }
	.search-form { order: 3; flex-basis: 100%; max-width: none; }
	.video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 10px; }
	.video-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.card-thumb img { transition: none; }
	.video-card:hover .card-thumb img { transform: none; }
}

/* --------------------------------------------------------------------------
 * v0.3.2 — touch devices: hide the custom play overlay.
 * Mobile browsers already draw their own centered play button on the
 * native <video> controls, so ours appeared doubled on phones/tablets.
 * (hover: none) matches touch-primary devices; desktop keeps the overlay.
 * ---------------------------------------------------------------------------- */
@media (hover: none) {
	.play-overlay {
		display: none;
	}
}
