/* ============================================
   EVOXIS.ONLINE — Dark Theme
   ============================================ */

:root {
	--bg-0: #0a0b10;
	--bg-1: #12141c;
	--bg-2: #191c27;
	--panel: rgba(24, 26, 36, 0.72);
	--border: rgba(230, 200, 110, 0.18);
	--gold: #e6c86e;
	--gold-soft: #f2dda0;
	--text: #dcdde4;
	--text-dim: #9a9cab;
	--green: #4fd67a;
	--red: #ff5d5d;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	background: radial-gradient(ellipse at top, var(--bg-1) 0%, var(--bg-0) 65%, #000 100%);
	color: var(--text);
	font-family: "Segoe UI", Verdana, Arial, sans-serif;
	font-size: 13px;
	overflow-x: hidden;
}

a {
	color: var(--gold-soft);
	text-decoration: none;
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
	color: #fff;
	text-shadow: 0 0 8px rgba(230, 200, 110, 0.7);
}

/* ---------- Background FX layers ---------- */

#evoxis-fx {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
}

.evoxis-glow {
	position: fixed;
	width: 60vw;
	height: 60vw;
	border-radius: 50%;
	filter: blur(120px);
	opacity: 0.22;
	pointer-events: none;
	z-index: 0;
	animation: evoxisDrift 18s ease-in-out infinite alternate;
}

#evoxis-glow-1 {
	background: #e6c86e;
	top: -20vw;
	left: -15vw;
}

#evoxis-glow-2 {
	background: #4b3f8f;
	bottom: -25vw;
	right: -15vw;
	animation-delay: 4s;
}

@keyframes evoxisDrift {
	from { transform: translate(0, 0) scale(1); }
	to   { transform: translate(4vw, 3vw) scale(1.12); }
}

/* ---------- Layout ---------- */

#page {
	position: relative;
	z-index: 1;
	width: 1180px;
	margin: 0 auto;
	padding-top: 20px;
}

#top {
	height: 4px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
	box-shadow: 0 0 20px rgba(230, 200, 110, 0.6);
}

/* ---------- Header / logo ---------- */

#header {
	position: relative;
	height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, var(--bg-2) 0%, transparent 100%);
	border-bottom: 1px solid var(--border);
	overflow: hidden;
}

/* faint radial spotlight behind the wordmark so it "pops" instead of
   sitting flat on the panel background */
#header::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 520px;
	height: 240px;
	transform: translate(-50%, -50%);
	background: radial-gradient(ellipse at center, rgba(230, 200, 110, 0.22), transparent 70%);
	pointer-events: none;
}

#evoxis-logo {
	position: relative;
	font-size: 40px;
	font-weight: 800;
	letter-spacing: 3px;
	text-transform: uppercase;
	animation: evoxisLogoPulse 4s ease-in-out infinite;
}

@keyframes evoxisLogoPulse {
	0%, 100% { filter: drop-shadow(0 0 6px rgba(230, 200, 110, 0.35)); }
	50% { filter: drop-shadow(0 0 18px rgba(230, 200, 110, 0.7)); }
}

.evoxis-logo-main {
	background: linear-gradient(135deg, #fff3d6 0%, var(--gold-soft) 35%, var(--gold) 65%, #a9822f 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--gold-soft); /* fallback if background-clip:text isn't supported */
	text-shadow: none;
}

.evoxis-logo-sub {
	color: var(--gold);
	font-weight: 300;
	font-size: 22px;
	letter-spacing: 2px;
	opacity: 0.75;
}

/* ---------- Menu tabs ---------- */

#tabs {
	position: relative;
	display: flex;
	gap: 4px;
	background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
	border-bottom: 1px solid var(--border);
	padding: 6px 10px 0;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.03);
}

#tabs span,
#tabs span.tab {
	position: relative;
	padding: 10px 20px;
	cursor: pointer;
	color: var(--text-dim);
	font-weight: 700;
	font-size: 12.5px;
	letter-spacing: 1px;
	text-transform: uppercase;
	border-radius: 8px 8px 0 0;
	transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

#tabs span::after {
	content: '';
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 0.2s ease;
	box-shadow: 0 0 10px rgba(230, 200, 110, 0.8);
}

#tabs span:hover {
	color: var(--gold-soft);
	background: rgba(230, 200, 110, 0.08);
	transform: translateY(-1px);
}

#tabs span:hover::after {
	transform: scaleX(0.5);
}

#tabs span.tab-active {
	color: #1a1710;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold));
	box-shadow: 0 -2px 14px rgba(230, 200, 110, 0.45), 0 4px 10px rgba(0,0,0,0.35);
	text-shadow: none;
}

