/* ===========================================================================
   Armory theme — dark, Blizzard-armory inspired.
   Palette: deep blue-slate background, gold accents, parchment-grey text.
   =========================================================================== */

:root {
	--bg-0: #0a0d14;          /* page base */
	--bg-1: #12161f;          /* panels */
	--bg-2: #1b212e;          /* raised panels / rows */
	--bg-3: #262d3d;          /* hover / borders-light */
	--line: #2e3647;          /* hairline borders */
	--text: #c8cdd6;          /* body text */
	--text-dim: #8b94a3;      /* secondary text */
	--text-bright: #f2f4f8;   /* headings */
	--gold: #f8b700;          /* primary accent (WoW gold) */
	--gold-dim: #c79c2e;
	--link: #ffd967;
	--alliance: #1f6fd0;
	--horde: #b01e1e;

	/* item quality colors */
	--q0: #9d9d9d; --q1: #ffffff; --q2: #1eff00; --q3: #0070dd;
	--q4: #a335ee; --q5: #ff8000; --q6: #e6cc80; --q7: #e6cc80;

	/* WoW class colors */
	--c1: #c79c6e;  /* Warrior */
	--c2: #f58cba;  /* Paladin */
	--c3: #abd473;  /* Hunter */
	--c4: #fff569;  /* Rogue */
	--c5: #ffffff;  /* Priest */
	--c6: #c41f3b;  /* Death Knight */
	--c7: #0070de;  /* Shaman */
	--c8: #69ccf0;  /* Mage */
	--c9: #9482c9;  /* Warlock */
	--c11: #ff7d0a; /* Druid */
}

html {
	overflow-y: auto;
	background: var(--bg-0);
	scroll-behavior: smooth;
}

[id] {
	scroll-margin-top: 1rem; /* breathing room above anchored section titles */
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--text);
	font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background:
		radial-gradient(1200px 600px at 50% -10%, rgba(40, 60, 100, 0.35), transparent 60%),
		linear-gradient(180deg, #0c1019 0%, var(--bg-0) 55%);
	background-attachment: fixed;
}

.section {
	flex: 1 0 auto;
	max-width: 1180px;
	width: 100%;
	margin: 0 auto;
	padding: 2rem 1.25rem 3rem;
}

/* ---- typography ---------------------------------------------------------- */
h1, h2, h3, .title, .char-name {
	font-family: "Cinzel", Georgia, serif !important;
	color: var(--text-bright);
	letter-spacing: 0.01em;
}

.title { color: var(--text-bright) !important; }

a {
	color: var(--link);
	transition: color 0.12s ease;
}
a:hover { color: var(--gold); }

