/* ==========================================================================
   Ember — Dark Brown & Gold gaming theme
   ========================================================================== */

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

:root {
	--bg-void:        #0a0704;
	--bg-primary:     #14100a;
	--bg-secondary:   #0a0704;
	--bg-elevated:    #251a10;

	--surface:        linear-gradient(#251a10eb, #14100af5);
	--surface-strong: linear-gradient(#251a10f7, #14100af7);
	--surface-solid:  #14100a;

	--border-gold:        rgba(240, 183, 110, 0.22);
	--border-gold-strong:  rgba(240, 183, 110, 0.42);
	--border-hairline:     rgba(255, 255, 255, 0.05);

	--gold:        #f0b76e;
	--gold-bright: #ffcb7a;
	--gold-muted:  #d39d56;
	--gold-deep:   #8a5e1f;
	--gold-glow:   rgba(240, 183, 110, 0.35);
	--ember:       #e87a3a;

	--text-primary: #e6cfa8;
	--text-heading: #f5e3c0;
	--text-muted:   #b7a077;
	--text-dim:     #7c6a52;

	--danger:  #c2483d;
	--success: #7cbb6b;
	--warning: #e0ab52;
	--accent-blurple: #6c7fd8;
	--accent-teal:    #4fa3a0;

	--radius-lg: 5px;
	--radius-md: 4px;
	--radius-sm: 3px;

	--shadow-panel: inset 0 1px #f0b76e1a, inset 0 -1px #0000008c, 0 8px 24px #0000008c;
	--shadow-glow:  0 0 18px #f0b76e59;
	--shadow-ember: 0 0 24px #e87a3a73;

	--font-display: 'Cinzel', 'Georgia', serif;
	--font-body:    'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font-body);
	color: var(--text-primary);
	background:
		radial-gradient(1200px 600px at 15% -10%, rgba(207, 158, 83, 0.07), transparent 60%),
		radial-gradient(900px 500px at 100% 0%, rgba(207, 158, 83, 0.05), transparent 55%),
		linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 40%, var(--bg-void) 100%);
	background-attachment: fixed;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	user-select: none;
	-webkit-user-select: none;
}

/* Form fields stay selectable/editable — everything else on the page is not. */
input, textarea {
	user-select: text;
	-webkit-user-select: text;
}

body.menu-open { overflow: hidden; }

a { color: var(--gold-bright); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
/* Excludes button-like classes: their own :hover rules control color (or deliberately
   don't change it) — without this, this rule's extra element-selector specificity
   (a:hover) beats a plain .btn/.quicklink/.pagination-btn class and silently wins. */
a:not(.btn):not(.btn-login):not(.btn--small):not(.btn--admin):not(.quicklink):not(.pagination-btn):hover { color: var(--gold); }

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

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-display); letter-spacing: .02em; color: var(--gold-bright); margin: 0; }

::selection { background: var(--gold-deep); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-deep); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ==========================================================================
   Header — compact single row, sticky
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: linear-gradient(#0a0704f7, #14100af2);
	border-bottom: 1px solid var(--border-gold-strong);
	box-shadow: 0 1px #e87a3a2e, 0 12px 28px -12px #000000d9;
}

.header-inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	max-width: 1320px;
	height: 64px;
	margin: 0 auto;
	padding: 0 20px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-image { height: 34px; width: auto; }
.brand-name { font-family: var(--font-display); font-size: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-bright); }

/* No stretch: nav sizes to its content so the language switcher sits right next to
   the last nav link instead of being pinned to the far edge of the header. */
.top-bar { flex: 0 1 auto; min-width: 0; height: 100%; }

.top-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	height: 100%;
	flex-wrap: wrap;
}

.top-nav > a,
.dropdown__toggle {
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--text-muted);
	font-weight: 600;
	height: 64px;
	line-height: 64px;
	padding: 0 18px;
	background: transparent;
	border: none;
	cursor: pointer;
	position: relative;
	transition: color .2s ease, text-shadow .25s ease;
}

