:root {
	color-scheme: dark;
	--celestial-ink: #080f1d;
	--celestial-panel: rgba(12, 24, 42, 0.94);
	--celestial-panel-raised: rgba(20, 37, 59, 0.96);
	--celestial-gold: #d9ad59;
	--celestial-gold-bright: #f2d18a;
	--celestial-blue: #36c9ec;
	--celestial-text: #f1f5fa;
	--celestial-muted: #a8b8c9;
	--celestial-line: rgba(217, 173, 89, 0.42);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--celestial-ink); }

body {
	min-height: 100vh;
	margin: 0;
	color: var(--celestial-text);
	background-color: var(--celestial-ink);
	background-image: url("../img/celestial/bottom.png"), url("../img/celestial/middle.png"), url("../img/celestial/top.png");
	background-position: center bottom, center 590px, center top;
	background-repeat: no-repeat;
	background-size: min(100%, 2098px) 520px, min(100%, 2098px) 750px, min(100%, 2098px) 650px;
	font-family: "Trebuchet MS", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

a { color: var(--celestial-gold-bright); text-decoration: none; }
a:hover { color: #fff0c6; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
	outline: 2px solid var(--celestial-blue);
	outline-offset: 3px;
}

.main {
	position: relative;
	z-index: 1;
	width: min(1420px, calc(100% - 48px));
	margin: 0 auto;
}

.celestial-nav {
	position: relative;
	z-index: 5;
	margin: 0 -1px;
	border: 1px solid var(--celestial-line);
	background: rgba(5, 12, 23, 0.92);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38);
}

.celestial-nav .container {
	display: flex;
	min-height: 78px;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 8px 20px;
	overflow: visible;
}

.celestial-brand, .footer-brand {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 9px;
	color: var(--celestial-gold-bright);
	font: 26px/0.9 Georgia, "Times New Roman", serif;
	letter-spacing: 0.04em;
}

.celestial-brand img { width: 54px; height: 54px; object-fit: contain; }
.celestial-brand small, .footer-brand small {
	display: block;
	margin-top: 5px;
	font: 10px/1 Arial, sans-serif;
	letter-spacing: 0.34em;
	text-align: center;
	text-transform: uppercase;
}

.celestial-links, .celestial-nav-actions {
	display: flex;
	align-items: center;
	gap: clamp(12px, 2vw, 30px);
}

