@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap");

:root {
	--bg-dark: #0a0a0f;
	--bg-panel: #111118;
	--bg-card: #16161f;
	--bg-hover: #1c1c28;
	--border: #2a1a1a;
	--border-gold: #8b6914;
	--gold: #c9a84c;
	--gold-light: #e8d48b;
	--red: #8b1a1a;
	--red-light: #c43c3c;
	--red-glow: #ff2a2a;
	--text: #c5bfb0;
	--text-dim: #7a7568;
	--text-bright: #ede6d6;
	--font-title: "Cinzel", serif;
	--font-body: "Inter", sans-serif;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	font-family: var(--font-body);
	background: var(--bg-dark);
	color: var(--text);
	font-size: 14px;
	line-height: 1.6;
	min-height: 100vh;
}
a {
	color: var(--gold);
	text-decoration: none;
	transition: color 0.2s;
}
a:hover {
	color: var(--gold-light);
}
ul {
	list-style: none;
}
img {
	max-width: 100%;
}
input,
select,
textarea,
button {
	font-family: var(--font-body);
}

/* ===== LAYOUT ===== */
.site-wrapper {
	max-width: 1200px;
	margin: 0 auto;
}
.page-layout {
	display: flex;
	gap: 20px;
	padding: 20px;
	align-items: flex-start;
}
.page-main {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}
.page-sidebar {
	width: 280px;
	flex-shrink: 0;
	position: sticky;
	top: 76px;
	overflow: visible;
}

/* ===== NAVBAR ===== */
.navbar {
	background: #000000;
	border-bottom: 2px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
}
.navbar .site-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	height: 56px;
}
.nav-logo {
	display: flex;
	align-items: center;
	order: 0;
}
.nav-logo-img {
	height: 36px;
	width: 100px;
	transition: transform 0.3s ease;
}
.nav-logo-img:hover {
	transform: scale(1.15);
}
.nav-menu {
	display: flex;
	gap: 0;
	height: 100%;
}
.nav-item {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
}
.nav-item > a,
.nav-item > span {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 16px;
	height: 100%;
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition:
		color 0.2s,
		background 0.2s;
}
.nav-item > a:hover,
.nav-item > span:hover,
.nav-item:hover > a,
.nav-item:hover > span {
	color: var(--gold);
	background: rgba(201, 168, 76, 0.05);
}
.nav-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--bg-panel);
	border: 1px solid var(--border);
	min-width: 200px;
	padding: 6px 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}
.nav-item:hover .nav-dropdown {
	display: block;
}

/* details/summary nav */
.nav-details {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
}
.nav-details summary {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 16px;
	height: 100%;
	color: var(--text);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition:
		color 0.2s,
		background 0.2s;
	list-style: none;
}
.nav-details summary::-webkit-details-marker {
	display: none;
}
.nav-details summary::marker {
	display: none;
	content: "";
}
.nav-details summary:hover {
	color: var(--gold);
	background: rgba(201, 168, 76, 0.05);
}
/* Desktop: show dropdown on hover, hide details native open */
.nav-details:hover .nav-dropdown {
	display: block;
}
.nav-details[open] .nav-dropdown {
	display: block;
}
.nav-dropdown a {
	display: block;
	padding: 8px 18px;
	color: var(--text);
	font-size: 13px;
}
.nav-dropdown a:hover {
	background: var(--bg-hover);
	color: var(--gold);
}
.nav-right {
	display: flex;
	align-items: center;
	gap: 10px;
}
#PlayersOnlineBox {
	display: flex;
	align-items: center;
	margin-right: 6px;
}
#PlayersOnlineText {
	font-size: 11px;
	color: var(--text-dim);
	white-space: nowrap;
}
#PlayersOnlineText a {
	color: #4caf50;
	font-weight: 700;
	font-size: 13px;
}
.nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	border: 1px solid var(--border-gold);
	color: var(--gold);
	background: transparent;
	cursor: pointer;
	transition: all 0.2s;
}
.nav-btn:hover {
	background: var(--gold);
	color: var(--bg-dark);
}
.nav-btn.primary {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
}
.nav-btn.primary:hover {
	background: var(--red-light);
}

/* Mobile toggle */
.nav-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--text);
	font-size: 22px;
	cursor: pointer;
	position: relative;
	z-index: 201;
}