.top-nav > a::after,
.dropdown__toggle::after {
	content: '';
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--gold-bright), var(--ember), var(--gold-bright), transparent);
	filter: drop-shadow(0 0 6px rgba(232,122,58,.65));
	transition: width .3s ease;
}

.top-nav > a:hover,
.dropdown__toggle:hover,
.dropdown:hover .dropdown__toggle,
.top-nav > a.active {
	color: var(--gold-bright);
	text-shadow: 0 0 10px rgba(232,122,58,.35);
}

.top-nav > a:hover::after,
.dropdown__toggle:hover::after,
.dropdown:hover .dropdown__toggle::after,
.top-nav > a.active::after {
	width: 70%;
}

.dropdown { position: relative; }
.dropdown__menu {
	position: absolute;
	top: 64px;
	left: 50%;
	transform: translateX(-50%) translateY(-6px);
	min-width: 170px;
	background: var(--surface);
	border: 1px solid var(--border-gold-strong);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-glow), 0 14px 28px rgba(0,0,0,.55);
	padding: 6px 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	z-index: 50;
}
.dropdown:hover .dropdown__menu {
	opacity: 1; visibility: visible; pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}
.dropdown__menu-inner { display: flex; flex-direction: column; }
.dropdown__menu a {
	padding: 10px 18px;
	color: var(--text-muted);
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	border-left: 2px solid transparent;
	display: flex;
	align-items: center;
	gap: 8px;
	transition: all .2s ease;
}
.dropdown__menu a:hover { background: rgba(240,183,110,.08); color: var(--gold-bright); border-left-color: var(--ember); }

.dropdown--lang .dropdown__menu { left: auto; right: 0; transform: translateY(-6px); }
.dropdown--lang .dropdown__menu.active,
.dropdown--lang:hover .dropdown__menu { transform: translateY(0); }
.flag-icon { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--border-gold); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.mobile-menu-toggle {
	display: none;
	width: 38px;
	height: 38px;
	background: var(--surface);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-sm);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
	z-index: 60;
	flex-shrink: 0;
	order: -1;
}
.hamburger-line { width: 18px; height: 2px; background: var(--gold-bright); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }
.mobile-menu-toggle.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active .hamburger-line:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero banner (homepage)
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
	min-height: 380px;
	display: flex;
	align-items: center;
	background-image:
		linear-gradient(180deg, rgba(7,4,2,.55) 0%, rgba(7,4,2,.72) 55%, var(--bg-secondary) 100%),
		linear-gradient(90deg, rgba(7,4,2,.88) 0%, rgba(7,4,2,.15) 35%, rgba(7,4,2,.15) 65%, rgba(7,4,2,.88) 100%),
		url('../img/hero-bg1.jpg');
	background-size: cover;
	background-position: center 42%;
	border-bottom: 1px solid var(--border-gold);
}
.hero::before {
	content: '';
	position: absolute; inset: 0;
	background-image: radial-gradient(1px 1px at var(--ex, 20%) var(--ey, 30%), rgba(255,255,255,0.4), transparent);
	box-shadow:
		0 0 40px 6px rgba(207,158,83,.06) inset;
	pointer-events: none;
}
.hero__inner {
	position: relative;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 64px 20px;
	text-align: center;
}

.embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.embers span {
	position: absolute;
	bottom: -10px;
	width: 3px; height: 3px;
	border-radius: 50%;
	background: var(--gold-bright);
	box-shadow: 0 0 6px 2px rgba(242,207,149,.7);
	opacity: 0;
	animation: ember-rise linear infinite;
}
@keyframes ember-rise {
	0%   { transform: translateY(0) translateX(0); opacity: 0; }
	8%   { opacity: .9; }
	100% { transform: translateY(-380px) translateX(var(--drift, 20px)); opacity: 0; }
}
.hero__logo-link { display: inline-block; }
.hero__logo {
	height: 190px;
	width: auto;
	margin: 0 auto;
	filter: drop-shadow(0 0 36px rgba(207,158,83,.5)) drop-shadow(0 8px 24px rgba(0,0,0,.8));
	transition: filter .3s ease;
}
.hero__logo-link:hover .hero__logo { filter: drop-shadow(0 0 50px rgba(207,158,83,.7)) drop-shadow(0 8px 24px rgba(0,0,0,.8)); }

