/*
Theme Name: Roblox Hub
Theme URI: https://example.com
Author: Hazel Thomas
Description: Hand-coded dark gaming theme for a multi-game Roblox calculator hub. Presentation only — all calculator/value logic lives in the Roblox Calculator Engine plugin, so this theme can be swapped without losing tools. Every game page themes itself from its own accent color.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: roblox-hub
*/

/* ------------------------------------------------------------------ *
 * Design tokens
 * Per-game pages override --rh-accent with the game's own accent color,
 * so one stylesheet themes all 19 games.
 * ------------------------------------------------------------------ */

:root {
	--rh-bg: #0b0d13;
	--rh-surface: #12141c;
	--rh-surface-2: #1b1e29;
	--rh-surface-3: #242835;
	--rh-border: #2c3040;
	--rh-text: #e8eaf0;
	--rh-dim: #8b90a3;
	--rh-accent: #6c5ce7;
	--rh-accent-2: #00cec9;

	--rh-radius: 12px;
	--rh-radius-sm: 8px;
	--rh-wrap: 1180px;
	--rh-gap: 20px;

	--rh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--rh-bg);
	color: var(--rh-text);
	font-family: var(--rh-font);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--rh-accent-2);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1, h2, h3, h4 {
	line-height: 1.25;
	margin: 0 0 0.5em;
	font-weight: 700;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }

.rh-wrap {
	width: 100%;
	max-width: var(--rh-wrap);
	margin: 0 auto;
	padding: 0 20px;
}

.rh-skip {
	position: absolute;
	left: -9999px;
}

.rh-skip:focus {
	left: 8px;
	top: 8px;
	z-index: 100;
	background: var(--rh-accent);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--rh-radius-sm);
}

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

.rh-header {
	background: rgba(11, 13, 19, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--rh-border);
	position: sticky;
	top: 0;
	z-index: 50;
}

.rh-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 64px;
}

.rh-logo {
	font-weight: 800;
	font-size: 1.15rem;
	color: var(--rh-text);
	letter-spacing: -0.02em;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.rh-logo:hover {
	text-decoration: none;
}

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

.rh-nav ul {
	list-style: none;
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.rh-nav a {
	color: var(--rh-dim);
	padding: 8px 14px;
	border-radius: var(--rh-radius-sm);
	font-size: 0.92rem;
	font-weight: 600;
	display: block;
}

.rh-nav a:hover,
.rh-nav .current-menu-item > a {
	color: var(--rh-text);
	background: var(--rh-surface-2);
	text-decoration: none;
}

.rh-nav-toggle {
	display: none;
	background: var(--rh-surface-2);
	border: 1px solid var(--rh-border);
	color: var(--rh-text);
	border-radius: var(--rh-radius-sm);
	padding: 8px 12px;
	cursor: pointer;
	font-size: 1rem;
}

@media (max-width: 860px) {
	.rh-nav-toggle { display: block; }

	.rh-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--rh-surface);
		border-bottom: 1px solid var(--rh-border);
		padding: 12px 20px;
	}

	.rh-nav.is-open { display: block; }

	.rh-nav ul {
		flex-direction: column;
	}
}

/* ------------------------------------------------------------------ *
 * Breadcrumbs
 * ------------------------------------------------------------------ */

.rh-breadcrumbs {
	font-size: 0.85rem;
	color: var(--rh-dim);
	padding: 16px 0 0;
}

.rh-breadcrumbs a {
	color: var(--rh-dim);
}

.rh-breadcrumbs a:hover {
	color: var(--rh-text);
}

/* ------------------------------------------------------------------ *
 * Generic page/post content
 * ------------------------------------------------------------------ */

.rh-main {
	padding: 28px 0 60px;
	min-height: 60vh;
}

.rh-content {
	max-width: 760px;
}

.rh-content img {
	border-radius: var(--rh-radius-sm);
}

.rh-content ul,
.rh-content ol {
	padding-left: 1.25em;
}

.rh-card {
	background: var(--rh-surface);
	border: 1px solid var(--rh-border);
	border-radius: var(--rh-radius);
	padding: 20px;
}

.rh-btn {
	display: inline-block;
	background: var(--rh-accent);
	color: #fff;
	font-weight: 700;
	padding: 11px 22px;
	border-radius: var(--rh-radius-sm);
	border: none;
	cursor: pointer;
	font-size: 0.95rem;
}

.rh-btn:hover {
	text-decoration: none;
	filter: brightness(1.12);
}

.rh-btn-ghost {
	background: transparent;
	border: 1px solid var(--rh-border);
	color: var(--rh-text);
}

/* ------------------------------------------------------------------ *
 * Games hub (/games/)
 * ------------------------------------------------------------------ */

.rh-hero {
	text-align: center;
	padding: 48px 0 36px;
}

.rh-hero p {
	color: var(--rh-dim);
	max-width: 620px;
	margin: 0 auto;
	font-size: 1.05rem;
}

.rh-game-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--rh-gap);
	padding: 8px 0 40px;
}

.rh-game-card {
	--rh-card-accent: var(--rh-accent);
	background: var(--rh-surface);
	border: 1px solid var(--rh-border);
	border-radius: var(--rh-radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	color: var(--rh-text);
	transition: border-color 0.15s, transform 0.15s, background 0.15s;
	position: relative;
	overflow: hidden;
}

.rh-game-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 3px;
	background: var(--rh-card-accent);
	opacity: 0.85;
}

.rh-game-card:hover {
	border-color: var(--rh-card-accent);
	background: var(--rh-surface-2);
	transform: translateY(-2px);
	text-decoration: none;
}