.celestial-links a, .celestial-login {
	padding: 10px 2px;
	color: #d8e0ea;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.celestial-links a:hover, .celestial-login:hover { color: var(--celestial-gold-bright); }
.celestial-nav-actions { gap: 16px; }
.celestial-register, .celestial-button {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 10px 18px;
	border: 1px solid var(--celestial-gold);
	border-radius: 5px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-align: center;
	text-transform: uppercase;
	transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.celestial-register, .celestial-button-gold {
	color: #15131a;
	background: linear-gradient(180deg, #f7d991, #c38c36);
	box-shadow: inset 0 1px rgba(255,255,255,.65), 0 3px 18px rgba(217,173,89,.22);
}

.celestial-button-blue {
	color: #e8faff;
	border-color: rgba(82, 211, 244, .76);
	background: linear-gradient(180deg, rgba(27, 101, 147, .95), rgba(10, 37, 69, .97));
	box-shadow: inset 0 1px rgba(255,255,255,.22), 0 3px 18px rgba(34, 171, 218, .2);
}

.celestial-register:hover, .celestial-button:hover { color: #fff; filter: brightness(1.12); transform: translateY(-1px); }

.banner {
	position: relative;
	display: flex;
	min-height: clamp(330px, 35vw, 470px);
	align-items: center;
	margin: 0;
	padding: clamp(28px, 6vw, 78px);
	border: 1px solid var(--celestial-line);
	border-top: 0;
	background-color: #101e31;
	background-image: linear-gradient(90deg, rgba(5, 12, 23, .94) 0%, rgba(5, 12, 23, .73) 34%, rgba(5, 12, 23, .08) 76%), linear-gradient(0deg, rgba(5, 12, 23, .35), transparent 48%), url("../img/celestial/hero.png");
	background-position: center, center, center 48%;
	background-size: cover;
	overflow: hidden;
}

.hero-copy { position: relative; z-index: 1; max-width: 560px; }
.hero-eyebrow { margin: 0 0 10px; color: var(--celestial-gold-bright); font-size: 11px; letter-spacing: .36em; text-transform: uppercase; }
.hero-copy h1 { margin: 0; color: #f7e2b4; font: clamp(48px, 7.2vw, 88px)/.98 Georgia, "Times New Roman", serif; text-shadow: 0 3px 20px rgba(0,0,0,.65); }
.hero-copy h1 span { display: block; margin: 12px 0 0 5px; color: #f3f5fb; font-size: .34em; letter-spacing: .44em; text-transform: uppercase; }
.hero-description { margin: 22px 0 26px; color: #d4deea; font: 17px Georgia, "Times New Roman", serif; letter-spacing: .1em; text-transform: uppercase; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.feedContainer {
	display: grid;
	grid-template-columns: minmax(0, 1.85fr) minmax(280px, .8fr);
	gap: 22px;
	margin: 26px 0 42px;
	padding: 18px;
	border: 1px solid var(--celestial-line);
	background: linear-gradient(145deg, rgba(8, 17, 30, .88), rgba(9, 20, 36, .72));
	box-shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

.feedContainer > .topPane { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border: 1px solid rgba(54,201,236,.22); background: rgba(10, 25, 43, .9); }
.feedContainer > .topPane:after { display: block; clear: both; content: ""; }
.leftPane, .rightPane { float: none; width: auto; min-width: 0; background: transparent; }
.leftPane { padding: 0; }
.rightPane { display: grid; align-content: start; gap: 16px; }

.widget, .postHolder, #news, #changelogTable, .page_characterprofile #characterProfileTable, .page_highscores table {
	position: relative;
	margin: 0 0 16px;
	border: 1px solid rgba(217, 173, 89, .32);
	background: linear-gradient(145deg, var(--celestial-panel-raised), var(--celestial-panel));
	box-shadow: inset 0 1px rgba(255,255,255,.035), 0 10px 28px rgba(0,0,0,.22);
}

.widget { margin: 0; padding: 0; overflow: hidden; }
.widget .header, .postHolder .header {
	min-height: 60px;
	display: flex;
	align-items: center;
	padding: 10px 22px;
	border: 0;
	border-bottom: 1px solid rgba(217, 173, 89, .25);
	background: linear-gradient(90deg, rgba(20, 43, 66, .98), rgba(12, 25, 42, .97));
	color: var(--celestial-gold-bright);
	font: 18px Georgia, "Times New Roman", serif;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.widget .body, .postHolder .body { padding: 18px 20px; color: var(--celestial-muted); }
.widget ul { margin: 0; padding: 0; }
.widget li { list-style: none; padding: 5px 0; }
.widget table { width: 100%; padding: 0; border-collapse: collapse; background: transparent; }
.widget td, .widget th { padding: 9px 7px; border-bottom: 1px solid rgba(174, 197, 219, .1); color: var(--celestial-muted); }
.widget tr:last-child td { border-bottom: 0; }
.widget td a { color: var(--celestial-text); }
.widget td a:hover { color: var(--celestial-gold-bright); }
.widget .body > ul > li:first-child { color: #a8e7c6; }
.server-info-widget .header { min-height: 74px; justify-content: center; border: 0; background: url("../img/celestial/status.png") center / 100% 100% no-repeat; text-align: center; }
.widget .submitButton, .widget input[type="submit"], .widget button {
	width: 100%;
	min-height: 42px;
	border: 1px solid var(--celestial-gold);
	border-radius: 4px;
	color: #17151a;
	background: linear-gradient(180deg, #f4d68f, #c18c3e);
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.widget input[type="text"], .widget input[type="password"], .widget input[type="email"], .widget select, .widget textarea,
.leftPane input, .leftPane select, .leftPane textarea {
	width: 100%;
	min-height: 42px;
	padding: 9px 11px;
	border: 1px solid rgba(153, 184, 214, .27);
	border-radius: 3px;
	color: var(--celestial-text);
	background: rgba(4, 13, 25, .78);
}

.widget label { display: block; margin: 0 0 5px; color: #c6d3df; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.widget .well { margin: 0 0 13px; padding: 0; background: transparent; }
.loginForm { display: grid; gap: 0; }
.loginForm .well:last-of-type { margin: 0; }
.loginContainer center { margin-top: 14px; }
.loginContainer h3 { font-size: 13px; }
.loginContainer p { margin: 9px 0 0; font-size: 11px; }
.linkbuttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 0; }
.linkbuttons li { float: none; width: auto; margin: 0 !important; border: 1px solid rgba(217,173,89,.38); background: rgba(6,15,27,.72); }
.linkbuttons li a { display: block; padding: 9px; }

#news { width: 100%; margin: 0 0 18px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
#news tr, #news td { display: block; }
#news td { padding: 14px 18px; border: 0; }
#news .zheadline { border-bottom: 1px solid rgba(217,173,89,.2); color: #c5d2df; font-size: 12px; }
#news .zheadline b { color: var(--celestial-gold-bright); font: 18px Georgia, "Times New Roman", serif; }
#news p { margin: 0; color: #d4deea; line-height: 1.7; }
#changelogTable { width: 100%; margin: 0 0 18px; border-collapse: collapse; }
#changelogTable td { padding: 11px 13px; border-bottom: 1px solid rgba(174,197,219,.1); }
table tr:nth-child(2n+1), .feedContainer table, .feedContainer .well { background-color: transparent; }
.leftPane img { height: auto; border-radius: 3px; }
.leftPane .alert-box { padding: 12px; border-radius: 4px; }

.page_yahcheh .leftPane, .page_register .leftPane { max-width: 900px; }
.page_yahcheh .leftPane input, .page_register .leftPane input, .page_yahcheh .leftPane button, .page_register .leftPane button { margin: 5px 0; }
.page_yahcheh .leftPane button, .page_register .leftPane button { min-height: 42px; padding: 9px 18px; border: 1px solid var(--celestial-gold); border-radius: 4px; color: #17151a; background: linear-gradient(180deg, #f4d68f, #c18c3e); font-weight: 700; }

.celestial-footer {
	position: relative;
	display: flex;
	min-height: 190px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin: 38px 0 0;
	padding: 28px 30px 20px;
	border: 1px solid var(--celestial-line);
	background: linear-gradient(180deg, rgba(7,15,27,.7), rgba(5,11,20,.96)), url("../img/celestial/realm.png") center 56% / cover no-repeat;
}

.footer-brand { font-size: 23px; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; }
.celestial-footer nav { display: flex; flex-wrap: wrap; gap: 18px; border: 0; background: transparent; }
.celestial-footer nav a { color: #d4deea; font-size: 11px; }
.footer-meta { flex: 1 0 100%; margin: 0; padding-top: 14px; border-top: 1px solid rgba(217,173,89,.22); color: var(--celestial-muted); font-size: 11px; }

@media (max-width: 1050px) {
	.main { width: min(100% - 28px, 900px); }
	.celestial-nav .container { flex-wrap: wrap; gap: 8px 16px; padding-inline: 14px; }
	.celestial-brand { margin-right: auto; }
	.celestial-links { order: 3; flex: 1 0 100%; justify-content: center; gap: clamp(10px, 3vw, 26px); border-top: 1px solid rgba(217,173,89,.18); }
	.celestial-nav-actions { margin-left: auto; }
	.feedContainer { grid-template-columns: minmax(0, 1fr) minmax(245px, .72fr); gap: 16px; padding: 14px; }
}

@media (max-width: 720px) {
	body { background-size: auto 420px, auto 620px, auto 520px; background-position: center bottom, center 490px, center top; }
	.main { width: calc(100% - 20px); }
	.celestial-nav .container { justify-content: center; padding: 8px 10px; }
	.celestial-brand { margin-right: auto; font-size: 22px; }
	.celestial-brand img { width: 44px; height: 44px; }
	.celestial-nav-actions { gap: 9px; }
	.celestial-login { font-size: 9px; }
	.celestial-register { min-height: 37px; padding: 8px 10px; font-size: 9px; }
	.celestial-links { justify-content: flex-start; gap: 18px; padding: 8px 3px 4px; overflow-x: auto; white-space: nowrap; }
	.celestial-links a { font-size: 9px; }
	.banner { min-height: 360px; align-items: flex-end; padding: 28px 22px; background-position: center, center, 58% center; }
	.banner:before { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,12,23,.94), rgba(5,12,23,.18) 85%); content: ""; }
	.hero-copy h1 { font-size: clamp(48px, 13vw, 72px); }
	.hero-description { font-size: 13px; }
	.hero-actions { gap: 8px; }
	.celestial-button { min-height: 40px; padding: 9px 11px; font-size: 9px; }
	.feedContainer { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; padding: 10px; }
	.feedContainer > .topPane { order: 0; }
	.leftPane { order: 1; }
	.rightPane { order: 2; }
	.widget .header, .postHolder .header { min-height: 52px; padding: 9px 15px; font-size: 16px; }
	.widget .body, .postHolder .body { padding: 14px; }
	.celestial-footer { justify-content: center; padding: 22px 16px 16px; text-align: center; }
	.celestial-footer nav { justify-content: center; gap: 12px 18px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