/* ==========================================================================
   Quick-links / stats icon bar
   ========================================================================== */

.quicklinks {
	display: flex;
	flex-wrap: wrap;
	border-top: 1px solid var(--border-gold-strong);
	border-bottom: 1px solid var(--border-gold-strong);
	box-shadow: inset 0 1px rgba(240,183,110,.1), 0 6px 18px rgba(0,0,0,.45);
	background:
		linear-gradient(180deg, rgba(7,4,2,.82), rgba(7,4,2,.94)),
		url('../img/skin/main_title_bg.png') repeat-x center / auto 100%,
		var(--bg-secondary);
}
.quicklink {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px 4px;
	border-right: 1px solid rgba(240,183,110,.08);
	color: var(--text-heading);
	text-align: center;
	text-decoration: none;
	flex: 1 1 130px;
	transition: background .22s ease, color .22s ease;
}
.quicklink:last-child { border-right: none; }
.quicklink__icon {
	width: 26px;
	height: 26px;
	color: var(--gold-muted);
	margin-bottom: 8px;
	transition: color .22s ease, filter .22s ease, transform .22s ease;
}
.quicklink:hover {
	background: linear-gradient(180deg, rgba(232,122,58,.08), transparent 60%);
	filter: brightness(1.12);
}
.quicklink:hover .quicklink__icon {
	color: var(--gold-bright);
	filter: drop-shadow(0 0 8px rgba(232,122,58,.65));
	transform: translateY(-2px);
}
.quicklink--red {
	background: linear-gradient(180deg, rgba(192,57,43,.85), rgba(120,30,20,.85));
	color: #fff;
	box-shadow: inset 0 1px rgba(255,200,180,.18), inset 0 -1px rgba(0,0,0,.45);
}
.quicklink--red .quicklink__icon { color: #ffe0d0; }
.quicklink--red:hover { filter: brightness(1.1); }
.quicklink--red:hover .quicklink__icon { color: #fff; }
.quicklink--blurple:hover .quicklink__icon { color: var(--accent-blurple); }
.quicklink--teal:hover .quicklink__icon { color: var(--accent-teal); }
.quicklink__label { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--text-muted); }
.quicklink__value {
	display: block;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	color: var(--gold-bright);
	text-shadow: 0 0 12px rgba(232,122,58,.4);
	margin-top: 2px;
}

/* ==========================================================================
   Sidebar mini events list
   ========================================================================== */

.mini-events { display: flex; flex-direction: column; gap: 4px; }
.mini-events__lead { font-size: 12px; color: var(--text-dim); margin: 0 0 10px; }
.mini-events__section-label {
	font-family: var(--font-display);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gold);
	margin: 14px 0 8px;
}
.mini-events__section-label:first-child { margin-top: 0; }
.mini-event {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: var(--radius-sm);
	background: rgba(0,0,0,0.2);
	border-left: 3px solid var(--gold);
	margin-bottom: 6px;
}
.mini-event--upcoming { border-left-color: var(--accent-blurple); }
.mini-event__icon {
	width: 30px; height: 30px;
	border-radius: var(--radius-sm);
	background: rgba(207,158,83,0.12);
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
	font-size: 15px;
}
.mini-event__body { min-width: 0; }
.mini-event__title { font-size: 12.5px; color: var(--text-primary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-event__time { font-size: 11px; color: var(--gold); }
.mini-event__time--upcoming { color: var(--accent-blurple); }
.mini-events__empty { font-size: 12px; color: var(--text-dim); padding: 6px 0; }
.mini-events__more { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--gold); }

/* ==========================================================================
   Glass panel component
   ========================================================================== */

.panel {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-panel);
	overflow: hidden;
	margin-bottom: 20px;
	animation: panel-in .5s ease both;
}
.panel__header {
	position: relative;
	padding: 14px 22px;
	border-bottom: 1px solid var(--border-gold);
	background-image:
		linear-gradient(180deg, rgba(10,6,3,.35) 0%, rgba(10,6,3,.72) 100%),
		url('../img/skin/left_panel_title_bg.png');
	background-size: cover;
	background-position: center;
	font-family: var(--font-display);
	font-size: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gold-bright);
	text-shadow: 0 1px 3px rgba(0,0,0,.8);
	display: flex;
	align-items: center;
	gap: 8px;
}
.panel__header::before {
	content: '';
	width: 6px; height: 6px;
	background: var(--gold);
	transform: rotate(45deg);
	box-shadow: 0 0 6px var(--gold-glow);
	flex-shrink: 0;
}

