/* ==================== FILE: global_styles.css ==================== */
/* === GammaCube — global tokens, reset, base, shared components === */

:root {
	--gc-bg: #07070f;
	--gc-bg-secondary: #0d0d1a;
	--gc-bg-card: rgba(255, 255, 255, 0.04);
	--gc-border: rgba(255, 255, 255, 0.08);
	--gc-green: #00ff88;
	--gc-purple: #a855f7;
	--gc-blue: #3b82f6;
	--gc-gold: #f59e0b;
	--gc-text: #f0f0ff;
	--gc-muted: #8888aa;
	--gc-radius-sm: 8px;
	--gc-radius-md: 12px;
	--gc-radius-lg: 20px;
	--gc-space: 8px;
	--gc-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--gc-font-display: "Orbitron", sans-serif;
	--gc-font-body: "Inter", sans-serif;
	--gc-glow-green: 0 0 20px rgba(0, 255, 136, 0.35), 0 0 60px rgba(0, 255, 136, 0.12);
	--gc-glow-purple: 0 0 20px rgba(168, 85, 247, 0.35), 0 0 60px rgba(168, 85, 247, 0.12);
	--gc-glow-gold: 0 0 20px rgba(245, 158, 11, 0.35), 0 0 60px rgba(245, 158, 11, 0.12);
	/* Fixed navbar height + body offset (gc-has-fixed-nav) */
	--gc-header-h: 80px;
	/* Galaxy / space backdrop (body layers; cards still use --gc-bg / --gc-bg-card) */
	--gc-bg-deep: #050507;
	--gc-bg-gradient-bottom: #050507;
	--gc-bg-gradient-mid: #07070f;
	--gc-bg-gradient-top: #0d0d1a;
}

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

html {
	scroll-behavior: smooth;
	min-height: 100%;
	background-color: var(--gc-bg-deep);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--gc-font-body);
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--gc-text);
	-webkit-font-smoothing: antialiased;
	/* Galaxy: noise + vignette + nebula radials + deep space (CSS-only; first image = topmost) */
	background-color: var(--gc-bg-deep);
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E"),
		radial-gradient(
			ellipse 125% 115% at 50% 50%,
			rgba(5, 5, 7, 0) 38%,
			rgba(0, 0, 0, 0.38) 100%
		),
		radial-gradient(circle at 30% 70%, rgba(0, 255, 136, 0.08), transparent 40%),
		radial-gradient(circle at 70% 30%, rgba(168, 85, 247, 0.08), transparent 40%),
		radial-gradient(circle at 20% 80%, rgba(13, 13, 26, 0.6), transparent 60%),
		radial-gradient(circle at 80% 20%, rgba(26, 16, 51, 0.5), transparent 60%),
		linear-gradient(
			to top,
			var(--gc-bg-gradient-bottom) 0%,
			#06060d 28%,
			var(--gc-bg-gradient-mid) 58%,
			#0b0b16 82%,
			var(--gc-bg-gradient-top) 100%
		);
	background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
	background-size: 160px 160px, auto, auto, auto, auto, auto, auto;
	background-position: 0 0, center, center, center, center, center, center;
	background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed;
	background-blend-mode: soft-light, normal, normal, normal, normal, normal, normal;
}

/* Offset for fixed global navbar (pages that include includes/navbar.php) */
body.gc-has-fixed-nav {
	padding-top: var(--gc-header-h);
}

@media (max-width: 767px) {
	/* iOS lama kadang bermasalah dengan fixed + banyak layer — scroll lebih aman */
	body {
		background-attachment: scroll, scroll, scroll, scroll, scroll, scroll, scroll;
	}
}

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

a {
	color: var(--gc-green);
	text-decoration: none;
	transition: color var(--gc-transition), opacity var(--gc-transition);
}

a:hover {
	color: #33ffaa;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--gc-green);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
	font-family: var(--gc-font-display);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

p {
	margin: 0;
}

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

/* --- Layout shell (subpages) --- */
.gc-page {
	position: relative;
	min-height: 100vh;
	padding-bottom: calc(var(--gc-space) * 10);
}

#tsparticles {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

/* Library injects <canvas> with default pointer-events: auto — it would steal clicks */
#tsparticles canvas,
#tsparticles .tsparticles-canvas-el {
	pointer-events: none !important;
}

/* --- Global fixed navbar (all pages) — horizontal SaaS-style --- */
.gc-navbar {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 9999;
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-rows: auto auto;
	grid-template-areas:
		"brand toggle actions"
		"menu menu menu";
	align-items: center;
	gap: calc(var(--gc-space) * 2);
	row-gap: 0;
	min-height: var(--gc-header-h);
	padding: calc(var(--gc-space) * 1.75) 24px;
	box-sizing: border-box;
	background: transparent;
	border-bottom: 1px solid transparent;
	transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease,
		-webkit-backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

.gc-navbar.scrolled {
	background: rgba(13, 13, 26, 0.75);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom-color: var(--gc-border);
}

.gc-navbar__brand {
	grid-area: brand;
	display: flex;
	align-items: center;
	flex-shrink: 0;
	min-width: 0;
}

.gc-navbar__logo {
	display: block;
	width: auto;
	height: 36px;
	max-height: 36px;
	margin-right: 24px;
	object-fit: contain;
	filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.25));
	transition: filter 0.3s ease;
}