/* ===== HERO ===== */
.hero {
	position: relative;
	padding: 60px 20px;
	background: url("../../images/header.png") center center / cover no-repeat;
	border-bottom: 2px solid var(--border);
	text-align: center;
	overflow: hidden;
}
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 15, 0.6);
	pointer-events: none;
}
.hero-title {
	font-family: var(--font-title);
	font-size: 42px;
	font-weight: 900;
	color: var(--gold);
	letter-spacing: 4px;
	text-shadow: 0 0 40px rgba(201, 168, 76, 0.3);
	margin-bottom: 8px;
	position: relative;
}
.hero-title span {
	color: var(--red-light);
}
.hero-subtitle {
	font-size: 16px;
	color: var(--text-dim);
	margin-bottom: 30px;
	position: relative;
}
.hero-stats {
	display: flex;
	justify-content: center;
	gap: 40px;
	margin-bottom: 30px;
	position: relative;
}
.hero-stat {
	text-align: center;
	padding: 16px 24px;
	background: rgba(17, 17, 24, 0.8);
	border: 1px solid var(--border);
}
.hero-stat-value {
	font-family: var(--font-title);
	font-size: 28px;
	font-weight: 700;
	color: var(--gold);
}
.hero-stat-label {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--text-dim);
	letter-spacing: 1px;
}
.hero-actions {
	display: flex;
	justify-content: center;
	gap: 12px;
	position: relative;
}
.server-save-countdown {
	margin-top: 20px;
	position: relative;
	font-family: var(--font-title);
	font-size: 14px;
	color: var(--text-dim);
	letter-spacing: 1px;
}
.server-save-countdown span {
	color: var(--red-light);
	font-size: 18px;
	font-weight: 700;
}
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 32px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	border: 1px solid var(--border-gold);
	color: var(--gold);
	background: transparent;
	cursor: pointer;
	transition: all 0.2s;
	font-family: var(--font-title);
}
.btn:hover {
	background: var(--gold);
	color: var(--bg-dark);
}
.btn-primary {
	background: var(--red);
	border-color: var(--red);
	color: #fff;
}
.btn-primary:hover {
	background: var(--red-light);
	border-color: var(--red-light);
	color: #fff;
}

/* ===== PANELS / CARDS ===== */
.panel {
	background: var(--bg-panel);
	border: 1px solid var(--border);
	margin-bottom: 16px;
}
.panel-header {
	padding: 12px 16px;
	font-family: var(--font-title);
	font-size: 14px;
	font-weight: 700;
	color: var(--gold);
	letter-spacing: 1px;
	text-transform: uppercase;
	background: linear-gradient(
		90deg,
		rgba(139, 105, 20, 0.12) 0%,
		transparent 100%
	);
	border-bottom: 1px solid var(--border);
}
.panel-body {
	padding: 14px 16px;
}

/* Backward compat with ZnoteAAC widget classes */
.well {
	background: var(--bg-panel);
	border: 1px solid var(--border);
	margin-bottom: 16px;
}
.widget {
	margin-bottom: 16px;
}
.header {
	padding: 12px 16px;
	font-family: var(--font-title);
	font-size: 14px;
	font-weight: 700;
	color: var(--gold);
	letter-spacing: 1px;
	text-transform: uppercase;
	background: linear-gradient(
		90deg,
		rgba(139, 105, 20, 0.12) 0%,
		transparent 100%
	);
	border-bottom: 1px solid var(--border);
}
.body {
	padding: 14px 16px;
}

/* ===== TABLES ===== */
table {
	width: 100%;
	border-collapse: collapse;
}
td,
th {
	padding: 8px 10px;
	text-align: left;
}
tr {
	border-bottom: 1px solid rgba(42, 26, 26, 0.4);
}
tr:hover {
	background: var(--bg-hover);
}
tr.yellow td,
th {
	color: var(--gold);
	font-weight: 600;
}
.zheadline {
	font-family: var(--font-title);
	font-size: 13px;
}
/* Table scroll wrapper for mobile */
.table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ===== FORMS ===== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 10px 12px;
	background: var(--bg-dark);
	border: 1px solid var(--border);
	color: var(--text);
	font-size: 14px;
	transition: border-color 0.2s;
}
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--border-gold);
}
input[type="submit"],
button.submitButton,
.submitButton {
	padding: 10px 24px;
	background: var(--red);
	border: 1px solid var(--red);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: all 0.2s;
}
input[type="submit"]:hover,
button.submitButton:hover {
	background: var(--red-light);
}
label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	color: var(--text-dim);
}