#tabs span.tab-active::after {
	transform: scaleX(1);
	background: #1a1710;
	box-shadow: none;
}

/* Wiki tab - pulsing/glowing highlight so it catches the eye as a new
   feature, plus a small blinking "NEW" badge in the corner. */
#tabs span.tab-wiki {
	position: relative;
	overflow: visible;
	animation: wikiTabGlow 1.8s ease-in-out infinite;
}

@keyframes wikiTabGlow {
	0%, 100% {
		background: rgba(230, 200, 110, 0.06);
		color: var(--gold-soft);
		box-shadow: 0 0 0 rgba(230, 200, 110, 0);
	}
	50% {
		background: linear-gradient(135deg, var(--gold-soft), var(--gold));
		color: #1a1710;
		box-shadow: 0 0 18px 3px rgba(230, 200, 110, 0.55);
	}
}

#tabs span.tab-wiki .wiki-badge {
	position: absolute;
	top: -9px;
	right: -8px;
	background: #ff5d5d;
	color: #fff;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: .5px;
	padding: 2px 5px;
	border-radius: 8px;
	box-shadow: 0 0 8px rgba(255, 93, 93, 0.7);
	animation: wikiBadgeBlink 1.1s steps(1, end) infinite;
}

@keyframes wikiBadgeBlink {
	0%, 49% { opacity: 1; }
	50%, 100% { opacity: 0.25; }
}

/* Wiki tab (static, not part of the category-switcher loop) sits right
   after the last dynamic tab. Search box is pushed to the far right of
   the same bar with margin-left: auto. */
#tabs-search {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 6px 0 auto;
	align-self: center;
}

#tabs-search input {
	background: rgba(255,255,255,0.05);
	border: 1px solid var(--border);
	border-radius: 20px;
	color: var(--text);
	font-size: 12px;
	padding: 7px 14px;
	width: 150px;
	outline: none;
	transition: border-color .15s ease, background .15s ease, width .2s ease;
}

#tabs-search input:focus {
	border-color: var(--gold);
	background: rgba(255,255,255,0.09);
	width: 190px;
}

#tabs-search input::placeholder { color: rgba(255,255,255,0.4); }

#tabs-search button {
	background: linear-gradient(135deg, var(--gold), var(--gold-soft));
	border: none;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1a1710;
	cursor: pointer;
	font-size: 12px;
	flex: 0 0 auto;
	transition: filter .15s ease;
}

#tabs-search button:hover { filter: brightness(1.1); }

/* ---------- Sub-menu ---------- */

#mainsubmenu {
	background: var(--bg-2);
	border-bottom: 1px solid var(--border);
	padding: 9px 16px;
	font-size: 11.5px;
	box-shadow: inset 0 1px 0 rgba(230, 200, 110, 0.06);
}

#mainsubmenu > div {
	display: none;
}

#mainsubmenu > div.active {
	display: block;
}

#mainsubmenu a {
	font-weight: 600;
	letter-spacing: .3px;
	text-transform: uppercase;
	font-size: 11px;
	opacity: 0.85;
}

#mainsubmenu a:hover {
	opacity: 1;
}

.separator {
	display: inline-block;
	width: 1px;
	height: 10px;
	background: var(--border);
	margin: 0 8px;
	vertical-align: middle;
}

/* ---------- Content panel (glass) ---------- */

/* ---------- Content + Sidebar layout ---------- */

#content-wrap {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

#content {
	background: var(--panel);
	backdrop-filter: blur(10px);
	border: 1px solid var(--border);
	border-top: none;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- Sidebar ---------- */

#sidebar {
	flex: 0 0 260px;
	width: 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.side-box {
	background: var(--panel);
	backdrop-filter: blur(10px);
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.side-box-title {
	background: linear-gradient(90deg, rgba(230, 200, 110, 0.16), transparent);
	border-bottom: 1px solid var(--border);
	color: var(--gold-soft);
	font-weight: 700;
	letter-spacing: 0.5px;
	font-size: 12px;
	text-transform: uppercase;
	padding: 8px 12px;
}

.side-box-body {
	padding: 12px;
}

.side-empty {
	color: var(--text-dim);
	font-size: 12px;
	margin: 0;
}

/* Login box */

#login-box form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

#login-box input[type="text"],
#login-box input[type="password"] {
	background: var(--bg-1);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--text);
	padding: 7px 9px;
	font-size: 12px;
}

#login-box input:focus {
	outline: none;
	border-color: var(--gold);
	box-shadow: 0 0 8px rgba(230, 200, 110, 0.35);
}