.panel__body { padding: 20px; }

.page-title {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

@keyframes panel-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Home layout grid
   ========================================================================== */

.site-main { padding: 36px 0 60px; }
.home-layout { display: grid; grid-template-columns: 260px 1fr 260px; gap: 20px; align-items: start; }
.home-left, .home-right { position: sticky; top: 92px; }
.home-center { min-width: 0; }

.user-welcome p { margin: 0 0 12px; color: var(--text-muted); font-size: 14px; }
.user-panel-nav { display: flex; flex-direction: column; gap: 6px; }
.user-panel-nav .btn { padding: 8px 16px; font-size: 11px; }

.stats-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stats-list li { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-muted); border-bottom: 1px dashed var(--border-hairline); padding-bottom: 8px; }
.stats-list li:last-child { border-bottom: none; padding-bottom: 0; }
.stats-list strong { font-family: var(--font-display); color: var(--gold-bright); font-size: 15px; }

.top-ranking-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; display: flex; flex-direction: column; gap: 6px; }
.ranking-entry {
	counter-increment: rank;
	display: flex; justify-content: space-between; align-items: center;
	padding: 9px 10px;
	border-radius: var(--radius-sm);
	background: rgba(0,0,0,0.15);
	border: 1px solid var(--border-hairline);
	font-size: 13px;
}
.ranking-entry::before {
	content: counter(rank);
	font-family: var(--font-display);
	color: var(--gold);
	width: 20px;
	margin-right: 6px;
	display: inline-block;
}
.player-name, .guild-name { color: var(--text-primary); font-weight: 600; }
.player-level, .guild-level { color: var(--text-dim); font-size: 12px; }

/* Podium (top 3) */
.podium { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.podium-card {
	flex: 1;
	min-width: 0;
	text-align: center;
	padding: 14px 6px 12px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-gold);
	background: rgba(0,0,0,.22);
	position: relative;
}
.podium-card[data-place="1"] {
	order: 2;
	padding-top: 20px;
	border-color: var(--gold);
	background: linear-gradient(180deg, rgba(207,158,83,.14), rgba(0,0,0,.22));
	box-shadow: 0 0 22px -8px var(--gold-glow);
}
.podium-card[data-place="2"] { order: 1; }
.podium-card[data-place="3"] { order: 3; }