/* ===== LOGIN WIDGET ===== */
.loginContainer .loginForm {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.loginContainer .loginForm .well {
	border: none;
	margin: 0;
	padding: 0;
	background: transparent;
}
.loginContainer .loginForm input[type="text"],
.loginContainer .loginForm input[type="password"] {
	width: 100%;
}
.loginContainer .loginForm input[type="submit"] {
	width: 100%;
}
.loginContainer center {
	margin-top: 10px;
}
.loginContainer center h3 {
	margin: 0;
	font-size: 14px;
}

/* ===== MY ACCOUNT WIDGET ===== */
ul.linkbuttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
}
ul.linkbuttons li {
	flex: 1 1 calc(50% - 4px);
	border: 1px solid var(--border);
	text-align: center;
}
ul.linkbuttons li a {
	display: block;
	padding: 8px;
	font-size: 12px;
	color: var(--text);
	transition: all 0.2s;
}
ul.linkbuttons li:hover {
	border-color: var(--border-gold);
}
ul.linkbuttons li a:hover {
	color: var(--gold);
}

/* ===== SEARCH WIDGET ===== */
.search_widget .searchForm {
	display: flex;
	gap: 8px;
	align-items: center;
}
.search_widget .searchForm label {
	margin: 0;
	white-space: nowrap;
}
.search_widget .searchForm input[type="text"] {
	flex: 1;
	height: 36px;
}
.search_widget .body {
	padding-bottom: 14px;
}
div.relative {
	position: relative;
}
.search_widget #name_suggestion {
	position: absolute;
	width: 100%;
	top: 100%;
	left: 0;
	background: var(--bg-dark);
	border: 1px solid var(--border);
	z-index: 50;
	display: none;
}
.search_widget #name_suggestion.show {
	display: block;
}
.search_widget .sname a {
	display: block;
	padding: 8px 12px;
	color: var(--text);
	font-size: 13px;
}
.search_widget .sname a:hover {
	background: var(--bg-hover);
	color: var(--gold);
}

/* ===== HIGHSCORE WIDGET ===== */
.widget select {
	margin-bottom: 8px;
}

/* ===== NEWS ===== */
#news {
	margin-bottom: 16px;
}
.hts {
	margin-bottom: 0;
}
.hts__block {
	margin-bottom: 16px;
}
.flex-sbs {
	display: flex;
	justify-content: space-between;
}
#changelogTable {
	margin-bottom: 16px;
}

/* ===== VOTE WIDGET ===== */
.vote_widget form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ===== STATUS COLORS ===== */
.status_online {
	color: #4caf50;
	font-weight: 600;
}
.status_offline {
	color: var(--text-dim);
}

/* ===== ALERTS ===== */
.alert-box {
	max-width: 100%;
	padding: 12px 16px;
	margin-bottom: 16px;
	border: 1px solid var(--border);
	font-size: 14px;
	text-align: center;
}
.alert-default {
	background: var(--bg-card);
	color: var(--gold);
	border-color: var(--border-gold);
}
.alert-info {
	background: #0a1a2a;
	color: #5a9fd4;
	border-color: #1a3050;
}
.alert-success {
	background: #0a2a0a;
	color: #4caf50;
	border-color: #1a3a1a;
}
.alert-warning {
	background: #2a1a0a;
	color: #e8a030;
	border-color: #3a2a0a;
}
.alert-danger {
	background: #2a0a0a;
	color: #c43c3c;
	border-color: #3a1a1a;
}

/* ===== YOUTUBE EMBED ===== */
.youtube {
	max-width: 100%;
	margin: 10px 0;
}
.aspectratio {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}
.aspectratio iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* ===== FOOTER ===== */
.site-footer {
	background: #000000;
	border-top: 2px solid var(--border);
	padding: 30px 20px;
	text-align: center;
	margin-top: 20px;
}
.footer-logo {
	font-family: var(--font-title);
	font-size: 20px;
	font-weight: 700;
	color: var(--gold);
	letter-spacing: 2px;
	margin-bottom: 8px;
}
.footer-logo img {
	transition: transform 0.3s ease;
}
.footer-logo img:hover {
	transform: scale(1.1);
}
.footer-links {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin: 12px 0;
}
.footer-links a {
	color: var(--text-dim);
	font-size: 13px;
}
.footer-links a:hover {
	color: var(--gold);
}
.footer-copy {
	font-size: 12px;
	color: var(--text-dim);
}