#login-box button,
.side-btn {
	background: linear-gradient(90deg, var(--gold), var(--gold-soft));
	border: none;
	border-radius: 4px;
	color: #1a1608;
	font-weight: 700;
	padding: 8px 10px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	display: block;
	font-size: 12px;
	transition: filter 0.2s ease;
}

#login-box button:hover,
.side-btn:hover {
	filter: brightness(1.1);
}

.side-btn-ghost {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--text) !important;
	margin-top: 6px;
}

.side-box-links {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 11px;
	color: var(--text-dim);
}

.side-box-links a {
	font-size: 11px;
}

/* Top players */

.top-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 0 1px;
	font-size: 12px;
}

.top-row:not(:first-child) {
	border-top: 1px solid var(--border);
	padding-top: 8px;
	margin-top: 4px;
}

.top-rank {
	color: var(--gold-soft);
	font-weight: 700;
	width: 22px;
	flex: 0 0 auto;
}

.top-name {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.top-level {
	color: var(--text-dim);
	flex: 0 0 auto;
	font-size: 11px;
}

.top-voc {
	color: var(--text-dim);
	font-size: 10px;
	margin-left: 28px;
	margin-bottom: 2px;
}

/* Boosted creature */

.boost-creature {
	text-align: center;
}

.boost-creature img {
	max-width: 64px;
	max-height: 64px;
	image-rendering: pixelated;
	filter: drop-shadow(0 0 8px rgba(230, 200, 110, 0.5));
	margin-bottom: 6px;
}

.boost-name {
	color: var(--gold-soft);
	font-weight: 700;
	font-size: 13px;
}

.boost-bonus {
	color: var(--text-dim);
	font-size: 11px;
	margin-top: 4px;
}

/* Event countdown */

#evoxis-countdown {
	text-align: center;
	padding-bottom: 8px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--border);
}

.cd-name {
	color: var(--text);
	font-size: 12px;
	margin-bottom: 4px;
}

.cd-timer {
	color: var(--gold-soft);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 1px;
	text-shadow: 0 0 12px rgba(230, 200, 110, 0.5);
	font-variant-numeric: tabular-nums;
}

.event-row {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--text-dim);
	padding: 3px 0;
}

.event-row .event-time {
	color: var(--gold-soft);
	font-weight: 600;
	margin-right: 8px;
}

/* Discord */

.discord-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(90deg, #4b3f8f, #5865F2);
	color: #fff !important;
	font-weight: 700;
	font-size: 12px;
	padding: 12px;
	text-shadow: none !important;
}

.discord-btn:hover {
	filter: brightness(1.15);
	color: #fff !important;
}

.discord-icon {
	font-size: 16px;
}

@media (max-width: 1220px) {
	#page { width: 96vw; }
	#content-wrap { flex-direction: column; }
	#sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
	.side-box { flex: 1 1 220px; }
}

#margins {
	padding: 16px 20px;
}

#margins table {
	color: var(--text-dim);
	font-size: 12px;
}

hr {
	border: none;
	border-top: 1px solid var(--border);
	margin: 10px 0;
}

.evoxis-online {
	color: var(--green);
	text-shadow: 0 0 8px rgba(79, 214, 122, 0.5);
}

.evoxis-offline {
	color: var(--red);
	text-shadow: 0 0 8px rgba(255, 93, 93, 0.5);
}

.Content {
	background: var(--bg-1);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 16px;
}

#ContentHelper {
	color: var(--text);
	line-height: 1.6;
}

#ContentHelper table {
	border-color: var(--border);
}

/* ---------- News headline (news_html.twig) ---------- */

.NewsHeadline {
	margin-bottom: 12px;
}

#News .NewsHeadline .NewsHeadlineBackground,
.NewsHeadlineBackground {
	background-image: none !important;
	background-color: #181a24 !important;
	background: linear-gradient(135deg, rgba(230, 200, 110, 0.10), rgba(24, 26, 36, 0.9)) !important;
	border: 1px solid var(--border);
	border-left: 3px solid var(--gold);
	border-radius: 6px;
	padding: 10px 14px;
	display: block;
}

/* Universal catch-all: the news LIST (multiple entries, different "type"
   per entry - news/feature/changelog/tip) is a different template from
   the single headline above and may ship its own inline
   style="background-image:url(...)/background:#8b1a1a..." per type,
   which is what's still painting some entries red/orange. Rather than
   guess the exact class name for every type, this simply neutralizes
   ANY inline background styling inside the content area and repaints
   it with the site's gold/dark palette - safe net until the real
   list template is swapped in for a pixel-exact fix. */