.gc-navbar__brand:hover .gc-navbar__logo {
	filter: drop-shadow(0 0 12px rgba(0, 255, 136, 0.38));
}

.gc-navbar__toggle {
	grid-area: toggle;
	justify-self: end;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: calc(var(--gc-space) * 5);
	height: calc(var(--gc-space) * 5);
	padding: 0;
	border: 1px solid var(--gc-border);
	border-radius: var(--gc-radius-sm);
	background: var(--gc-bg-card);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
	transition: border-color 0.3s ease, background 0.3s ease;
}

.gc-navbar__toggle-bar {
	display: block;
	width: 60%;
	height: 2px;
	margin: 0 auto;
	background: var(--gc-text);
	border-radius: 1px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.gc-navbar__toggle[aria-expanded="true"] .gc-navbar__toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.gc-navbar__toggle[aria-expanded="true"] .gc-navbar__toggle-bar:nth-child(2) {
	opacity: 0;
}

.gc-navbar__toggle[aria-expanded="true"] .gc-navbar__toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.gc-navbar__actions {
	grid-area: actions;
	justify-self: end;
	display: flex;
	flex-direction: column;
	gap: calc(var(--gc-space) * 1.5);
	align-items: stretch;
}

.gc-navbar__menu {
	grid-area: menu;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: calc(var(--gc-space) * 0.5);
	padding: 0 calc(var(--gc-space) * 2) calc(var(--gc-space) * 2);
	background: rgba(13, 13, 26, 0.82);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--gc-border);
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.gc-navbar__menu.open {
	max-height: 100vh;
	opacity: 1;
	pointer-events: auto;
	padding-top: calc(var(--gc-space) * 2);
}

.gc-navbar__link {
	padding: calc(var(--gc-space) * 1.25) calc(var(--gc-space) * 1.5);
	font-family: var(--gc-font-body);
	font-weight: 500;
	font-size: 0.9375rem;
	color: var(--gc-muted);
	border-radius: var(--gc-radius-md);
	transition: color 0.3s ease, background 0.3s ease, text-shadow 0.3s ease, box-shadow 0.3s ease;
}

.gc-navbar__link:hover {
	color: var(--gc-text);
	background: rgba(255, 255, 255, 0.05);
	text-shadow: 0 0 14px rgba(0, 255, 136, 0.2);
}

.gc-navbar__link--active {
	color: var(--gc-green);
	background: rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 -2px 0 rgba(0, 255, 136, 0.45);
}

.gc-navbar__link--active:hover {
	color: var(--gc-green);
	text-shadow: 0 0 16px rgba(0, 255, 136, 0.35);
	background: rgba(0, 255, 136, 0.08);
}

/* Desktop / tablet: single row, no hamburger, centered nav */
@media (min-width: 768px) {
	.gc-navbar__toggle {
		display: none;
	}

	.gc-navbar {
		grid-template-rows: auto;
		grid-template-areas: "brand menu actions";
		grid-template-columns: auto 1fr auto;
		padding-inline: clamp(20px, 4vw, 40px);
	}

	.gc-navbar__logo {
		height: clamp(42px, 4.5vw, 52px);
		max-height: 52px;
	}

	.gc-navbar__menu {
		position: static;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		flex-wrap: wrap;
		gap: clamp(28px, 3.5vw, 36px);
		padding: 0;
		background: transparent;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		border: none;
		max-height: none;
		overflow: visible;
		opacity: 1;
		pointer-events: auto;
	}

	.gc-navbar__menu.open {
		max-height: none;
	}

	.gc-navbar__link {
		padding: calc(var(--gc-space) * 1) calc(var(--gc-space) * 1.25);
		white-space: nowrap;
	}

	.gc-navbar__actions {
		flex-direction: row;
		align-items: center;
		margin-top: 0;
		flex-shrink: 0;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: calc(var(--gc-space) * 1.5);
	}
}

.gc-page__inner,
.gc-container {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: calc(var(--gc-space) * 2);
}

@media (min-width: 768px) {
	.gc-container {
		padding-inline: calc(var(--gc-space) * 3);
	}
}

/* --- Glass card --- */
.gc-glass {
	background: var(--gc-bg-card);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--gc-border);
	border-radius: var(--gc-radius-md);
}

/* --- Labels / captions --- */
.gc-label {
	font-family: var(--gc-font-body);
	font-weight: 500;
	font-size: 0.875rem;
	line-height: 1.4;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--gc-muted);
}

/* --- Buttons --- */
.gc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: calc(var(--gc-space) * 0.5);
	padding: calc(var(--gc-space) * 1.5) calc(var(--gc-space) * 2.5);
	font-family: var(--gc-font-body);
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.25;
	border-radius: var(--gc-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform var(--gc-transition), box-shadow var(--gc-transition),
		background var(--gc-transition), border-color var(--gc-transition),
		color var(--gc-transition);
	text-decoration: none;
	color: inherit;
}