/* ===== MISC COMPAT ===== */
.pull-left {
}
.pull-right {
}
.preventCollapse,
.feedContainer {
	overflow: hidden;
}
.feedContainer {
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
}
.leftPane {
}
.rightPane {
}
.topPane {
	display: none;
}
.centralizeContent {
	text-align: center;
}
.smedia {
	font-size: 1.6em;
}
.smedia a {
	color: var(--text-dim);
	padding: 8px;
}
.smedia a:hover {
	color: var(--gold);
}
.postHolder {
	margin-bottom: 16px;
}
.leftPane img {
	max-width: 100%;
}
.page_credits .feedContainer .pull-left.leftPane {
	padding: 0 8px;
}
.page_characterprofile #characterProfileTable thead th:first-of-type {
	position: relative;
	width: 28%;
}
.page_characterprofile #characterProfileTable thead th:last-of-type {
	text-align: left;
	padding-left: 16px;
}
.page_characterprofile .outfit {
	position: absolute;
	top: 0;
	left: 0;
}
.page_characterprofile .flag {
	position: absolute;
	top: 16px;
	right: 16px;
}
.postHolder iframe {
	display: block;
	margin: auto;
}

/* Page select */
select[name="newspage"] {
	margin-top: 10px;
}

/* ===== BOOSTED WIDGET (sidebar desktop) ===== */
.boosted-items {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.boosted-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 4px;
}
.boosted-item img {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}
.boosted-info {
	display: flex;
	flex-direction: column;
}
.boosted-label {
	font-size: 10px;
	text-transform: uppercase;
	color: var(--text-dim);
	letter-spacing: 1px;
}
.boosted-name {
	font-size: 13px;
	color: var(--gold);
	font-weight: 600;
}

/* ===== BOOSTED MOBILE BAR (hidden on desktop) ===== */
.boosted-mobile-bar {
	display: none;
	background: var(--bg-panel);
	border-bottom: 1px solid var(--border);
	padding: 8px 12px;
	gap: 12px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}