/* ---- top bar ------------------------------------------------------------- */
.site-topbar {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 0 1.5rem;
	height: 58px;
	background: linear-gradient(180deg, #161b26 0%, #0e121b 100%);
	border-bottom: 1px solid var(--gold-dim);
	box-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.site-brand {
	font-family: "Cinzel", serif;
	font-weight: 900;
	font-size: 1.4rem;
	color: var(--gold) !important;
	text-decoration: none;
	text-shadow: 0 1px 0 #000;
}
.site-brand:hover { color: #ffd24a !important; }

.site-nav a {
	color: var(--text-dim);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	margin-right: 1.2rem;
}
.site-nav a:hover { color: var(--text-bright); }

/* ---- account menu (top right) --------------------------------------------- */
.account-menu {
	margin-left: auto;
	position: relative;
}
.account-button {
	background: var(--bg-2);
	border: 1px solid var(--bg-3);
	border-radius: 4px;
	color: var(--gold);
	font-family: "Cinzel", serif;
	font-weight: 700;
	font-size: 0.9rem;
	letter-spacing: 0.04em;
	padding: 6px 14px;
	cursor: pointer;
}
.account-button:hover { border-color: var(--gold-dim); }
.account-caret { color: var(--text-dim); font-size: 0.75rem; }

.account-dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 230px;
	background: var(--bg-1);
	border: 1px solid var(--line);
	border-radius: 6px;
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65);
	padding: 0.5rem 0;
	z-index: 100;
}
.account-dropdown-label {
	color: var(--text-dim);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 0.35rem 1rem 0.2rem;
}
.account-dropdown-sep {
	border-top: 1px solid var(--line);
	margin: 0.45rem 0;
}
.account-dropdown-link {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.45rem 1rem;
	color: var(--text);
	font-size: 0.9rem;
}
.account-dropdown-link:hover { background: var(--bg-2); color: var(--text-bright); }
.account-dropdown-link img { width: 22px; height: 22px; border-radius: 50%; }
.account-char-level { color: var(--text-dim); font-size: 0.78rem; margin-left: auto; }
.account-char-online { color: #6ee7a8; font-size: 0.7rem; }
.account-dropdown-empty { color: var(--text-dim); font-size: 0.85rem; padding: 0.35rem 1rem; }

/* ---- footer -------------------------------------------------------------- */
.site-footer {
	flex-shrink: 0;
	text-align: center;
	padding: 1.25rem;
	color: var(--text-dim);
	font-size: 0.8rem;
	border-top: 1px solid var(--line);
	background: #0a0d14;
}
.site-footer span { color: var(--gold-dim); }

/* ---- generic panels / Bulma overrides ------------------------------------ */
.box {
	background: var(--bg-1);
	border: 1px solid var(--line);
	color: var(--text);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.button {
	background: var(--bg-2);
	border: 1px solid var(--bg-3);
	color: var(--text);
}
.button:hover { background: var(--bg-3); color: var(--text-bright); border-color: var(--gold-dim); }
.button.is-primary {
	background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 100%);
	border-color: var(--gold-dim);
	color: #1a1206;
	font-weight: 700;
}
.button.is-primary:hover { color: #000; filter: brightness(1.08); }

.input, .select select {
	background: var(--bg-0);
	border: 1px solid var(--bg-3);
	color: var(--text);
}
.input:focus, .select select:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 2px rgba(248, 183, 0, 0.15); }
.label, .checkbox, .radio { color: var(--text); }

/* ---- class colors (apply via .class-cN) ---------------------------------- */
.class-c1 { color: var(--c1) !important; }
.class-c2 { color: var(--c2) !important; }
.class-c3 { color: var(--c3) !important; }
.class-c4 { color: var(--c4) !important; }
.class-c5 { color: var(--c5) !important; }
.class-c6 { color: var(--c6) !important; }
.class-c7 { color: var(--c7) !important; }
.class-c8 { color: var(--c8) !important; }
.class-c9 { color: var(--c9) !important; }
.class-c11 { color: var(--c11) !important; }

/* ===========================================================================
   Character hero header (shared by character / talents / achievements / pvp)
   Lives here (global) so every character subpage gets it, not just the main
   character page whose own stylesheet would otherwise be the only one loaded.
   =========================================================================== */
.char-hero {
	--ca: 80, 110, 170;   /* class accent (r,g,b); overridden per class below */
	position: relative;
	margin-bottom: 1.75rem;
	padding: 1.25rem 1.5rem 0;
	background:
		radial-gradient(85% 130% at 100% 0%, rgba(var(--ca), 0.32) 0%, rgba(var(--ca), 0.08) 38%, transparent 62%),
		linear-gradient(180deg, rgba(10, 13, 20, 0.2) 0%, rgba(10, 13, 20, 0.85) 100%),
		var(--bg-1);
	border: 1px solid var(--line);
	border-radius: 6px;
	overflow: hidden;
}
/* per-class accent for the plate wash (WoW class colors) */
.char-hero.class-bg-1  { --ca: 199, 156, 110; } /* Warrior */
.char-hero.class-bg-2  { --ca: 245, 140, 186; } /* Paladin */
.char-hero.class-bg-3  { --ca: 171, 212, 115; } /* Hunter */
.char-hero.class-bg-4  { --ca: 255, 245, 105; } /* Rogue */
.char-hero.class-bg-5  { --ca: 200, 200, 210; } /* Priest (white, toned down) */
.char-hero.class-bg-6  { --ca: 196,  31,  59; } /* Death Knight */
.char-hero.class-bg-7  { --ca:   0, 112, 222; } /* Shaman */
.char-hero.class-bg-8  { --ca: 105, 204, 240; } /* Mage */
.char-hero.class-bg-9  { --ca: 148, 130, 201; } /* Warlock */
.char-hero.class-bg-11 { --ca: 255, 125,  10; } /* Druid */
/* faction accent strip + tint down the left edge */
.char-hero::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 5px;
}
.char-hero.faction-alliance::before { background: linear-gradient(180deg, #2f7fe0, #14407f); }
.char-hero.faction-horde::before    { background: linear-gradient(180deg, #d63333, #7a1414); }
.char-hero.faction-alliance { box-shadow: inset 220px 0 220px -200px rgba(31, 111, 208, 0.5); }
.char-hero.faction-horde    { box-shadow: inset 220px 0 220px -200px rgba(176, 30, 30, 0.5); }

/* class crest (Cataclysm crest art, transparent PNG), top-right of the plate.
   Anchored inside .char-hero-main: the negative top lets it bleed UP into the
   back-link/padding area (bigger presence in the class-color corner), while
   bottom: 0 clamps it to the info block so it can never cross the divider
   into the tab row, even on plates with no guild line. */
.char-crest {
	position: absolute;
	top: -34px;
	bottom: 0;
	right: 0.75rem;
	width: 250px;
	background-size: contain;
	background-position: right center;
	background-repeat: no-repeat;
	opacity: 0.6;
	pointer-events: none;
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
	z-index: 0;
}
.char-identity {
	position: relative;
	z-index: 1;
}
@media screen and (max-width: 768px) {
	.char-crest {
		width: 110px;
		opacity: 0.18; /* fades to a watermark where it overlaps text */
		right: 0.5rem;
	}
}
.char-hero-main, .char-tabs, .char-back {
	position: relative;
	z-index: 1;
}

.char-back {
	display: inline-block;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-dim);
	margin-bottom: 0.75rem;
}
.char-back:hover { color: var(--gold); }

.char-name.title {
	margin-bottom: 0.1rem;
	line-height: 1.1;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}
.char-subtitle {
	font-size: 1.1rem;
	color: var(--text);
	margin-bottom: 0.25rem;
}
.guild-name {
	display: inline-block;
	color: var(--text-dim);
	font-size: 1.1rem; /* match .char-subtitle so the info block uses two sizes, not three */
}
.guild-rank-tag {
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--gold);
	border: 1px solid var(--gold-dim);
	background: rgba(248, 183, 0, 0.10);
	border-radius: 999px;
	padding: 1px 8px;
	margin-left: 0.5rem;
	vertical-align: 1px;
}
.char-meta {
	margin-top: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.char-realm {
	color: var(--text-dim);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.status-pill {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 2px 9px;
	border-radius: 999px;
	border: 1px solid;
}
.status-pill.is-online  { color: #6ee7a8; border-color: #2f6e4d; background: rgba(46, 110, 77, 0.25); }
.status-pill.is-offline { color: #c77; border-color: #5a2a2a; background: rgba(90, 42, 42, 0.25); }

.char-tabs {
	display: flex;
	gap: 0.25rem;
	margin-top: 1.1rem;
	border-top: 1px solid var(--line);
	padding-top: 0.4rem;
}
.char-tabs a {
	padding: 0.55rem 1.1rem;
	color: var(--text-dim);
	font-family: "Cinzel", serif;
	font-size: 0.92rem;
	border-bottom: 2px solid transparent;
}
.char-tabs a:hover { color: var(--text-bright); }
.char-tabs a.is-active {
	color: var(--gold);
	border-bottom-color: var(--gold);
}

/* ===========================================================================
   Index / search page
   =========================================================================== */
#select-realm-container { display: flex; }
#select-realm-container .realm-label { align-self: center; margin-right: 8px; color: var(--text-dim); }

#results_wrapper { margin-top: 0.5rem; }

table.dataTable {
	background: var(--bg-1);
	border: 1px solid var(--line);
	border-collapse: collapse !important;
}
table.dataTable thead th {
	background: linear-gradient(180deg, #1c2230 0%, #141925 100%);
	color: var(--gold) !important;
	font-family: "Cinzel", serif;
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	border-bottom: 2px solid var(--gold-dim) !important;
}
table.dataTable tbody tr { background: transparent; }
table.dataTable.stripe tbody tr.odd,
table.dataTable tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
table.dataTable.hover tbody tr:hover,
table.dataTable tbody tr:hover { background: rgba(248, 183, 0, 0.07) !important; }
table.dataTable tbody td {
	color: var(--text);
	border-top: 1px solid var(--line) !important;
}
table.dataTable tbody td a { font-weight: 500; }

.dataTables_wrapper .dataTables_filter input { background: var(--bg-0); color: var(--text); }
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_paginate { color: var(--text-dim) !important; }
.dataTables_wrapper .dataTables_paginate .button { color: var(--text); }