.podium-medal {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px; height: 24px;
	border-radius: 50%;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 11px;
	margin-bottom: 8px;
	border: 2px solid;
}
.podium-card[data-place="1"] .podium-medal { background: linear-gradient(180deg, #ffe6ad, #cf9e53); border-color: #f2cf95; color: #241505; }
.podium-card[data-place="2"] .podium-medal { background: linear-gradient(180deg, #e7e7e7, #9aa0a6); border-color: #cfd3d6; color: #1c1c1c; }
.podium-card[data-place="3"] .podium-medal { background: linear-gradient(180deg, #d79a67, #8a5a34); border-color: #e0ac7c; color: #241505; }

.podium-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px; height: 46px;
	border-radius: 50%;
	margin: 0 auto 8px;
	border: 2px solid var(--border-gold);
	background: rgba(0,0,0,.3);
	overflow: hidden;
}
.podium-card[data-place="1"] .podium-avatar { width: 54px; height: 54px; border-color: var(--gold); }
.podium-avatar img { width: 100%; height: 100%; object-fit: cover; }
.podium-avatar--guild { color: var(--gold); }
.podium-avatar--guild svg { width: 22px; height: 22px; }

.podium-name { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-level { display: block; font-size: 11px; color: var(--gold); font-family: var(--font-display); margin-top: 2px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn, .btn-login, .btn--small, .btn--admin {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-display);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	padding: 11px 22px;
	border-radius: var(--radius-sm);
	border: 1px solid rgba(240,183,110,.47);
	background-image: linear-gradient(180deg, rgba(240,183,110,.05) 0%, transparent 100%), linear-gradient(180deg, #e8b766 0%, #8a5e1f 100%);
	box-shadow: inset 0 1px rgba(240,183,110,.08);
	color: #1a0e04;
	cursor: pointer;
	transition: filter .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease, background-color .15s ease;
	text-align: center;
}
.btn:hover, .btn-login:hover, .btn--small:hover {
	border-color: var(--border-gold-strong);
	box-shadow: 0 0 0 1px rgba(240,183,110,.2);
	filter: brightness(1.08);
}
.btn:active, .btn-login:active { filter: brightness(0.97); }

.btn--small { padding: 8px 16px; font-size: 11px; }
.btn--full { width: 100%; }
.btn--admin {
	background-image: linear-gradient(180deg, rgba(240,183,110,.05) 0%, transparent 100%);
	background-color: #251a10;
	color: var(--gold);
	border: 1px solid rgba(240,183,110,.28);
	box-shadow: inset 0 1px rgba(240,183,110,.08);
}
.btn--admin:hover {
	border-color: var(--border-gold-strong);
	background-color: #2e2011;
	box-shadow: inset 0 1px rgba(240,183,110,.08), 0 0 14px rgba(240,183,110,.25);
	filter: brightness(1.15);
}

.form-links { margin-top: 10px; text-align: center; }
.form-links a { font-size: 12px; color: var(--text-dim); }
.form-links a:hover { color: var(--gold-bright); }

/* ==========================================================================
   Forms
   ========================================================================== */

.form, .auth-form { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }

.g-recaptcha {
	transform: scale(0.77);
	transform-origin: 0 0;
	margin: -4px 0 -18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim); }

.form-input {
	background: rgba(0,0,0,0.28);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-sm);
	padding: 11px 14px;
	color: var(--text-primary);
	font-size: 14px;
	font-family: var(--font-body);
	transition: border-color .2s ease, box-shadow .2s ease;
	width: 100%;
}
.form-input:focus {
	outline: none;
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(207, 158, 83, 0.18);
}
.form-input.input-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(226, 104, 90, 0.18); }
.field-error { color: var(--danger); font-size: 12px; min-height: 14px; }

.verification-code-input { letter-spacing: .3em; text-align: center; font-family: var(--font-display); }

.terms-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.terms-label a { color: var(--gold); }

.auth-wrapper { max-width: 420px; margin: 0 auto; }

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Alerts / toasts
   ========================================================================== */

/* Inline within the panel that contains it (login form, shop, etc.) — not a floating
   corner toast — so the error sits right above whatever the visitor was looking at. */
#alertBanner { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
#alertBanner:empty { display: none; margin-bottom: 0; }

.alert-banner {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 14px 16px;
	border-radius: var(--radius-md);
	background: var(--surface-strong);
	border: 1px solid var(--danger);
	box-shadow: var(--shadow-panel);
	color: var(--text-primary);
	font-size: 13px;
	overflow: hidden;
	max-height: 80px;
	animation: alert-in .25s ease both;
}
.alert-banner.alert-success { border-color: var(--success); }
.alert-banner.alert-warning { border-color: var(--warning); }
.alert-banner.hiding { animation: alert-out .2s ease both; }
.alert-banner-close { background: none; border: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; opacity: .7; }
.alert-banner-close:hover { opacity: 1; }

@keyframes alert-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes alert-out { from { opacity: 1; max-height: 80px; } to { opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; } }

/* ==========================================================================
   Tables
   ========================================================================== */

.ranking-table-wrapper, .download-table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-gold); }

.ranking-table, .download-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.ranking-table thead, .download-table thead {
	background: linear-gradient(180deg, rgba(207,158,83,0.14), rgba(207,158,83,0.03));
}
.ranking-table th, .download-table th {
	font-family: var(--font-display);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--gold-bright);
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--border-gold);
	white-space: nowrap;
}
.ranking-table td, .download-table td {
	padding: 11px 14px;
	border-bottom: 1px solid var(--border-hairline);
	color: var(--text-muted);
}
.ranking-table tbody tr:hover, .download-table tbody tr:hover { background: rgba(207,158,83,0.05); }
.ranking-table tbody tr:last-child td, .download-table tbody tr:last-child td { border-bottom: none; }