.boosted-mobile-item {
	display: flex;
	align-items: center;
	gap: 6px;
}
.boosted-mobile-item img {
	width: 32px;
	height: 32px;
}
.bm-online {
	gap: 8px;
}
.bm-online .bm-name {
	color: #4caf50;
}
.bm-label {
	display: block;
	font-size: 9px;
	text-transform: uppercase;
	color: var(--text-dim);
	letter-spacing: 0.5px;
}
.bm-name {
	display: block;
	font-size: 12px;
	color: var(--gold);
	font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
	/* Navbar: hamburger | logo | buttons */
	.navbar .site-wrapper {
		flex-wrap: nowrap;
		padding: 0 12px;
	}
	.nav-toggle {
		display: block;
		order: -1;
		margin-right: 10px;
		font-size: 26px;
	}
	.nav-logo {
		order: 0;
		flex: 1;
	}
	.nav-right {
		order: 1;
		gap: 6px;
	}
	.nav-btn {
		padding: 6px 10px;
		font-size: 10px;
		letter-spacing: 0;
	}
	#PlayersOnlineBox {
		display: none;
	}

	/* Menu - slide panel from left */
	.nav-menu {
		display: none;
	}
	.nav-menu.open {
		display: flex;
		flex-direction: column;
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 280px;
		max-width: 80vw;
		background: #0a0a0f;
		padding: 60px 0 20px;
		z-index: 200;
		overflow-y: auto;
		border-right: 1px solid var(--border);
		box-shadow: 4px 0 20px rgba(0, 0, 0, 0.8);
	}
	.nav-item {
		height: auto;
		flex-direction: column;
		width: 100%;
	}
	.nav-item > a,
	.nav-item > span {
		padding: 14px 20px;
		width: 100%;
		height: auto;
		font-size: 15px;
		letter-spacing: 0.5px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
		justify-content: flex-start;
	}
	.nav-dropdown {
		position: static !important;
		box-shadow: none !important;
		border: none !important;
		background: rgba(0, 0, 0, 0.4) !important;
		padding: 4px 0;
		width: 100%;
	}
	/* Mobile: details/summary controls open/close natively */
	.nav-details {
		width: 100%;
		height: auto;
		flex-direction: column;
	}
	.nav-details summary {
		padding: 14px 20px;
		width: 100%;
		height: auto;
		font-size: 15px;
		letter-spacing: 0.5px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
		justify-content: flex-start;
	}
	.nav-details:not([open]) .nav-dropdown {
		display: none !important;
	}
	.nav-details[open] .nav-dropdown {
		display: block !important;
	}
	.nav-details:hover .nav-dropdown {
		display: none !important;
	}
	.nav-details[open]:hover .nav-dropdown {
		display: block !important;
	}
	.nav-dropdown a {
		padding: 12px 20px 12px 40px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.03);
		font-size: 14px;
		color: var(--text-dim);
	}
	.nav-dropdown a:last-child {
		border-bottom: none;
	}
	.nav-dropdown a::before {
		content: "\203a";
		color: var(--gold);
		margin-right: 8px;
		font-size: 16px;
	}
	.nav-dropdown a:hover,
	.nav-dropdown a:active {
		color: var(--gold);
	}

	/* Hero */
	.hero {
		padding: 24px 14px;
	}
	.hero-title {
		font-size: 22px;
		letter-spacing: 2px;
	}
	.hero-subtitle {
		font-size: 12px;
		margin-bottom: 16px;
	}
	.hero-stats {
		flex-wrap: wrap;
		gap: 8px;
		margin-bottom: 16px;
	}
	.hero-stat {
		padding: 8px 12px;
		flex: 1 1 calc(50% - 8px);
		min-width: 100px;
	}
	.hero-stat-value {
		font-size: 18px;
	}
	.hero-stat-label {
		font-size: 9px;
	}
	.hero-actions {
		flex-wrap: wrap;
		gap: 8px;
	}
	.hero-actions .btn {
		padding: 10px 16px;
		font-size: 11px;
		width: 100%;
		justify-content: center;
	}
	.server-save-countdown {
		font-size: 11px;
		margin-top: 14px;
	}
	.server-save-countdown span {
		font-size: 14px;
	}
	.hero img {
		max-width: 200px;
	}

	/* Layout */
	.page-layout {
		flex-direction: column;
		padding: 10px;
		gap: 10px;
	}
	.page-main {
		width: 100%;
	}
	.page-sidebar {
		display: none;
	}
	#mainArea {
		padding: 10px !important;
	}
	.site-wrapper {
		padding: 0;
	}

	/* Boosted: show mobile bar, hide sidebar widget */
	.boosted-mobile-bar {
		display: flex;
	}
	.boosted-widget {
		display: none;
	}

	/* Panels */
	.panel-header {
		font-size: 12px;
		padding: 10px 12px;
	}
	.panel-body {
		padding: 10px 12px;
		overflow-x: auto;
	}
	.well {
		margin-bottom: 10px;
	}
	.header {
		font-size: 12px;
		padding: 10px 12px;
	}
	.body {
		padding: 10px 12px;
	}

	/* Tables - scroll horizontal */
	table {
		font-size: 12px;
		min-width: 500px;
	}
	td,
	th {
		padding: 6px 8px;
		white-space: nowrap;
	}
	.page-main {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.global-desc__content {
		overflow-x: auto;
	}
	.desc-changelog__block {
		overflow-x: auto;
	}
	/* Changelog table: wrap text instead of scroll */
	#changelogTable {
		min-width: 0 !important;
	}
	#changelogTable td:first-child {
		white-space: nowrap;
		font-size: 10px;
		width: 90px;
	}
	#changelogTable td:last-child {
		white-space: normal !important;
		word-break: break-word;
	}

	/* Forms */
	input[type="text"],
	input[type="password"],
	input[type="email"],
	input[type="number"],
	select,
	textarea {
		font-size: 16px;
		padding: 8px 10px;
	}
	input[type="submit"] {
		width: 100%;
		padding: 12px;
	}

	/* Footer */
	.site-footer {
		padding: 20px 12px;
	}
	.footer-links {
		flex-wrap: wrap;
		gap: 10px;
	}
	.footer-links a {
		font-size: 12px;
	}
	.footer-logo img {
		max-height: 40px;
	}

	/* Legacy compat */
	.content-wrap,
	.feedContainer {
		flex-direction: column;
		overflow-x: auto;
	}
	.global-desc__content {
		width: 100% !important;
	}
	.donate-page__title {
		font-size: 14px;
	}
	.donate-page__bonuses-title {
		font-size: 11px;
	}
	.flex-cc,
	.flex-sc,
	.flex-ss,
	.flex-sbs,
	.flex-sbc {
		flex-wrap: wrap;
	}
}

