:root {
	--bg: #0f1218;
	--bg-top: #172033;

	--panel: rgba(24, 28, 37, 0.96);
	--panel-2: #10141d;

	--border: #2a3040;

	--text: #f4f4f5;
	--muted: #9ca3af;

	--blue: #38bdf8;
	--blue-hover: #67d0fa;

	--yellow: #facc15;
	--orange: #fb923c;
	--green: #4ade80;
	--red: #fb7185;

	--shadow:
		0 12px 30px rgba(0, 0, 0, 0.25);

	--radius: 16px;
}

.app-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
}

.header-actions {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-top: 0;
}

.header-actions button {
	padding: 9px 15px;
	font-size: 12.5px;
	border-radius: 8px;
}

.tab-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 14px;
}

.tab-button {
	background: #111722;
	color: var(--muted);
	border: 1px solid var(--border);
	padding: 10px 14px;
}

.tab-button:hover {
	color: var(--text);
	border-color: var(--blue);
	background: #162235;
}

.tab-button.active {
	background: var(--blue);
	color: #081018;
	border-color: var(--blue);
}

.tab-panel-title {
	margin-bottom: 6px;
}

.tab-panel-description {
	color: var(--muted);
	margin-bottom: 18px;
}

@media (max-width: 900px) {
	.app-header {
		flex-direction: column;
	}

	.header-actions {
		margin-top: 0;
		width: 100%;
		flex-direction: column;
	}

	.header-actions button {
		width: 100%;
	}
}

/* =========================
   BETA TAG
========================= */
.beta-badge {
	display: inline-flex;
	align-items: center;

	padding: 4px 10px;

	border: 1px solid rgba(56, 189, 248, 0.35);

	border-radius: 999px;

	background: rgba(56, 189, 248, 0.08);

	color: var(--blue);

	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;

	text-transform: uppercase;

	vertical-align: middle;
}

.title-row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.title-row h1 {
	margin-bottom: 0;
}

/* =========================
   Base
========================= */

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;

	min-height: 100vh;

	background:
		radial-gradient(
			circle at top,
			var(--bg-top) 0%,
			var(--bg) 55%
		);

	background-color: var(--bg);

	background-attachment: fixed;

	color: var(--text);

	font-family:
		Inter,
		Arial,
		sans-serif;

	padding: 40px;
}

.container {
	width: 100%;
	max-width: 1400px;
	margin: auto;
}

/* =========================
   Typography
========================= */

h1,
h2,
h3,
h4,
p {
	margin-top: 0;
}

h1 {
	font-size: 48px;
	margin-bottom: 8px;
	color: var(--blue);
}

h2 {
	font-size: 24px;
	margin-bottom: 6px;
}

.subtitle {
	color: var(--muted);
	max-width: 800px;
	line-height: 1.6;
}

.eyebrow {
	color: var(--blue);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 10px;
}

.section-description {
	color: var(--muted);
	margin-bottom: 0;
	line-height: 1.5;
}

.status {
	color: var(--yellow);
	font-weight: bold;
	font-size: 15px;
}

/* =========================
   Hero
========================= */

.hero {
	margin-bottom: 26px;
}

/* =========================
   Cards
========================= */

.card {
	background: var(--panel);

	border: 1px solid var(--border);

	border-radius: var(--radius);

	padding: 24px;

	margin-bottom: 20px;

	box-shadow: var(--shadow);

	backdrop-filter: blur(8px);
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;

	margin-bottom: 18px;
}

/* =========================
   Inputs
========================= */

.input-row {
	display: flex;
	gap: 14px;
}

input {
	width: 100%;

	padding: 15px;

	border-radius: 12px;

	border: 1px solid #3b4255;

	background: #0b0f17;

	color: white;

	font-size: 16px;

	outline: none;

	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

input:focus {
	border-color: var(--blue);

	box-shadow:
		0 0 0 3px rgba(56, 189, 248, 0.15);
}

button {
	border: 0;

	border-radius: 12px;

	background: var(--blue);

	color: #081018;

	padding: 14px 22px;

	font-weight: 700;

	cursor: pointer;

	transition:
		transform 0.12s ease,
		background 0.12s ease;
}

button:hover {
	background: var(--blue-hover);
	transform: translateY(-1px);
}

button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

/* =========================
   Boss Tiles
========================= */

.encounter-nav-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
}

.encounter-nav {
	display: flex;
	align-items: center;
	gap: 12px;

	flex: 1;

	overflow-x: auto;
	overflow-y: hidden;

	scrollbar-width: none;

	white-space: nowrap;
}

.encounter-nav::-webkit-scrollbar {
	display: none;
}

.encounter-nav-button {
	flex: 0 0 auto;

	min-width: 184px;
	height: 58px;

	padding: 8px 18px;

	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;

	background: var(--panel-2);

	border: 1px solid var(--border);

	border-radius: 12px;

	color: var(--text);

	white-space: nowrap;

	transition:
		border-color 0.12s ease,
		background 0.12s ease,
		box-shadow 0.12s ease,
		transform 0.12s ease;
}

.encounter-nav-button:hover {
	border-color: var(--blue);
	box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
	transform: translateY(-1px);
}

.encounter-nav-button.active {
	border-color: var(--blue);
	background: #162235;
	box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
}

.encounter-nav-name {
	font-size: 15px;
	font-weight: 800;
	line-height: 1.1;
}

.encounter-nav-button.active .encounter-nav-name {
	color: var(--blue);
}

.encounter-nav-meta {
	display: flex;
	align-items: center;
	gap: 5px;

	font-size: 10px;
	font-weight: 800;
	line-height: 1;

	text-transform: none;
}

.encounter-meta-divider {
	color: var(--muted);
	opacity: 0.65;
}

.encounter-difficulty {
	color: var(--muted);
}

.encounter-result.kill {
	color: var(--green);
}

.encounter-result.wipe {
	color: var(--red);
}

.encounter-scroll-button {
	flex: 0 0 auto;

	width: 48px;
	height: 48px;

	padding: 0;

	display: flex;
	align-items: center;
	justify-content: center;

	font-size: 20px;
	font-weight: 700;
}

.encounter-scroll-hint {
	margin-top: 12px;

	text-align: center;

	color: var(--muted);

	font-size: 13px;
}