.player-name-cell { color: var(--text-primary); font-weight: 600; }
.level-cell { color: var(--gold); font-family: var(--font-display); }
.kingdom-map-icon, .kingdom-cell img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--border-gold); }
.no-news-message { text-align: center; padding: 26px; color: var(--text-dim); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pagination-btn, .pagination-current {
	min-width: 34px; height: 34px;
	display: flex; align-items: center; justify-content: center;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-gold);
	font-size: 13px;
	color: var(--text-muted);
}
.pagination-btn:hover { border-color: var(--border-gold-strong); background: rgba(207,158,83,0.12); }
.pagination-current { background: var(--gold); color: #241505; font-weight: 700; border-color: var(--gold); }

/* ==========================================================================
   News / content
   ========================================================================== */

.news-list { display: flex; flex-direction: column; gap: 22px; }
.news-item { padding-bottom: 22px; border-bottom: 1px solid var(--border-hairline); }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-title-wrapper { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.news-title-wrapper h2 { font-size: 19px; }
.news-content { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; position: relative; }
.news-content img { border-radius: var(--radius-md); margin: 10px 0; }
.news-content.is-truncated { max-height: 220px; overflow: hidden; }
.news-content.is-truncated::after {
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 70px;
	background: linear-gradient(180deg, transparent, #1a120b);
	pointer-events: none;
}
.news-readmore { margin-top: 14px; }
.news-footer { margin-top: 10px; }
.news-date { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

.page-single .page-content { color: var(--text-muted); line-height: 1.7; font-size: 14.5px; }
.page-footer { margin-top: 18px; }
.page-date { font-size: 12px; color: var(--text-dim); }

/* ==========================================================================
   Download page
   ========================================================================== */

.download-table th, .download-table td { text-align: center; border-right: 1px solid var(--border-hairline); }
.download-table th:last-child, .download-table td:last-child { border-right: none; }
.download-number { width: 80px; color: var(--gold); font-family: var(--font-display); font-weight: 700; }
.download-server { font-size: 14px; }
.download-action { width: 200px; }
.download-action .btn { min-width: 130px; }

/* ==========================================================================
   Presentation gallery
   ========================================================================== */

.presentation-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.presentation-slide { margin: 0; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-gold); transition: transform .25s ease, box-shadow .25s ease; }
.presentation-slide:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.presentation-slide img { width: 100%; height: auto; }
.presentation-empty { color: var(--text-dim); text-align: center; padding: 40px 0; }

/* ==========================================================================
   User panel accordion + account info
   ========================================================================== */

.account-info-box { margin-bottom: 20px; border: 1px solid var(--border-gold); border-radius: var(--radius-md); overflow: hidden; }
.account-info-header { padding: 12px 16px; background: rgba(207,158,83,0.10); font-family: var(--font-display); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-bright); }
.account-info-content { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.account-info-content--compact { gap: 14px; }
.info-row { display: flex; justify-content: space-between; font-size: 14px; padding-bottom: 8px; border-bottom: 1px dashed var(--border-hairline); }
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-label { color: var(--text-dim); }
.info-value { color: var(--gold-bright); font-weight: 600; }
.panel-note { color: var(--text-dim); font-size: 13px; margin: 0 0 4px; }

.panel-section-wrapper { display: flex; flex-direction: column; gap: 10px; }
.panel-section {
	cursor: pointer;
	padding: 14px 16px;
	background: rgba(0,0,0,0.2);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-md);
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--text-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: color .2s ease, border-color .2s ease;
}
.panel-section::after { content: '+'; font-size: 18px; color: var(--gold); transition: transform .25s ease; }
.panel-section.active { color: var(--gold-bright); border-color: var(--border-gold-strong); }
.panel-section.active::after { transform: rotate(45deg); }
.panel-section-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height .35s ease, padding .35s ease;
	padding: 0 4px;
}
.panel-section.active + .panel-section-content { max-height: 900px; padding: 16px 4px; }

/* ==========================================================================
   Events page
   ========================================================================== */

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

.event-card {
	position: relative;
	padding: 18px;
	border-radius: var(--radius-md);
	background: linear-gradient(160deg, rgba(207,158,83,0.10), rgba(0,0,0,0.25));
	border: 1px solid var(--border-gold);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.event-card::before {
	content: '';
	position: absolute; inset: 0;
	background: radial-gradient(120px 80px at 100% 0%, rgba(207,158,83,0.18), transparent 70%);
	pointer-events: none;
}

.event-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 10px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--success);
	margin-bottom: 10px;
}
.event-card__badge .dot {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--success);
	box-shadow: 0 0 8px var(--success);
	animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.event-card__title { font-family: var(--font-display); font-size: 17px; color: var(--gold-bright); margin-bottom: 10px; }