/* ===== LEGACY COMPAT: flex utilities from old template ===== */
.flex-cc {
	display: flex;
	justify-content: center;
	align-items: center;
}
.flex-sc {
	display: flex;
	justify-content: flex-start;
	align-items: center;
}
.flex-ss {
	display: flex;
	justify-content: flex-start;
	align-items: flex-start;
	flex-wrap: wrap;
}
.flex-es {
	display: flex;
	justify-content: flex-end;
	align-items: flex-start;
}
.flex-sbc {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* ===== LEGACY: Wiki / Description pages ===== */
.global-desc {
	gap: 20px;
	width: 100%;
}
.global-desc__nav {
	width: 240px;
	flex-shrink: 0;
}
.global-desc__nav-item {
	padding: 10px 12px;
	margin-bottom: 4px;
	cursor: pointer;
	background: var(--bg-panel);
	border: 1px solid var(--border);
	transition: all 0.2s;
}
.global-desc__nav-item:hover,
.global-desc__nav-item.active {
	border-color: var(--border-gold);
	background: var(--bg-hover);
}
.global-desc__nav-icon {
	width: 32px;
	height: 32px;
	margin-right: 10px;
	flex-shrink: 0;
}
.global-desc__nav-icon img {
	width: 100%;
	height: 100%;
}
.global-desc__nav-text {
	font-size: 13px;
	color: var(--text);
	line-height: 1.3;
}
.global-desc__nav-text span {
	display: block;
	font-size: 11px;
	color: var(--text-dim);
}
.global-desc > .global-desc__content {
	flex: 1;
	min-width: 0;
}
.global-desc__content-item {
	display: none;
}
.global-desc__content-item:first-child {
	display: block;
}
.global-desc__content-title {
	padding: 12px 16px;
	background: var(--bg-panel);
	border: 1px solid var(--border);
	margin-bottom: 12px;
}
.global-desc__content-title-icon {
	width: 32px;
	height: 32px;
	margin-right: 10px;
}
.global-desc__content-title-icon img {
	width: 100%;
}
.global-desc__content-title-text {
	font-family: var(--font-title);
	font-size: 16px;
	color: var(--gold);
}
.global-desc__content-title-text span {
	display: block;
	font-size: 12px;
	color: var(--text-dim);
	font-family: var(--font-body);
}
.global-desc__content-box {
	padding: 16px;
	background: var(--bg-panel);
	border: 1px solid var(--border);
}

/* Desc elements */
.desc-main__header {
	margin-bottom: 12px;
}
.desc-main__header-info {
	gap: 16px;
}
.desc-main__header-date-title {
	display: block;
	font-size: 12px;
	color: var(--text-dim);
}
.desc-main__header-date-text {
	font-size: 14px;
	color: var(--gold);
}
.desc-text__title {
	font-family: var(--font-title);
	color: var(--gold);
	margin-bottom: 6px;
}
.desc-text__text {
	color: var(--text);
	line-height: 1.7;
}
.desc-margin-10 {
	height: 10px;
}
.desc-margin-20 {
	height: 20px;
}
.desc-margin-30 {
	height: 30px;
}
.desc-sep {
	border-top: 1px solid var(--border);
	width: 100%;
}
.fz_15 {
	font-size: 15px;
}
.fz_20 {
	font-size: 20px;
}

.desc-bonuses {
	gap: 16px;
	flex-wrap: wrap;
}
.desc-bonuses__item {
	flex: 1 1 180px;
	text-align: center;
	padding: 12px;
	background: var(--bg-card);
	border: 1px solid var(--border);
}
.desc-bonuses__item img {
	max-width: 64px;
	margin-bottom: 8px;
}
.desc-bonuses__name {
	font-size: 13px;
	font-weight: 600;
}

.desc-boss__blocks {
	gap: 12px;
	flex-wrap: wrap;
	width: 100%;
}
.desc-enchant__block {
	gap: 10px;
	padding: 10px;
	background: var(--bg-card);
	border: 1px solid var(--border);
	flex: 1 1 280px;
	min-width: 280px;
}
.desc-enchant__block img {
	max-width: 64px;
	border-radius: 4px;
}
.desc-enchant__info {
	flex: 1;
}
.desc-enchant__title {
	font-family: var(--font-title);
	font-size: 14px;
	color: var(--gold);
	margin-bottom: 4px;
}
.desc-enchant__line {
	font-size: 13px;
	color: var(--text);
	line-height: 1.6;
}

.desc-rate__rates {
	gap: 12px;
	flex-wrap: wrap;
	width: 100%;
}
.desc-rate__rates-item {
	flex: 1 1 140px;
	min-width: 120px;
	padding: 12px;
	text-align: center;
	background: var(--bg-card);
	border: 1px solid var(--border);
}
.desc-rate__rates-item-title {
	font-family: var(--font-title);
	font-size: 14px;
	color: var(--gold);
	margin-bottom: 4px;
}
.desc-rate__rates-item-desc {
	font-size: 12px;
	color: var(--text-dim);
}
.desc-rate__rates-item-value {
	font-size: 16px;
	font-weight: 700;
	color: var(--text-bright);
	margin-top: 4px;
}

/* Tooltips */
.tooltip {
	position: relative;
}
.tooltip-span {
	display: none;
	position: absolute;
	z-index: 99;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: var(--bg-dark);
	border: 1px solid var(--border-gold);
	padding: 12px;
	min-width: 220px;
	font-size: 13px;
	color: var(--text);
	text-align: center;
}
.tooltip:hover .tooltip-span {
	display: block;
}
.tooltip-item {
	position: relative;
	color: var(--gold);
	cursor: help;
	border-bottom: 1px dotted var(--gold);
}
.tooltip-item .tooltiptext {
	display: none;
	position: absolute;
	z-index: 99;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: var(--bg-dark);
	border: 1px solid var(--border-gold);
	padding: 10px;
	min-width: 200px;
	font-size: 12px;
	color: var(--text);
	text-align: center;
	font-weight: normal;
}
.tooltip-item:hover .tooltiptext {
	display: block;
}
.whtt-name {
	font-family: var(--font-title);
	font-size: 14px;
	color: var(--gold);
}
.tooltip .image,
.tooltip-span .image {
	max-width: 64px;
}

/* ===== LEGACY: Donate / Support page classes ===== */
.donate-page__title {
	font-family: var(--font-title);
	font-size: 18px;
	color: var(--gold);
	padding: 8px 0;
}
.donate-page__bonuses-title {
	font-size: 13px;
	color: var(--text);
}
.desc-changelog__block {
	width: 100%;
	padding: 8px;
}

/* Fix wide tables inside main-content */
.main-content .global-desc__content,
.leftPane .global-desc__content {
	width: auto !important;
	overflow-x: auto;
}
.main-content table,
.leftPane table {
	table-layout: auto;
}
.outfitColumn img {
	max-height: 48px;
}

/* ===== LEGACY: prevent-select ===== */
.prevent-select {
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

/* ===== LEGACY: content-area ===== */
.content-area {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ===== LEGACY: table striped ===== */
.table-striped tr:nth-child(even) {
	background: var(--bg-card);
}
.table-hover tr:hover {
	background: var(--bg-hover);
}

/* ===== Wiki tab JS ===== */
.global-desc__nav-item.active ~ .global-desc__content-item {
	display: none;
}

@media (max-width: 900px) {
	.global-desc {
		flex-direction: column;
	}
	.global-desc__nav {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		gap: 4px;
	}
	.global-desc__nav-item {
		flex: 1 1 calc(50% - 4px);
		min-width: 140px;
	}
	.desc-enchant__block {
		flex: 1 1 100%;
		min-width: 0;
	}
	.desc-rate__rates-item {
		flex: 1 1 calc(50% - 6px);
		min-width: 100px;
	}
	.desc-bonuses__item {
		flex: 1 1 calc(50% - 8px);
	}
}

/* ===== CHARACTER PROFILE REDESIGN ===== */
.profile-header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 20px;
	background: var(--bg-panel);
	border: 1px solid var(--border);
	margin-bottom: 16px;
	position: relative;
	overflow: hidden;
}
.profile-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(139, 105, 20, 0.08) 0%,
		transparent 60%
	);
	pointer-events: none;
}
.profile-outfit {
	position: relative;
	flex-shrink: 0;
	text-align: center;
}
.profile-outfit img {
	display: block;
	image-rendering: pixelated;
}
.profile-status {
	display: inline-block;
	padding: 2px 10px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-radius: 2px;
	margin-top: 4px;
}
.profile-status.online {
	background: rgba(76, 175, 80, 0.15);
	color: #4caf50;
	border: 1px solid rgba(76, 175, 80, 0.3);
}
.profile-status.offline {
	background: rgba(122, 117, 104, 0.1);
	color: var(--text-dim);
	border: 1px solid rgba(122, 117, 104, 0.2);
}
.profile-info {
	flex: 1;
	position: relative;
}
.profile-name {
	font-family: var(--font-title);
	font-size: 24px;
	font-weight: 700;
	color: var(--gold);
	letter-spacing: 1px;
	margin-bottom: 4px;
}
.profile-title-line {
	font-size: 13px;
	color: var(--text-dim);
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-bottom: 8px;
}
.profile-title-line span {
	color: var(--text);
}
.profile-flag {
	position: absolute;
	top: 0;
	right: 0;
}