/* =========================
   Summary Grid
========================= */

.stat-grid {
	display: grid;

	grid-template-columns:
		repeat(auto-fit, minmax(170px, 1fr));

	gap: 10px;
}

.stat {
	background: var(--panel-2);

	border: 1px solid var(--border);

	border-radius: 12px;

	padding: 10px 12px;
}

.stat-label {
	color: var(--muted);

	font-size: 11px;

	text-transform: uppercase;

	letter-spacing: 0.05em;

	margin-bottom: 4px;
}

.stat-value {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	word-break: break-word;
}

/* =========================
   Tables
========================= */

.table-wrapper {
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

th {
	color: var(--muted);

	background: #111722;

	font-size: 12px;

	text-transform: uppercase;

	letter-spacing: 0.04em;
}

tbody tr:hover td {
	background: #151b27;
}

/* =========================
   Pills / Grades
========================= */

.pill {
	display: inline-flex;
	align-items: center;

	padding: 5px 10px;

	border-radius: 999px;

	font-size: 12px;
	font-weight: 700;

	background: #222838;

	border: 1px solid var(--border);
}

.grade-A {
	color: var(--green);
}

.grade-B {
	color: #bef264;
}

.grade-C {
	color: var(--yellow);
}

.grade-D {
	color: var(--orange);
}

.grade-F {
	color: var(--red);
}

/* =========================
   Severity
========================= */

.severity-Critical {
	color: var(--red);
	font-weight: 700;
}

.severity-Major {
	color: var(--orange);
	font-weight: 700;
}

.severity-Warning {
	color: var(--yellow);
	font-weight: 700;
}

/* =========================
   Player Names
========================= */

.player-name {
	font-weight: 700;
}

/* =========================
   Benchmark Comparisons
========================= */

.compare-link {
	color: var(--blue);

	font-weight: 700;

	text-decoration: none;

	transition:
		color 0.12s ease,
		opacity 0.12s ease;
}

.compare-link:hover {
	color: var(--blue-hover);

	text-decoration: underline;
}

.benchmark-value {
	font-weight: 700;

	font-size: 15px;
}

.benchmark-muted {
	color: var(--muted);

	font-size: 13px;

	margin-top: 4px;
}

.benchmark-block {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.benchmark-block a {
	width: fit-content;
}

#benchmarksTable td {
	vertical-align: top;
}

.benchmark-grade {
	gap: 2px;
}

.benchmark-asterisk {
	color: var(--blue);
	font-weight: 900;
	margin-left: 2px;
}

.benchmark-disclaimer {
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
	margin-top: 14px;
	margin-bottom: 0;
}

/* =========================
   Raw Debug
========================= */

pre {
	margin: 0;

	white-space: pre-wrap;

	overflow-x: auto;

	background: #0b0e13;

	border-radius: 12px;

	padding: 16px;

	line-height: 1.5;
}

/* =========================
   Utility
========================= */

.hidden {
	display: none !important;
}

/* =========================
   Responsive
========================= */

@media (max-width: 900px) {
	body {
		padding: 20px;
	}

	.input-row {
		flex-direction: column;
	}

	button {
		width: 100%;
	}

	h1 {
		font-size: 38px;
	}
}

@media (max-width: 600px) {
	.card {
		padding: 18px;
	}

	.stat-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================
   Mechanics Expandable Rows
========================= */

.mechanic-name-button {
	background: none;
	border: none;
	color: var(--text);
	font: inherit;
	font-weight: 700;
	padding: 0;
	cursor: pointer;
	text-align: left;
	width: 100%;
}

.mechanic-name-button:hover {
	color: var(--blue);
	transform: none;
	background: none;
}

.mechanic-expanded-row td {
	background: #101722;
	padding: 0;
	border-bottom: 1px solid var(--border);
}

.mechanic-expanded-content {
	padding: 18px;
}

.mechanic-expanded-title {
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 12px;
	color: var(--blue);
}

.mechanic-player-table {
	width: 100%;
	border-collapse: collapse;
}

.mechanic-player-table th,
.mechanic-player-table td {
	padding: 8px 10px;
	border-bottom: 1px solid #1f2937;
}

.mechanic-player-table th {
	font-size: 11px;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: #0f172a;
}

/* =========================
   Analysis Console
========================= */

.analysis-status-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 14px;
}

.analysis-status-label {
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 4px;
}

.analysis-current-step {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.analysis-fight-badge {
	display: inline-flex;
	align-items: center;

	padding: 4px 10px;

	border-radius: 999px;

	font-size: 12px;
	font-weight: 700;

	background: rgba(56, 189, 248, 0.12);

	color: var(--blue);

	border: 1px solid rgba(56, 189, 248, 0.25);
}

.analysis-progress-number {
	font-size: 22px;
	font-weight: 800;
	color: var(--blue);
}

.analysis-progress-bar {
	width: 100%;
	height: 12px;
	background: #0b0f17;
	border: 1px solid var(--border);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 16px;
}

.analysis-progress-fill {
	height: 100%;
	background: linear-gradient(
		90deg,
		var(--blue),
		var(--green)
	);
	border-radius: 999px;
	transition: width 0.25s ease;
}

.analysis-console {
	height: 280px;
	overflow-y: auto;
	background: #070b12;
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 14px;
	font-family:
		Consolas,
		Monaco,
		"Courier New",
		monospace;
	font-size: 13px;
	line-height: 1.5;
}

.analysis-log-line {
	animation: logFadeIn 0.18s ease;
	display: flex;
	gap: 10px;
	padding: 3px 0;
	color: var(--text);
}

.analysis-log-time {
	color: var(--muted);
	flex: 0 0 auto;
}

.analysis-log-message {
	color: var(--text);
}

.analysis-log-success .analysis-log-message {
	color: var(--green);
}

.analysis-log-error .analysis-log-message {
	color: var(--red);
}

.analysis-log-warning .analysis-log-message {
	color: var(--yellow);
}

@keyframes logFadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =========================
   Raid Coach
========================= */

.raid-coach-layout {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.raid-coach-card {
	background: var(--panel-2);

	border: 1px solid var(--border);

	border-radius: 14px;

	padding: 20px;
}

.raid-coach-overall {
	border-color: rgba(56, 189, 248, 0.25);

	background:
		linear-gradient(
			180deg,
			rgba(56, 189, 248, 0.06),
			rgba(16, 20, 29, 1)
		);
}

.raid-coach-title {
	font-size: 18px;
	font-weight: 800;
	margin-bottom: 14px;
	color: var(--blue);
}

.raid-coach-overall-text {
	line-height: 1.7;
	color: var(--text);
	font-size: 15px;
}

.raid-coach-list {
	margin: 0;
	padding-left: 20px;

	display: flex;
	flex-direction: column;
	gap: 10px;
}

.raid-coach-item {
	line-height: 1.6;
}

.raid-coach-priority {
	color: #fda4af;
}

.raid-coach-success {
	color: #86efac;
}

.raid-coach-warning {
	color: #fde68a;
}

.raid-coach-focus {
	color: #7dd3fc;
}

/* =========================
   Footer
========================= */

body {
	display: flex;
	flex-direction: column;
}

.container {
	flex: 1;
}

.site-footer {
	width: 100%;

	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;

	margin-top: 40px;
	padding-top: 22px;
	padding-bottom: 10px;

	border-top: 1px solid rgba(255, 255, 255, 0.06);

	color: var(--muted);

	font-size: 14px;
}

.footer-left {
	opacity: 0.85;
}

.footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.footer-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;

	padding: 10px 14px;

	border-radius: 12px;

	text-decoration: none;

	font-weight: 700;

	transition:
		transform 0.12s ease,
		border-color 0.12s ease,
		background 0.12s ease,
		color 0.12s ease;

	border: 1px solid var(--border);

	background: rgba(255, 255, 255, 0.02);

	color: var(--text);
}

.footer-link:hover {
	transform: translateY(-2px);
}

.footer-link.discord:hover {
	border-color: #5865F2;
	background: rgba(88, 101, 242, 0.12);
	color: #c7d2fe;
}

.footer-link.github:hover {
	border-color: #ffffff33;
	background: rgba(255, 255, 255, 0.08);
	color: white;
}

.footer-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: 18px;
	height: 18px;

	overflow: hidden;
}

.footer-icon svg {
	width: 18px;
	height: 18px;

	min-width: 18px;
	min-height: 18px;

	display: block;
	flex-shrink: 0;
}

@media (max-width: 900px) {
	.site-footer {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-links {
		width: 100%;
		flex-direction: column;
	}

	.footer-link {
		width: 100%;
		justify-content: center;
	}
}

/* =========================
   Offline Banner
========================= */

.offline-banner {
	background:
		linear-gradient(
			180deg,
			rgba(251, 113, 133, 0.14),
			rgba(127, 29, 29, 0.12)
		);

	border: 1px solid rgba(251, 113, 133, 0.35);

	border-radius: 16px;

	padding: 20px;

	margin-bottom: 20px;

	box-shadow:
		0 10px 30px rgba(0, 0, 0, 0.25);
}

.offline-title {
	color: #fda4af;

	font-size: 22px;
	font-weight: 800;

	margin-bottom: 8px;
}

.offline-message {
	color: #fecdd3;

	line-height: 1.6;

	font-size: 15px;
}

/* =========================
   User Authentication
   ========================= */
.auth-container {
	display: flex;
	align-items: center;
	gap: 16px;
}

.login-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: rgba(56, 189, 248, 0.08);
	border: 1px solid rgba(56, 189, 248, 0.25);
	color: var(--blue);
	padding: 10px 18px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: all 0.2s ease;
}

.login-button:hover {
	background: var(--blue);
	color: #0f1218;
	border-color: var(--blue);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.user-profile-widget {
	display: flex;
	align-items: center;
	gap: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border);
	padding: 8px 14px 8px 16px;
	border-radius: 14px;
	backdrop-filter: blur(8px);
}

.user-avatar {
	width: 32px;
	height: 32px;
	background: var(--blue);
	color: #0f1218;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 14px;
	text-transform: uppercase;
}

.user-meta {
	display: flex;
	flex-direction: column;
}

.user-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
}