.event-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.event-tag {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(0,0,0,0.25);
	border: 1px solid var(--border-hairline);
	color: var(--text-muted);
}

.event-card__countdown {
	font-family: var(--font-display);
	font-size: 13px;
	color: var(--gold);
	border-top: 1px solid var(--border-hairline);
	padding-top: 10px;
}

.events-empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.events-empty__icon { font-size: 34px; margin-bottom: 10px; opacity: .6; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--border-gold); background: var(--bg-secondary); padding: 26px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-column { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-column a { font-size: 12px; color: var(--text-dim); }
.footer-column a:hover { color: var(--gold-bright); }
.footer-copyright { font-size: 12px; color: var(--text-dim); text-align: center; }
.footer-credit { font-size: 10.5px; color: var(--text-dim); opacity: .6; margin-top: 4px; }
.footer-credit a { color: var(--text-dim); text-decoration: underline; }
.footer-credit a:hover { color: var(--gold); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
	.home-layout { grid-template-columns: 220px 1fr 220px; }
}

@media (max-width: 900px) {
	.home-layout { grid-template-columns: 1fr; }
	.home-left, .home-right { position: static; }
	.mobile-menu-toggle { display: flex; }

	.top-bar { position: static; flex: 0; }
	.top-nav {
		position: fixed;
		top: 0; left: 0;
		height: 100vh;
		width: 78%;
		max-width: 320px;
		background: var(--bg-secondary);
		border-right: 1px solid var(--border-gold);
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		padding: 90px 20px 20px;
		transform: translateX(-105%);
		transition: transform .3s ease;
		z-index: 55;
		gap: 4px;
		overflow-y: auto;
	}
	.top-nav.mobile-active { transform: translateX(0); box-shadow: 30px 0 60px rgba(0,0,0,.5); }
	.top-nav > a, .dropdown { width: 100%; }
	.top-nav > a, .dropdown__toggle { width: 100%; text-align: left; border-radius: var(--radius-sm); }
	.top-nav > a.active { border-radius: var(--radius-sm); }
	/* The animated underline reads fine on the horizontal desktop nav but looks like a
	   stray bar under a left-aligned stacked list — drop it here, the active/hover
	   text color + glow already carries the "selected" state on mobile. */
	.top-nav > a::after, .dropdown__toggle::after { display: none; }
	/* Scoped to .top-nav only: the language dropdown lives in .header-actions, outside
	   the off-canvas nav, and must keep its normal absolute/floating popup behavior
	   (see .dropdown--lang below) instead of being flattened into the stacked list. */
	.top-nav .dropdown__menu {
		position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
		box-shadow: none; border: none; background: transparent; padding: 0 0 0 14px;
		max-height: 0; overflow: hidden; transition: max-height .25s ease;
	}
	/* transform: none is repeated here (not just on .top-nav .dropdown__menu above) because
	   the desktop ".dropdown:hover .dropdown__menu" rule has higher specificity (3 classes
	   vs 2) and a real :hover state — which mobile taps do trigger — was winning and
	   re-applying its translateX(-50%) centering, flinging the submenu off-screen. */
	.top-nav .dropdown:hover .dropdown__menu,
	.top-nav .dropdown:focus-within .dropdown__menu,
	.top-nav .dropdown.active .dropdown__menu { max-height: 200px; transform: none; }

	.header-inner { justify-content: space-between; gap: 10px; }

	.hero__inner { padding: 44px 20px; }
	.hero__logo { height: 130px; }
	.quicklink { flex-basis: 33%; border-bottom: 1px solid var(--border-hairline); }
}

@media (max-width: 560px) {
	.container { padding: 0 14px; }
	.panel__body, .panel__header { padding: 14px; }
	#alertBanner { left: 14px; right: 14px; max-width: none; top: 80px; }
	.events-grid { grid-template-columns: 1fr; }
	.quicklink { flex-basis: 50%; }
	.hero__logo { height: 100px; }
}

/* ==========================================================================
   Shop — coin package purchase (Stripe)
   ========================================================================== */

.shop-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: stretch; }