/* Profile grid for stat cards */
.profile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}
.stat-card {
	background: var(--bg-panel);
	border: 1px solid var(--border);
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: border-color 0.2s;
}
.stat-card:hover {
	border-color: var(--border-gold);
}
.stat-card-icon {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
	color: var(--gold);
	opacity: 0.7;
}
.stat-card-content {
	flex: 1;
	min-width: 0;
}
.stat-card-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--text-dim);
	margin-bottom: 2px;
}
.stat-card-value {
	font-family: var(--font-title);
	font-size: 16px;
	font-weight: 700;
	color: var(--text-bright);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Ancestral rank badge */
.rank-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	font-family: var(--font-title);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1px;
	border-radius: 2px;
	border: 1px solid;
	text-transform: uppercase;
}
.rank-rookie {
	color: #8a8a8a;
	border-color: #4a4a4a;
	background: rgba(138, 138, 138, 0.08);
}
.rank-bronze {
	color: #cd7f32;
	border-color: #8b5a2b;
	background: rgba(205, 127, 50, 0.08);
}
.rank-silver {
	color: #b0b0b0;
	border-color: #808080;
	background: rgba(176, 176, 176, 0.08);
}
.rank-gold {
	color: var(--gold);
	border-color: var(--border-gold);
	background: rgba(201, 168, 76, 0.08);
}
.rank-platinum {
	color: #7dd3fc;
	border-color: #3b82a0;
	background: rgba(125, 211, 252, 0.08);
}
.rank-diamond {
	color: #c084fc;
	border-color: #7c3aed;
	background: rgba(192, 132, 252, 0.08);
}
.rank-ancestral {
	color: #f472b6;
	border-color: #be185d;
	background: rgba(244, 114, 182, 0.08);
}
.rank-mystic {
	color: #a78bfa;
	border-color: #6d28d9;
	background: rgba(167, 139, 250, 0.08);
}
.rank-abyssal {
	color: #f87171;
	border-color: #991b1b;
	background: rgba(248, 113, 113, 0.08);
}
.rank-ascending {
	color: #fbbf24;
	border-color: #b45309;
	background: rgba(251, 191, 36, 0.1);
}
.rank-chaos {
	color: #ef4444;
	border-color: #dc2626;
	background: rgba(239, 68, 68, 0.1);
	text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}