.user-tier {
	font-size: 10px;
	font-weight: 800;
	color: var(--yellow);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 1px;
}

.user-tier.free {
	color: var(--muted);
}

.logout-button {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 700;
	transition: all 0.15s ease;
}

.logout-button:hover {
	border-color: var(--red);
	color: var(--red);
	background: rgba(251, 113, 133, 0.05);
	transform: none;
}

.settings-button {
	background: transparent;
	border: 1px solid var(--border);
	color: var(--muted);
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 700;
	transition: all 0.15s ease;
	cursor: pointer;
}

.settings-button:hover {
	border-color: var(--blue);
	color: var(--blue);
	background: rgba(56, 189, 248, 0.05);
	transform: none;
}

.discord-post-btn {
	background: #5865F2;
	color: white !important;
}

.discord-post-btn:hover {
	background: #4752C4 !important;
}

.status-msg-success {
	color: var(--green);
}

.status-msg-error {
	color: var(--red);
}

.header-right-col {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
}

/* ==========================================================================
   Guild Dashboard & Reports Grid
   ========================================================================== */
.guild-tabs {
	display: flex;
	gap: 12px;
	margin-top: 18px;
	margin-bottom: 8px;
	flex-wrap: wrap;
	border-bottom: 1px solid var(--border);
	padding-bottom: 14px;
}

.guild-tab-button {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--border);
	color: var(--muted);
	padding: 10px 18px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	gap: 8px;
}

.guild-tab-button:hover {
	background: rgba(255, 255, 255, 0.05);
	color: var(--text);
	transform: translateY(-1px);
}

/* Alliance Faction Tab Styles (Faction ID 1) */
.guild-tab-button.alliance.active {
	background: rgba(0, 120, 255, 0.08);
	border-color: #0078ff;
	color: #0078ff;
	box-shadow: 0 0 16px rgba(0, 120, 255, 0.15);
}

/* Horde Faction Tab Styles (Faction ID 2) */
.guild-tab-button.horde.active {
	background: rgba(255, 56, 56, 0.08);
	border-color: #ff3838;
	color: #ff3838;
	box-shadow: 0 0 16px rgba(255, 56, 56, 0.15);
}

.guild-reports-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 18px;
	margin-top: 20px;
}