#ContentHelper [style*="background-image"],
#ContentHelper [style*="background:"],
#ContentHelper [style*="background-color"] {
	background-image: none !important;
	background-color: #181a24 !important;
	background: linear-gradient(135deg, rgba(230, 200, 110, 0.10), rgba(24, 26, 36, 0.9)) !important;
	border: 1px solid var(--border) !important;
	border-left: 3px solid var(--gold) !important;
	border-radius: 6px !important;
	color: var(--text) !important;
}

.NewsHeadlineIcon {
	vertical-align: middle;
	margin-right: 8px;
}

.NewsHeadlineDate {
	display: inline-block;
	color: var(--gold-soft);
	font-weight: 600;
}

.NewsHeadlineText {
	display: inline-block;
	color: var(--text);
	font-weight: 700;
}

.NewsHeadlineAuthor {
	color: var(--text-dim);
	font-size: 11px;
	margin-top: 4px;
}

/* ---------- Generic tables inside content (tickers(), news archive, forums, etc.) ----------
   Core-generated widgets often ship inline bgcolor/style attributes from the old
   tibiacom theme; !important forces them into the dark palette regardless. */

#ContentHelper table,
#ContentHelper table tr,
#ContentHelper table td,
#ContentHelper table th {
	background-color: var(--bg-2) !important;
	background-image: none !important;
	color: var(--text) !important;
	border-color: var(--border) !important;
}

#ContentHelper table tr:nth-child(even) td {
	background-color: var(--bg-1) !important;
}

#ContentHelper table a {
	color: var(--gold-soft) !important;
}

#ContentHelper table a:hover {
	color: #fff !important;
}

#content-bot {
	height: 24px;
	background: linear-gradient(180deg, var(--panel), transparent);
}

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

#copyrights {
	text-align: center;
	padding: 16px 0 40px;
	color: var(--text-dim);
	font-size: 11px;
}

#copyrights a {
	color: var(--gold-soft);
}

/* ---------- Scrollbar (nice touch for dark theme) ---------- */

::-webkit-scrollbar {
	width: 10px;
}

::-webkit-scrollbar-track {
	background: var(--bg-0);
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--gold);
}

/* ---------- Wiki page (system/pages/wiki.php) ---------- */

#wiki-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 16px;
	padding-bottom: 10px;
}

#wiki-tabs .wiki-tab-btn {
	appearance: none !important;
	-webkit-appearance: none !important;
	font-family: inherit !important;
	background: rgba(255,255,255,0.04) !important;
	border: 1px solid var(--border) !important;
	color: var(--text-dim) !important;
	font-weight: 700 !important;
	font-size: 11.5px !important;
	letter-spacing: .4px;
	text-transform: uppercase;
	padding: 8px 16px !important;
	border-radius: 6px !important;
	cursor: pointer;
	box-shadow: none;
	transition: color .15s ease, background .15s ease, border-color .15s ease;
}

#wiki-tabs .wiki-tab-btn:hover {
	color: var(--gold-soft) !important;
	border-color: rgba(230, 200, 110, 0.4) !important;
}

#wiki-tabs .wiki-tab-btn.active {
	color: #1a1710 !important;
	background: linear-gradient(135deg, var(--gold-soft), var(--gold)) !important;
	border-color: transparent !important;
	box-shadow: 0 4px 14px rgba(230, 200, 110, 0.3);
}

.wiki-panel { display: none; line-height: 1.7; }
.wiki-panel.active { display: block; animation: evoxisHeroFade .25s ease; }

.wiki-panel h2 {
	color: var(--gold-soft);
	font-size: 18px;
	margin: 0 0 10px;
	border-left: 3px solid var(--gold);
	padding-left: 10px;
}

.wiki-panel h3 {
	color: var(--gold);
	font-size: 14px;
	margin: 18px 0 8px;
}

.wiki-panel p { margin: 0 0 10px; color: var(--text); }

.wiki-panel ul { margin: 0 0 10px; padding-left: 20px; }
.wiki-panel li { margin-bottom: 4px; }

.wiki-table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 12.5px; }
.wiki-table th, .wiki-table td {
	border: 1px solid var(--border);
	padding: 8px 10px;
	text-align: left;
}
.wiki-table th { background: rgba(230, 200, 110, 0.1); color: var(--gold-soft); }
.wiki-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* Wiki page - image slots. Falls back to nothing (not a broken-image icon)
   if the file hasn't been uploaded yet, via onerror on the <img> itself. */
.wiki-img {
	display: block;
	max-width: 100%;
	margin: 12px 0 16px;
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.wiki-img-caption {
	font-size: 10.5px;
	color: var(--text-dim);
	margin: -12px 0 16px;
	font-style: italic;
}