.rh-game-card img,
.rh-game-icon-fallback {
	width: 64px;
	height: 64px;
	object-fit: contain;
	border-radius: 14px;
	background: var(--rh-surface-3);
}

.rh-game-icon-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--rh-card-accent);
}

.rh-game-name {
	font-weight: 700;
	font-size: 1.02rem;
	line-height: 1.3;
}

.rh-game-meta {
	font-size: 0.8rem;
	color: var(--rh-dim);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

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

.rh-game-header {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 24px 0 20px;
	border-bottom: 1px solid var(--rh-border);
	margin-bottom: 22px;
}

.rh-game-header img,
.rh-game-header .rh-game-icon-fallback {
	width: 72px;
	height: 72px;
	flex-shrink: 0;
}

.rh-game-header h1 {
	margin: 0 0 4px;
}

.rh-game-tagline {
	color: var(--rh-dim);
	font-size: 0.95rem;
	margin: 0;
}

.rh-game-stats {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	font-size: 0.82rem;
	color: var(--rh-dim);
	margin-top: 6px;
}

.rh-game-stats strong {
	color: var(--rh-accent);
}

/* Tabs — Overview / Calculator / Values */
.rh-tabs {
	display: flex;
	gap: 6px;
	border-bottom: 1px solid var(--rh-border);
	margin-bottom: 24px;
	overflow-x: auto;
}

.rh-tab {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	color: var(--rh-dim);
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	padding: 12px 18px;
	cursor: pointer;
	white-space: nowrap;
}

.rh-tab:hover {
	color: var(--rh-text);
}

.rh-tab[aria-selected="true"] {
	color: var(--rh-accent);
	border-bottom-color: var(--rh-accent);
}

/* Panels are visible by default so the page still works with JS disabled;
   the script hides the inactive ones once it takes over. */
.rh-panel {
	margin-bottom: 32px;
}

.rh-panel-heading {
	font-size: 1.2rem;
	margin-bottom: 12px;
}

.js .rh-panel[hidden] {
	display: none;
}

.js .rh-panel {
	margin-bottom: 0;
}

.js .rh-panel-heading {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.rh-updated {
	font-size: 0.8rem;
	color: var(--rh-dim);
	margin-top: 14px;
}

.rh-overview {
	max-width: 820px;
}

.rh-overview h2 {
	margin-top: 1.4em;
}

/* FAQ blocks on game pages */
.rh-faq {
	margin-top: 28px;
}

.rh-faq details {
	background: var(--rh-surface);
	border: 1px solid var(--rh-border);
	border-radius: var(--rh-radius-sm);
	padding: 14px 18px;
	margin-bottom: 10px;
}

.rh-faq summary {
	cursor: pointer;
	font-weight: 700;
}

.rh-faq details[open] summary {
	margin-bottom: 8px;
	color: var(--rh-accent);
}

/* Related games strip */
.rh-related {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--rh-border);
}

.rh-related-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.rh-related-list a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--rh-surface);
	border: 1px solid var(--rh-border);
	border-radius: 999px;
	padding: 6px 14px 6px 6px;
	color: var(--rh-text);
	font-size: 0.88rem;
	font-weight: 600;
}

.rh-related-list a:hover {
	border-color: var(--rh-accent);
	text-decoration: none;
}

.rh-related-list img {
	width: 26px;
	height: 26px;
	border-radius: 8px;
	object-fit: contain;
}

/* ------------------------------------------------------------------ *
 * Post cards / archives
 * ------------------------------------------------------------------ */

.rh-post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: var(--rh-gap);
}

.rh-post-card {
	background: var(--rh-surface);
	border: 1px solid var(--rh-border);
	border-radius: var(--rh-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.rh-post-card img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.rh-post-card-body {
	padding: 16px;
}

.rh-post-card h2 {
	font-size: 1.05rem;
	margin-bottom: 6px;
}

.rh-post-card h2 a {
	color: var(--rh-text);
}

.rh-post-card p {
	color: var(--rh-dim);
	font-size: 0.9rem;
	margin: 0;
}

.rh-pagination {
	margin-top: 32px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.rh-pagination .page-numbers {
	background: var(--rh-surface);
	border: 1px solid var(--rh-border);
	border-radius: var(--rh-radius-sm);
	padding: 8px 14px;
	color: var(--rh-text);
}

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

/* ------------------------------------------------------------------ *
 * Search form
 * ------------------------------------------------------------------ */

.rh-searchform {
	display: flex;
	gap: 8px;
	max-width: 420px;
}

.rh-searchform input[type="search"] {
	flex: 1;
	background: var(--rh-surface-2);
	border: 1px solid var(--rh-border);
	color: var(--rh-text);
	padding: 10px 14px;
	border-radius: var(--rh-radius-sm);
	font-size: 0.95rem;
}

.rh-searchform input[type="search"]:focus {
	outline: none;
	border-color: var(--rh-accent);
}

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

.rh-footer {
	background: var(--rh-surface);
	border-top: 1px solid var(--rh-border);
	padding: 36px 0;
	font-size: 0.88rem;
	color: var(--rh-dim);
}

.rh-footer-inner {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.rh-footer ul {
	list-style: none;
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.rh-footer a {
	color: var(--rh-dim);
}

.rh-footer a:hover {
	color: var(--rh-text);
}

.rh-disclaimer {
	margin-top: 18px;
	font-size: 0.8rem;
	line-height: 1.6;
	max-width: 720px;
}

/* ------------------------------------------------------------------ *
 * Accessibility / motion
 * ------------------------------------------------------------------ */

:focus-visible {
	outline: 2px solid var(--rh-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
		animation: none !important;
	}
}