.guild-report-card {
	background: var(--panel-2);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	backdrop-filter: blur(8px);
	position: relative;
	overflow: hidden;
}

.guild-report-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.15);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.guild-report-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--blue), var(--green));
	opacity: 0;
	transition: opacity 0.25s ease;
}

.guild-report-card:hover::before {
	opacity: 1;
}

.guild-report-info {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.guild-report-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--text);
	line-height: 1.4;
	margin: 0;
}

.guild-report-meta {
	font-size: 13px;
	color: var(--muted);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.guild-report-time, .guild-report-owner {
	display: flex;
	align-items: center;
	gap: 6px;
}

.guild-report-owner span {
	font-weight: 600;
	color: var(--text);
}

.guild-analyze-btn {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 10px 16px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.guild-report-card:hover .guild-analyze-btn {
	background: linear-gradient(135deg, var(--blue), var(--green));
	color: #0f1218;
	border-color: transparent;
	box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.guild-analyze-btn:hover {
	transform: scale(1.02);
}

/* Skeleton Loading Styles */
.guild-skeleton-card {
	background: rgba(255, 255, 255, 0.01);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 20px;
	height: 180px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.guild-skeleton-line {
	background: linear-gradient(90deg, #161b26 25%, #232a3b 50%, #161b26 75%);
	background-size: 200% 100%;
	animation: skeletonShimmer 1.5s infinite;
	border-radius: 4px;
}

.guild-skeleton-title {
	height: 20px;
	width: 80%;
}

.guild-skeleton-meta1 {
	height: 14px;
	width: 50%;
	margin-top: 8px;
}

.guild-skeleton-meta2 {
	height: 14px;
	width: 60%;
	margin-top: 4px;
}

.guild-skeleton-button {
	height: 38px;
	width: 100%;
	border-radius: 12px;
}

@keyframes skeletonShimmer {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.no-guilds-msg, .no-reports-msg {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px;
	color: var(--muted);
	font-size: 15px;
	background: rgba(255, 255, 255, 0.01);
	border: 1px dashed var(--border);
	border-radius: 16px;
}

/* ==========================================================================
   Player Coach Cards & Drawer
   ========================================================================== */
.player-name-btn {
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	font-size: inherit;
	font-weight: 700;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-style: dotted;
	transition: all 0.2s ease;
	display: inline-block;
}

.player-name-btn:hover {
	transform: scale(1.05);
	text-shadow: 0 0 8px currentColor;
}

.coach-drawer {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	display: flex;
	justify-content: flex-end;
	transition: visibility 0.3s ease;
}

.coach-drawer-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(8, 10, 16, 0.6);
	backdrop-filter: blur(12px);
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.coach-drawer.active .coach-drawer-overlay {
	opacity: 1;
}

.coach-drawer-content {
	position: relative;
	width: 100%;
	max-width: 460px;
	height: 100%;
	background: #0f1218;
	border-left: 1px solid var(--border);
	box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1001;
	overflow: hidden;
}

.coach-drawer.active .coach-drawer-content {
	transform: translateX(0);
}

.coach-drawer-header {
	padding: 24px;
	border-bottom: 1px solid var(--border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(255, 255, 255, 0.01);
}

.coach-player-name {
	font-size: 26px;
	font-weight: 800;
	margin: 0;
	line-height: 1.2;
}

.coach-player-sub {
	font-size: 13px;
	color: var(--muted);
	font-weight: 600;
	margin-top: 4px;
}

.close-drawer-btn {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--border);
	color: var(--text);
	width: 38px;
	height: 38px;
	border-radius: 12px;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.close-drawer-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--red);
	color: var(--red);
	transform: rotate(90deg);
}

.coach-drawer-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* Grade Card Circle */
.coach-grade-card {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
	border: 1px solid var(--border);
	border-radius: 20px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 20px;
	backdrop-filter: blur(8px);
}

.coach-grade-circle {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	font-size: 32px;
	position: relative;
	flex-shrink: 0;
	background: #080c10; /* Solid inner black */
	border: 3px solid var(--blue); /* Same theme blue outline */
	box-shadow: 0 0 16px rgba(56, 189, 248, 0.15); /* Theme blue glow */
	z-index: 1;
}

.coach-grade-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.coach-grade-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--text);
}

.coach-grade-desc {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.4;
}

.coach-section {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.coach-section h3 {
	font-size: 15px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
	margin: 0;
	border-bottom: 1px solid var(--border);
	padding-bottom: 8px;
}

/* Action Items styling */
.coach-action-items-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.coach-action-item {
	background: rgba(255, 255, 255, 0.01);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 16px;
	display: flex;
	gap: 14px;
	align-items: flex-start;
	transition: all 0.2s ease;
}

.coach-action-item:hover {
	background: rgba(255, 255, 255, 0.02);
	border-color: rgba(255, 255, 255, 0.1);
}

.coach-action-icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	flex-shrink: 0;
}

.coach-action-item.critical .coach-action-icon {
	background: rgba(251, 113, 133, 0.1);
	color: var(--red);
}
.coach-action-item.critical {
	border-left: 3px solid var(--red);
}

.coach-action-item.major .coach-action-icon {
	background: rgba(253, 230, 138, 0.1);
	color: var(--yellow);
}
.coach-action-item.major {
	border-left: 3px solid var(--yellow);
}

.coach-action-item.warning .coach-action-icon {
	background: rgba(56, 189, 248, 0.1);
	color: var(--blue);
}
.coach-action-item.warning {
	border-left: 3px solid var(--blue);
}

.coach-action-item.success .coach-action-icon {
	background: rgba(134, 239, 172, 0.1);
	color: var(--green);
}
.coach-action-item.success {
	border-left: 3px solid var(--green);
}

.coach-action-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.coach-action-label {
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.coach-action-item.critical .coach-action-label { color: var(--red); }
.coach-action-item.major .coach-action-label { color: var(--yellow); }
.coach-action-item.warning .coach-action-label { color: var(--blue); }
.coach-action-item.success .coach-action-label { color: var(--green); }

.coach-action-msg {
	font-size: 14px;
	line-height: 1.5;
	color: var(--text);
}

/* Progression Card styling */
.coach-progression-card {
	background: rgba(255, 255, 255, 0.01);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.coach-progression-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.coach-progression-label {
	font-size: 13px;
	color: var(--muted);
	font-weight: 600;
}

.coach-progression-value {
	font-size: 15px;
	font-weight: 800;
	color: var(--text);
}

.coach-progression-progress-bar {
	width: 100%;
	height: 10px;
	background: #080c10;
	border: 1px solid var(--border);
	border-radius: 999px;
	overflow: hidden;
	position: relative;
}

.coach-progression-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--blue), var(--green));
	border-radius: 999px;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.coach-progression-milestone {
	font-size: 13px;
	line-height: 1.6;
	color: var(--muted);
	border-top: 1px solid rgba(255, 255, 255, 0.04);
	padding-top: 12px;
	margin: 0;
}

.coach-progression-milestone strong {
	color: var(--text);
}

/* Perfect play shield */
.coach-perfect-play {
	text-align: center;
	padding: 30px;
	background: rgba(134, 239, 172, 0.02);
	border: 1px dashed rgba(134, 239, 172, 0.2);
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.coach-perfect-icon {
	width: 48px;
	height: 48px;
	background: rgba(134, 239, 172, 0.1);
	color: var(--green);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	box-shadow: 0 0 16px rgba(134, 239, 172, 0.15);
}

.coach-perfect-title {
	font-size: 16px;
	font-weight: 800;
	color: var(--green);
}

.coach-perfect-desc {
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
	margin: 0;
}

/* =========================
   Interactive Charts
   ========================= */
.chart-container {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--shadow);
	backdrop-filter: blur(8px);
	position: relative;
	overflow: hidden;
}

.chart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.chart-title {
	font-size: 15px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text);
	margin: 0;
}

.chart-subtitle {
	font-size: 12px;
	color: var(--muted);
	margin-top: 4px;
}

.chart-svg-wrapper {
	width: 100%;
	height: 280px;
	position: relative;
}

.chart-svg {
	width: 100%;
	height: 100%;
	overflow: visible;
}

/* SVG Line & Axis styles */
.chart-axis-line {
	stroke: var(--border);
	stroke-width: 1.5px;
}

.chart-grid-line {
	stroke: rgba(255, 255, 255, 0.03);
	stroke-dasharray: 4 4;
	stroke-width: 1px;
}

.chart-threshold-line {
	stroke-dasharray: 6 4;
	stroke-width: 1.5px;
	transition: opacity 0.2s ease;
}

.chart-threshold-line:hover {
	stroke-width: 2.5px;
}

.chart-axis-text {
	fill: var(--muted);
	font-size: 11px;
	font-weight: 600;
	font-family: inherit;
}

.chart-bar-hover-rect {
	fill: transparent;
	cursor: pointer;
}

.chart-bar {
	transition: fill-opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: bottom;
	cursor: pointer;
}

.chart-bar:hover {
	fill-opacity: 1 !important;
	transform: scaleY(1.02);
}

.chart-node {
	transition: fill-opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), r 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
}

.chart-node:hover {
	fill-opacity: 1 !important;
	r: 9px !important;
}

/* Quadrant line and labels */
.chart-quadrant-divider {
	stroke: rgba(255, 255, 255, 0.06);
	stroke-width: 1.5px;
	stroke-dasharray: 2 2;
}

.chart-quadrant-label {
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	pointer-events: none;
	user-select: none;
}

.quadrant-tl { fill: rgba(74, 222, 128, 0.4); } /* Elite Execution (Green) */
.quadrant-tr { fill: rgba(250, 204, 黄, 0.4); } /* Glass Cannons (Yellow) - Wait, we will use plain color name yellow */
.quadrant-tr { fill: rgba(250, 204, 21, 0.4); }
.quadrant-bl { fill: rgba(156, 163, 175, 0.4); } /* Passive Survival (Gray) */
.quadrant-br { fill: rgba(251, 113, 133, 0.4); } /* High Risk (Red) */

/* Global Premium Glass Tooltip */
.chart-tooltip {
	position: absolute;
	z-index: 2000;
	pointer-events: none;
	background: rgba(10, 15, 30, 0.95);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 14px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(12px);
	font-size: 12px;
	line-height: 1.5;
	color: var(--text);
	transition: opacity 0.15s ease, transform 0.15s ease;
	opacity: 0;
	transform: translate(-50%, -100%) scale(0.95);
	margin-top: -12px;
}

.chart-tooltip.active {
	opacity: 1;
	transform: translate(-50%, -100%) scale(1);
}

.tooltip-title {
	font-weight: 800;
	margin-bottom: 4px;
	font-size: 13px;
}

.tooltip-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-size: 11px;
}