.rank-awakening {
	color: #fff;
	border-color: var(--gold);
	background: linear-gradient(
		135deg,
		rgba(201, 168, 76, 0.15),
		rgba(239, 68, 68, 0.15)
	);
	text-shadow: 0 0 12px rgba(201, 168, 76, 0.5);
}

/* Skill bars */
.skill-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.skill-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.skill-name {
	width: 110px;
	flex-shrink: 0;
	font-size: 12px;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.skill-bar-wrap {
	flex: 1;
	height: 18px;
	background: var(--bg-dark);
	border: 1px solid var(--border);
	position: relative;
	overflow: hidden;
}
.skill-bar-fill {
	height: 100%;
	transition: width 0.4s ease;
	background: linear-gradient(90deg, var(--border-gold), var(--gold));
}
.skill-bar-fill.craft {
	background: linear-gradient(90deg, #8b5a2b, #cd7f32);
}
.skill-bar-fill.gather {
	background: linear-gradient(90deg, #2d5a27, #4caf50);
}
.skill-bar-fill.smith {
	background: linear-gradient(90deg, #4a3080, #7c3aed);
}
.skill-value {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 11px;
	font-weight: 600;
	color: var(--text-bright);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Profile panels two-column layout */
.profile-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

@media (max-width: 900px) {
	.profile-header {
		flex-direction: column;
		text-align: center;
		padding: 16px;
	}
	.profile-name {
		font-size: 18px;
	}
	.profile-title-line {
		justify-content: center;
	}
	.profile-flag {
		position: static;
		margin-top: 6px;
	}
	.profile-grid {
		grid-template-columns: 1fr 1fr;
	}
	.profile-columns {
		grid-template-columns: 1fr;
	}
	.stat-card-value {
		font-size: 14px;
	}
	.skill-name {
		width: 80px;
		font-size: 10px;
	}
}