.shop-card {
	position: relative;
	width: 168px;
	display: flex;
	flex-direction: column;
	text-align: center;
	background: var(--surface);
	border: 1px solid var(--border-gold);
	border-radius: var(--radius-md);
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-glow); border-color: var(--border-gold-strong); }

.shop-card__badge {
	background: linear-gradient(180deg, #c2483d, #7a251c);
	color: #fff;
	font-family: var(--font-display);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .05em;
	padding: 4px 0;
}

.shop-card__name {
	padding: 12px 10px 10px;
	border-bottom: 1px solid var(--border-hairline);
	font-family: var(--font-display);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--text-primary);
	line-height: 1.35;
}

.shop-card__coins {
	padding: 16px 10px 14px;
	border-bottom: 1px solid var(--border-hairline);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.shop-card__coins-value { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--gold-bright); text-shadow: 0 0 14px rgba(232,122,58,.35); line-height: 1; }
.shop-card__coins-label { font-size: 9px; font-weight: 600; letter-spacing: .2em; color: var(--text-dim); text-transform: uppercase; margin-top: 6px; }
.shop-card__jcoins { font-size: 10px; color: var(--gold); margin-top: 5px; }

.shop-card__price { padding: 10px 10px 8px; border-bottom: 1px solid var(--border-hairline); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.shop-card__price-original { font-size: 10.5px; color: var(--text-dim); text-decoration: line-through; }
.shop-card__price-final { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.shop-card__form { padding: 10px; margin-top: auto; }