.tooltip-label {
	color: var(--muted);
	font-weight: 600;
}

.tooltip-value {
	font-weight: 700;
	color: var(--text);
}


/* =========================
   Progression Tracker
   ========================= */
.progression-summary-desc {
	margin-top: 4px;
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
}

.progression-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.progression-table th {
	background: #111722;
}

.pull-row.kill {
	border-left: 3px solid var(--green);
}

.pull-row.wipe {
	border-left: 3px solid var(--red);
}

.chart-area-hp {
	fill: url(#hpGrad);
	fill-opacity: 0.12;
}

.chart-line-hp {
	stroke: var(--green);
	stroke-width: 3px;
	fill: none;
}

.chart-line-duration {
	stroke: #fb7185;
	stroke-width: 2.5px;
	stroke-dasharray: 4 4;
	fill: none;
}

.chart-node-kill {
	fill: #ffd700;
	stroke: #ffffff;
	stroke-width: 2px;
	cursor: pointer;
	transition: r 0.2s ease;
}

.chart-node-kill:hover {
	r: 9px !important;
}

.chart-node-wipe {
	fill: #fb7185;
	stroke: #ffffff;
	stroke-width: 1.5px;
	cursor: pointer;
	transition: r 0.2s ease;
}

.chart-node-wipe:hover {
	r: 8px !important;
}

.chart-axis-label {
	fill: var(--muted);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* ==========================================================================
   Wide-Screen Ultrawide & Desktop Productivity Layouts
   ========================================================================== */
.report-dashboard-layout {
	display: block;
}

.report-left-col {
	display: block;
}

.report-right-col {
	display: block;
}

@media (min-width: 1200px) {
	/* Increase max-width to fully leverage wide viewports */
	.container {
		max-width: 1800px !important;
	}

	body {
		padding: 24px 32px !important;
	}

	/* Two-column dashboard structure: encounters & overview on the left, active tab content on the right */
	.report-dashboard-layout {
		display: grid;
		grid-template-columns: 370px 1fr;
		gap: 20px;
		align-items: start;
		margin-top: 16px;
	}

	.report-left-col {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.report-right-col {
		min-width: 0; /* Prevents overflow inside flex/grid items */
	}

	/* Spacing compaction for desktop cards */
	.card {
		padding: 20px !important;
		margin-bottom: 16px !important;
	}

	/* Adjust encounters scroll bar layout inside sidebar */
	.encounter-nav-wrapper {
		gap: 8px !important;
	}

	.encounter-nav-button {
		padding: 8px 10px !important;
		min-width: 100px !important;
	}

	/* High-density 2-column stacked layout for summary stats inside the left sidebar */
	.report-left-col .stat-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 8px !important;
	}

	.report-left-col .stat {
		padding: 8px 10px !important;
		min-height: 48px !important;
	}

	.report-left-col .stat-label {
		font-size: 10px !important;
		margin-bottom: 2px !important;
	}

	.report-left-col .stat-value {
		font-size: 13px !important;
	}

	/* Reduce general gaps in active tabs */
	.progression-grid {
		gap: 10px !important;
		margin-bottom: 16px !important;
	}
}

/* ==========================================================================
   Visual Death Recap Timeline
   ========================================================================== */
.death-timeline-wrapper {
	position: relative;
	padding-left: 28px;
	margin-top: 10px;
}

.death-timeline-rail {
	position: absolute;
	left: 8px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: rgba(255, 255, 255, 0.08);
}

.death-timeline-events {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.death-event-card {
	position: relative;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.04);
	border-radius: 10px;
	padding: 10px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	transition: background 0.2s ease;
}

.death-event-card:hover {
	background: rgba(255, 255, 255, 0.04);
}

.death-event-node {
	position: absolute;
	left: -27px;
	top: 14px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--muted);
	border: 2px solid var(--bg);
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
	z-index: 2;
}

.death-event-card.damage {
	border-left: 3px solid var(--red);
}

.death-event-card.damage .death-event-node {
	background: var(--red);
	box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.death-event-card.heal {
	border-left: 3px solid var(--green);
}

.death-event-card.heal .death-event-node {
	background: var(--green);
	box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.death-event-card.defensive-apply {
	border-left: 3px solid var(--blue);
}

.death-event-card.defensive-apply .death-event-node {
	background: var(--blue);
	box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.death-event-card.defensive-remove {
	border-left: 3px solid #a855f7;
	opacity: 0.8;
}

.death-event-card.defensive-remove .death-event-node {
	background: #a855f7;
	box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.death-event-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.death-event-time {
	font-family: monospace;
	font-size: 11px;
	color: var(--muted);
	font-weight: 700;
}

.death-event-spell {
	font-size: 13px;
	font-weight: 700;
	color: var(--text);
}

.death-event-amount {
	font-size: 13px;
	font-weight: 800;
	font-family: monospace;
}

.death-event-amount.damage-text {
	color: #f87171;
}

.death-event-amount.heal-text {
	color: #4ade80;
}

.death-event-amount.overkill-text {
	font-size: 10px;
	color: var(--red);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 800;
	margin-left: 6px;
}

.death-event-source {
	font-size: 11px;
	color: var(--muted);
}

/* Timeline specific clickable styles */
.death-trigger-btn {
	background: rgba(239, 68, 68, 0.1) !important;
	border: 1px solid rgba(239, 68, 68, 0.3) !important;
	color: #f87171 !important;
	padding: 4px 8px !important;
	font-size: 11px !important;
	border-radius: 6px !important;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

.death-trigger-btn:hover {
	background: rgba(239, 68, 68, 0.2) !important;
	transform: translateY(-1px);
}

/* Death Recap Plain English Summary Card */
.death-recap-summary-card {
	background: rgba(244, 63, 94, 0.08);
	border: 1px solid rgba(244, 63, 94, 0.25);
	border-radius: 8px;
	padding: 12px 14px;
	margin-top: 12px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	line-height: 1.5;
}

.death-recap-summary-card .warning-icon {
	font-size: 16px;
	flex-shrink: 0;
	margin-top: 1px;
}

.death-recap-summary-card .summary-text {
	font-size: 12.5px;
	color: #fda4af;
	font-weight: 500;
}

/* Scorecard Deaths Column Trigger Cell */
.death-recap-trigger-cell {
	background: rgba(244, 63, 94, 0.1) !important;
	border: 1px solid rgba(244, 63, 94, 0.22) !important;
	color: #fda4af !important;
	padding: 3px 8px !important;
	font-size: 11.5px !important;
	font-weight: 800 !important;
	border-radius: 6px !important;
	cursor: pointer;
	transition: background 0.15s, transform 0.1s, border-color 0.15s;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.death-recap-trigger-cell:hover {
	background: rgba(244, 63, 94, 0.18) !important;
	border-color: rgba(244, 63, 94, 0.4) !important;
	transform: translateY(-1px);
}

/* Player Coach Inactivity ABC styles */
.coach-inactivity-wrapper {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 20px;
}

.coach-inactivity-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}

.coach-inactivity-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
}

.coach-inactivity-bar-container {
	height: 8px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 14px;
}

.coach-inactivity-bar {
	height: 100%;
	border-radius: 999px;
	transition: width 0.3s ease;
}

.coach-inactivity-bar.uptime-high {
	background: var(--green);
}

.coach-inactivity-bar.uptime-medium {
	background: var(--yellow);
}

.coach-inactivity-bar.uptime-low {
	background: var(--red);
}

.inactivity-gap-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.inactivity-gap-item {
	font-size: 13px;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 6px;
}

.inactivity-gap-dot {
	width: 6px;
	height: 6px;
	background: var(--orange);
	border-radius: 999px;
}

/* SVG Timeline Visualizer styles */
.timeline-visual-ruler-card {
	background: var(--panel-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 24px;
	box-shadow: var(--shadow);
}

.timeline-visual-ruler-title {
	font-size: 15px;
	font-weight: 800;
	color: var(--blue);
	margin-bottom: 6px;
}

.timeline-visual-ruler-subtitle {
	font-size: 12.5px;
	color: var(--muted);
	margin-bottom: 18px;
}

.timeline-svg-container {
	position: relative;
	width: 100%;
	height: 80px;
}

.timeline-svg {
	width: 100%;
	height: 100%;
	display: block;
}

.timeline-svg-line {
	stroke: var(--border);
	stroke-width: 3;
	stroke-linecap: round;
}

.timeline-svg-tick {
	stroke: rgba(255, 255, 255, 0.15);
	stroke-width: 1.5;
}

.timeline-svg-tick-text {
	fill: var(--muted);
	font-size: 10px;
	font-family: monospace;
	text-anchor: middle;
}

.timeline-svg-node {
	cursor: pointer;
	transition: r 0.15s ease, fill-opacity 0.15s ease, stroke-width 0.15s ease;
}

.timeline-svg-node:hover {
	r: 8 !important;
	stroke-width: 2.5;
}

.timeline-svg-node.node-death {
	fill: var(--red);
	stroke: #ffffff;
	stroke-width: 1.5;
}

.timeline-svg-node.node-cooldown {
	fill: var(--blue);
	stroke: #ffffff;
	stroke-width: 1.5;
}

.timeline-svg-node.node-mechanic {
	fill: var(--yellow);
	stroke: #ffffff;
	stroke-width: 1.5;
}

/* Cooldowns Dashboard Premium Styles */
.cooldown-filters-container {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
	background: var(--panel-2);
	border: 1px solid var(--border);
	padding: 16px;
	border-radius: 12px;
}

.cooldown-filter-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.filter-group-label {
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted);
	letter-spacing: 0.5px;
}

.filter-pills {
	display: flex;
	gap: 6px;
	background: rgba(0, 0, 0, 0.2);
	padding: 4px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.cooldown-filter-pill {
	background: none;
	border: none;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.cooldown-filter-pill:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.05);
}

.cooldown-filter-pill.active {
	color: #ffffff;
	background: var(--blue);
	box-shadow: 0 2px 8px rgba(0, 122, 255, 0.4);
}

.cooldowns-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 20px;
	margin-top: 16px;
}

.cooldown-player-card {
	background: var(--panel-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 18px;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.cooldown-player-card:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.15);
}

.cooldown-player-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	padding-bottom: 10px;
	margin-bottom: 14px;
}

.cooldown-player-name {
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	transition: text-decoration 0.2s ease;
}

.cooldown-player-name:hover {
	text-decoration: underline;
}

.cooldown-player-badge {
	font-size: 11px;
	background: rgba(255, 255, 255, 0.06);
	color: var(--muted);
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
	font-weight: 500;
}

.cooldown-player-role-tag {
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	background: rgba(0, 0, 0, 0.15);
	padding: 2px 8px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.04);
}

.cooldown-spell-card {
	background: rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.03);
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 10px;
}

.cooldown-spell-card:last-child {
	margin-bottom: 0;
}

.cooldown-spell-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.cooldown-spell-left {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cooldown-spell-icon {
	font-size: 13px;
}

.cooldown-spell-name {
	font-size: 12px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
}

.cooldown-spell-badge {
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 1px 4px;
	border-radius: 4px;
	letter-spacing: 0.3px;
}

.badge-raid { background: rgba(255, 179, 0, 0.15); color: #ffb300; }
.badge-personal { background: rgba(0, 122, 255, 0.15); color: #007aff; }
.badge-external { background: rgba(255, 45, 85, 0.15); color: #ff2d55; }
.badge-movement { background: rgba(52, 199, 89, 0.15); color: #34c759; }
.badge-utility { background: rgba(175, 82, 222, 0.15); color: #af52de; }
.badge-immune { background: rgba(90, 200, 250, 0.15); color: #5ac8fa; }
.badge-tank { background: rgba(255, 149, 0, 0.15); color: #ff9500; }

.cooldown-spell-casts {
	font-size: 11px;
	font-weight: 800;
	font-family: monospace;
	padding: 2px 6px;
	border-radius: 4px;
}

.cooldown-spell-casts.success { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.cooldown-spell-casts.partial { background: rgba(241, 196, 15, 0.15); color: #f1c40f; }
.cooldown-spell-casts.fail { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.cooldown-spell-casts.neutral { background: rgba(255, 255, 255, 0.05); color: var(--muted); }

.cooldown-spell-timeline {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 8px 0 6px 0;
}

.cooldown-spell-time-badge {
	font-size: 9.5px;
	font-family: monospace;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.05);
	color: rgba(255, 255, 255, 0.7);
	padding: 1px 4px;
	border-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.02);
}

.cooldown-spell-time-badge.none {
	background: none;
	border: none;
	color: var(--muted);
	font-style: italic;
	font-family: inherit;
	font-size: 10px;
}

.cooldown-efficiency-bar-container {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.cooldown-efficiency-bar {
	flex: 1;
	height: 4px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 2px;
	overflow: hidden;
}

.cooldown-efficiency-progress {
	height: 100%;
	border-radius: 2px;
}

.cooldown-efficiency-text {
	font-size: 10.5px;
	font-weight: 600;
	color: var(--muted);
	white-space: nowrap;
}

.cooldown-empty-state {
	text-align: center;
	padding: 40px;
	background: var(--panel-2);
	border: 1px dashed var(--border);
	border-radius: 12px;
	color: var(--muted);
	font-size: 13.5px;
}

/* ==========================================================================
   Premium Cooldowns Dashboard Styles
   ========================================================================== */

.cooldown-dashboard-header {
	display: flex;
	gap: 20px;
	margin-bottom: 24px;
}

@media (max-width: 1024px) {
	.cooldown-dashboard-header {
		flex-direction: column;
	}
}

/* Scorecard */
.cooldown-scorecard {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	flex: 3;
}

.scorecard-stat {
	background: rgba(24, 28, 37, 0.7);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-shadow: var(--shadow);
	backdrop-filter: blur(8px);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.scorecard-stat:hover {
	border-color: rgba(56, 189, 248, 0.25);
	transform: translateY(-1px);
}

.stat-label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted);
	letter-spacing: 0.8px;
	margin-bottom: 8px;
}

.stat-value {
	font-size: 20px;
	font-weight: 850;
	color: #ffffff;
	font-family: Inter, system-ui, sans-serif;
}

.stat-value.success-state {
	color: var(--green);
	text-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
}

.stat-value.fail-state {
	color: var(--red);
	text-shadow: 0 0 10px rgba(251, 113, 133, 0.2);
}

/* Alerts Panel */
.cooldown-alerts-panel {
	flex: 2;
	background: rgba(251, 146, 60, 0.04);
	border: 1px solid rgba(251, 146, 6 orange/rgba(251, 146, 60, 0.25);
	border-color: rgba(251, 146, 60, 0.2);
	border-radius: 12px;
	padding: 16px;
	box-shadow: var(--shadow);
	backdrop-filter: blur(8px);
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	max-height: 160px;
}

.cooldown-alerts-panel.success {
	background: rgba(74, 222, 128, 0.03);
	border-color: rgba(74, 222, 128, 0.2);
}

.alerts-panel-title {
	font-size: 13.5px;
	font-weight: 800;
	color: var(--orange);
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	border-bottom: 1px solid rgba(251, 146, 60, 0.1);
	padding-bottom: 6px;
}

.cooldown-alerts-panel.success .alerts-panel-title {
	color: var(--green);
	border-bottom-color: rgba(74, 222, 128, 0.1);
}

.alerts-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	overflow-y: auto;
	padding-right: 4px;
	flex: 1;
}

.alerts-list::-webkit-scrollbar {
	width: 4px;
}

.alerts-list::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 2px;
}

.cooldown-alert-item {
	font-size: 11.5px;
	display: flex;
	align-items: center;
	gap: 4px;
	color: rgba(255, 255, 255, 0.85);
}

.alert-player {
	font-weight: 700;
}

.alert-action {
	color: var(--muted);
}

.alert-spell {
	color: #ffffff;
	font-weight: 750;
}

.alert-meta {
	font-size: 10px;
	color: var(--muted);
	margin-left: 2px;
}

.alerts-panel-body {
	font-size: 12px;
	color: var(--muted);
	line-height: 1.5;
}

/* Controls and Filters Bar */
.cooldown-controls-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	background: var(--panel-2);
	border: 1px solid var(--border);
	padding: 12px 16px;
	border-radius: 12px;
	box-shadow: var(--shadow);
}

@media (max-width: 768px) {
	.cooldown-controls-bar {
		flex-direction: column;
		align-items: stretch;
	}
}

.cooldown-search-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0 12px;
	flex: 1;
	max-width: 420px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cooldown-search-wrapper:focus-within {
	border-color: var(--blue);
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.cooldown-search-wrapper .search-icon {
	color: var(--muted);
	font-size: 13px;
	margin-right: 8px;
}

#cooldownSearchInput {
	width: 100%;
	background: none;
	border: none;
	outline: none;
	color: #ffffff;
	padding: 8px 0;
	font-size: 13px;
	font-family: inherit;
}

#cooldownSearchInput::placeholder {
	color: var(--muted);
	opacity: 0.8;
}

.cooldown-view-toggle {
	display: flex;
	background: rgba(0, 0, 0, 0.25);
	padding: 4px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.05);
	gap: 4px;
}

.cooldown-toggle-btn {
	background: none;
	border: none;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 4px;
}

.cooldown-toggle-btn:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.04);
}

.cooldown-toggle-btn.active {
	color: #081018;
	background: var(--blue);
	box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
	font-weight: 700;
}

/* Weight/Importance Badges */
.cooldown-weight-badge {
	font-size: 8px;
	font-weight: 800;
	text-transform: uppercase;
	padding: 1px 4px;
	border-radius: 4px;
	letter-spacing: 0.5px;
	margin-left: 4px;
	display: inline-flex;
	align-items: center;
}

.badge-weight-high {
	background: rgba(251, 113, 133, 0.15);
	color: var(--red);
	border: 1px solid rgba(251, 113, 133, 0.1);
}

.badge-weight-med {
	background: rgba(250, 204, 21, 0.15);
	color: var(--yellow);
	border: 1px solid rgba(250, 204, 21, 0.1);
}

.badge-weight-low {
	background: rgba(156, 163, 175, 0.12);
	color: var(--muted);
}

/* Missed CD Highlights */
.cooldown-spell-card.missed-spell-card {
	background: rgba(251, 113, 133, 0.03);
	border-color: rgba(251, 113, 133, 0.15);
}

.cooldown-spell-time-badge.red-alert {
	background: rgba(251, 113, 133, 0.08);
	border-color: rgba(251, 113, 133, 0.15);
	color: var(--red);
	font-weight: 700;
}

/* Group by Spell Grid & Cards */
.cooldowns-spell-view-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 20px;
	margin-top: 16px;
}

.cooldown-spell-group-card {
	background: var(--panel-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 18px;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, border-color 0.2s ease;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cooldown-spell-group-card:hover {
	transform: translateY(-2px);
	border-color: rgba(255, 255, 255, 0.15);
}

.spell-group-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	padding-bottom: 10px;
}

.spell-group-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.spell-group-icon {
	font-size: 15px;
}

.spell-group-name {
	font-size: 14px;
	font-weight: 800;
	color: var(--blue);
}

.spell-group-badges {
	display: flex;
	gap: 4px;
	align-items: center;
}

.spell-group-players-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spell-player-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.15);
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.02);
	gap: 12px;
}

.spell-player-row.player-missed-cd {
	background: rgba(251, 113, 133, 0.04);
	border-color: rgba(251, 113, 133, 0.12);
}

.spell-player-info {
	display: flex;
	flex-direction: column;
	min-width: 80px;
}

.spell-player-name {
	font-size: 12.5px;
	font-weight: 750;
	cursor: pointer;
	transition: text-decoration 0.2s ease;
}

.spell-player-name:hover {
	text-decoration: underline;
}

.spell-player-spec {
	font-size: 10px;
	color: var(--muted);
}

.spell-player-stats {
	display: flex;
	align-items: center;
	gap: 8px;
}

.spell-player-efficiency-mini {
	width: 32px;
	height: 3px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 2px;
	overflow: hidden;
}

.efficiency-mini-bar {
	height: 100%;
	border-radius: 2px;
}

.spell-player-timeline {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	justify-content: flex-end;
	flex: 1;
}