.gc-btn:active {
	transform: translateY(1px);
}

.gc-btn--primary {
	background: linear-gradient(135deg, #00cc6a 0%, var(--gc-green) 100%);
	color: #04120a;
	border-color: rgba(0, 255, 136, 0.35);
	box-shadow: var(--gc-glow-green);
}

.gc-btn--primary:hover {
	filter: brightness(1.08);
	color: #020806;
}

.gc-btn--purple {
	background: linear-gradient(135deg, #9333ea 0%, var(--gc-purple) 100%);
	color: #faf5ff;
	border-color: rgba(168, 85, 247, 0.45);
	box-shadow: var(--gc-glow-purple);
}

.gc-btn--purple:hover {
	filter: brightness(1.08);
	color: #fff;
}

.gc-btn--ghost {
	background: transparent;
	border-color: var(--gc-border);
	color: var(--gc-text);
}

.gc-btn--ghost:hover {
	border-color: rgba(0, 255, 136, 0.35);
	color: var(--gc-green);
}

.gc-btn--sm {
	padding: calc(var(--gc-space) * 1) calc(var(--gc-space) * 1.5);
	font-size: 0.8125rem;
}

/* --- Badges --- */
.gc-badge {
	display: inline-flex;
	align-items: center;
	gap: calc(var(--gc-space) * 0.5);
	padding: calc(var(--gc-space) * 0.5) calc(var(--gc-space) * 1.25);
	font-size: 0.75rem;
	font-weight: 600;
	font-family: var(--gc-font-display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border-radius: 999px;
	border: 1px solid var(--gc-border);
}

.gc-badge--java {
	color: var(--gc-green);
	border-color: rgba(0, 255, 136, 0.35);
	background: rgba(0, 255, 136, 0.08);
}

.gc-badge--bedrock {
	color: var(--gc-blue);
	border-color: rgba(59, 130, 246, 0.4);
	background: rgba(59, 130, 246, 0.1);
}

.gc-badge--purple {
	color: var(--gc-purple);
	border-color: rgba(168, 85, 247, 0.4);
	background: rgba(168, 85, 247, 0.1);
}

.gc-badge--gold {
	color: var(--gc-gold);
	border-color: rgba(245, 158, 11, 0.4);
	background: rgba(245, 158, 11, 0.1);
}

/* --- Section headings --- */
.gc-section-head {
	text-align: center;
	margin-bottom: calc(var(--gc-space) * 5);
}

.gc-section-title {
	font-family: var(--gc-font-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 3vw, 2.5rem);
	color: var(--gc-text);
	margin-bottom: calc(var(--gc-space) * 1.5);
}

.gc-section-sub {
	font-size: 1rem;
	color: var(--gc-muted);
	max-width: 42rem;
	margin-inline: auto;
}

/* --- Links row --- */
.gc-link-row {
	display: inline-flex;
	align-items: center;
	gap: calc(var(--gc-space) * 1);
	margin-top: calc(var(--gc-space) * 3);
	font-weight: 600;
	font-size: 0.9375rem;
	color: var(--gc-green);
}

.gc-link-row:hover {
	color: #66ffc4;
}

/* --- Breadcrumb / back link --- */
.gc-back {
	display: inline-flex;
	align-items: center;
	gap: calc(var(--gc-space) * 0.5);
	margin-bottom: calc(var(--gc-space) * 3);
	font-weight: 500;
	font-size: 0.9375rem;
	color: var(--gc-muted);
}

.gc-back:hover {
	color: var(--gc-green);
}

/* --- PWA install (preserved behavior, styled) --- */
.install-btn {
	margin-top: calc(var(--gc-space) * 2);
	padding: calc(var(--gc-space) * 1.5) calc(var(--gc-space) * 3);
	font-family: var(--gc-font-body);
	font-weight: 700;
	font-size: 0.875rem;
	color: #fff;
	background: linear-gradient(#16a34a, #15803d);
	border: 2px solid #14532d;
	border-radius: var(--gc-radius-sm);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 0 #14532d;
	cursor: pointer;
	display: none;
}

.install-btn:hover {
	filter: brightness(1.1);
}

.install-btn:active {
	transform: translateY(2px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 0 #14532d;
}

.install-btn:focus-visible {
	outline: 2px solid var(--gc-green);
	outline-offset: 2px;
}

/* --- Data animate --- */
[data-animate] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	[data-animate] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* --- Empty states --- */
.gc-empty-state {
	text-align: center;
	color: var(--gc-muted);
	font-size: 0.9375rem;
	padding: calc(var(--gc-space) * 4);
}

.hidden {
	display: none !important;
}

.gc-text-center {
	text-align: center;
}

.gc-mt-section-link {
	margin-top: calc(var(--gc-space) * 3);
}

.gc-span-full {
	grid-column: 1 / -1;
}

.gc-inline-cmd {
	display: inline;
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	font-weight: 500;
	font-size: 0.8125rem;
	text-transform: none;
	letter-spacing: normal;
	color: var(--gc-green);
}
