/* ============================================
   ARC FALL - Dark Theme
   Modern OT Server Template
   ============================================ */

/* --- CSS Variables --- */
:root {
	--bg-primary: #0d1117;
	--bg-secondary: #161b22;
	--bg-tertiary: #1c2128;
	--bg-card: #161b22;
	--bg-input: #0d1117;
	--border-primary: #30363d;
	--border-secondary: #21262d;
	--text-primary: #e6edf3;
	--text-secondary: #8b949e;
	--text-muted: #6e7681;
	--accent: #ff4500;
	--accent-hover: #e8430a;
	--accent-gradient: linear-gradient(135deg, #ff4500, #e8430a);
	--accent-glow: rgba(255, 69, 0, 0.3);
	--accent-subtle: rgba(255, 69, 0, 0.1);
	--success: #3fb950;
	--danger: #f85149;
	--warning: #d29922;
	--info: #58a6ff;
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-xl: 24px;
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
	--shadow-glow: 0 0 20px var(--accent-glow);
	--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: "SF Mono", "Cascadia Code", Consolas, monospace;
	--navbar-height: 64px;
	--transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-family);
	font-size: 15px;
	line-height: 1.6;
	color: var(--text-primary);
	background-color: var(--bg-primary);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--accent);
	text-decoration: none;
	transition: color var(--transition);
}

a:hover {
	color: var(--accent-hover);
}

img {
	max-width: 100%;
	height: auto;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
	width: 8px;
}

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

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

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(13, 17, 23, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border-primary);
	height: var(--navbar-height);
}

.nav-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	height: 100%;
	gap: 8px;
}

.nav-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-right: 16px;
}

.nav-logo-img {
	height: 40px;
	width: auto;
	transition: opacity var(--transition);
}

.nav-logo:hover .nav-logo-img {
	opacity: 0.8;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 1;
}

.nav-dropdown {
	position: relative;
}

.nav-link {
	background: none;
	border: none;
	color: var(--text-secondary);
	font-family: var(--font-family);
	font-size: 14px;
	font-weight: 500;
	padding: 8px 14px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition);
	white-space: nowrap;
}

.nav-link:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

.nav-dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 6px;
	box-shadow: var(--shadow-lg);
	z-index: 1001;
}

.nav-dropdown.active .nav-dropdown-menu {
	display: block;
	animation: fadeSlideDown 0.15s ease;
}

.nav-dropdown-item {
	display: block;
	padding: 8px 12px;
	color: var(--text-secondary);
	font-size: 14px;
	border-radius: var(--radius-sm);
	transition: all var(--transition);
}

.nav-dropdown-item:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	margin-left: auto;
}

/* Hamburger */
.nav-hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	margin-left: auto;
}

.nav-hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--text-secondary);
	border-radius: 2px;
	transition: all 0.3s ease;
}

.nav-hamburger.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
	opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--font-family);
	font-weight: 600;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition);
	text-decoration: none;
	white-space: nowrap;
	line-height: 1;
}

.btn-sm {
	font-size: 13px;
	padding: 6px 14px;
	height: 32px;
}

.btn-md {
	font-size: 14px;
	padding: 8px 20px;
	height: 38px;
}

.btn-lg {
	font-size: 16px;
	padding: 12px 28px;
	height: 46px;
}

.btn-primary {
	background: var(--accent-gradient);
	color: #fff;
	box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
	color: var(--text-primary);
	background: var(--border-primary);
}

.btn-ghost {
	background: transparent;
	color: var(--text-secondary);
}

.btn-ghost:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
	position: relative;
	padding: 80px 24px 40px;
	overflow: hidden;
	background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
	border-bottom: 1px solid var(--border-primary);
}

.hero-bg-effects {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.hero-glow {
	position: absolute;
	top: -40%;
	left: 50%;
	transform: translateX(-50%);
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
	opacity: 0.4;
	animation: pulse 4s ease-in-out infinite;
}

.hero-content {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 60px;
}

.hero-text {
	flex: 1;
}

.hero-title {
	font-size: 48px;
	font-weight: 800;
	line-height: 1.1;
	margin-bottom: 16px;
	letter-spacing: -0.02em;
}

.text-accent {
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero-subtitle {
	font-size: 18px;
	color: var(--text-secondary);
	line-height: 1.6;
	margin-bottom: 32px;
	max-width: 520px;
}

.hero-subtitle strong {
	color: var(--text-primary);
}

.hero-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.hero-outfit {
	flex-shrink: 0;
}

.outfit-showcase {
	position: relative;
	width: 180px;
	height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.outfit-glow {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
	animation: pulse 3s ease-in-out infinite;
}

.outfit-img {
	position: relative;
	z-index: 1;
	width: 128px;
	height: 128px;
	object-fit: contain;
	image-rendering: pixelated;
	filter: drop-shadow(0 0 12px var(--accent-glow));
}

.hero-stats {
	max-width: 1280px;
	margin: 40px auto 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.hero-stat {
	text-align: center;
	padding: 20px 16px;
	background: rgba(22, 27, 34, 0.6);
	backdrop-filter: blur(8px);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	transition: all var(--transition);
}

.hero-stat:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-glow);
	transform: translateY(-2px);
}

.hero-stat-value {
	display: block;
	font-size: 28px;
	font-weight: 800;
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero-stat-label {
	display: block;
	font-size: 13px;
	color: var(--text-secondary);
	margin-top: 4px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
	padding: 32px 24px;
	min-height: 60vh;
}

.content-container {
	max-width: 1280px;
	margin: 0 auto;
}

.content-grid {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 24px;
	align-items: start;
}

.page-header {
	margin-bottom: 20px;
}

.page-title {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.content-box {
	background: var(--bg-card);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 24px;
	animation: fadeIn 0.3s ease;
}

/* MyAAC content styling overrides */
.content-box table {
	width: 100%;
	border-collapse: collapse;
	margin: 8px 0;
}

.content-box table th,
.content-box table td {
	padding: 10px 12px;
	text-align: left;
	border-bottom: 1px solid var(--border-secondary);
	font-size: 14px;
}

.content-box table th {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.content-box table tr:hover td {
	background: rgba(48, 54, 61, 0.3);
}

.content-box table tr:last-child td {
	border-bottom: none;
}

/* News styling */
.content-box .newsHeadline,
.content-box .news-headline {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 4px;
	color: var(--text-primary);
}

.content-box .newsBody,
.content-box .news-body {
	color: var(--text-secondary);
	line-height: 1.7;
}

.content-box .newsAuthor,
.content-box .news-author {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 8px;
}

.content-box hr {
	border: none;
	border-top: 1px solid var(--border-secondary);
	margin: 20px 0;
}

/* ============================================
   FORMS
   ============================================ */
.content-box input[type="text"],
.content-box input[type="password"],
.content-box input[type="email"],
.content-box input[type="number"],
.content-box input[type="search"],
.content-box select,
.content-box textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
	background: var(--bg-input);
	border: 1px solid var(--border-primary);
	color: var(--text-primary);
	font-family: var(--font-family);
	font-size: 14px;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	transition: all var(--transition);
	width: auto;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-subtle);
}

input[type="submit"],
input[type="button"],
button[type="submit"] {
	background: var(--accent-gradient);
	color: #fff;
	border: none;
	font-family: var(--font-family);
	font-size: 14px;
	font-weight: 600;
	padding: 8px 20px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition);
}

input[type="submit"]:hover,
input[type="button"]:hover,
button[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px var(--accent-glow);
}

label {
	color: var(--text-secondary);
	font-size: 14px;
	font-weight: 500;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar-widget {
	background: var(--bg-card);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	overflow: hidden;
	margin-bottom: 16px;
	animation: fadeIn 0.3s ease;
}

.widget-header {
	padding: 14px 18px;
	border-bottom: 1px solid var(--border-secondary);
	background: var(--bg-tertiary);
}

.widget-title {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-primary);
}

.widget-body {
	padding: 16px 18px;
}

/* Server Status */
.server-status {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.status-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
}

.status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

.status-online .status-dot {
	background: var(--success);
	box-shadow: 0 0 8px rgba(63, 185, 80, 0.5);
	animation: pulse-dot 2s ease-in-out infinite;
}

.status-offline .status-dot {
	background: var(--danger);
	box-shadow: 0 0 8px rgba(248, 81, 73, 0.5);
}

.status-text {
	font-size: 14px;
	font-weight: 600;
}

.status-online .status-text {
	color: var(--success);
}

.status-offline .status-text {
	color: var(--danger);
}

.status-players {
	text-align: right;
}

.player-count {
	display: block;
	font-size: 22px;
	font-weight: 800;
	color: var(--text-primary);
}

.player-label {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
}

/* Rates Grid */
.rates-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.rate-item {
	text-align: center;
	padding: 12px 8px;
	background: var(--bg-primary);
	border: 1px solid var(--border-secondary);
	border-radius: var(--radius-sm);
	transition: all var(--transition);
}

.rate-item:hover {
	border-color: var(--accent);
}

.rate-value {
	display: block;
	font-size: 20px;
	font-weight: 800;
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.rate-label {
	display: block;
	font-size: 11px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 2px;
}

/* Top Players */
.top-players {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.top-player {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	transition: all var(--transition);
	color: var(--text-primary);
}

.top-player:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
}

.top-rank {
	font-size: 13px;
	font-weight: 700;
	color: var(--text-muted);
	min-width: 24px;
}

.top-player:nth-child(1) .top-rank {
	color: #ffd700;
}

.top-player:nth-child(2) .top-rank {
	color: #c0c0c0;
}

.top-player:nth-child(3) .top-rank {
	color: #cd7f32;
}

.top-player-outfit {
	width: 32px;
	height: 32px;
	object-fit: contain;
	image-rendering: pixelated;
}

.top-player-info {
	flex: 1;
	min-width: 0;
}

.top-player-name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.top-player-level {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
}

.top-player-status {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--border-primary);
	flex-shrink: 0;
}

.top-player-status.is-online {
	background: var(--success);
	box-shadow: 0 0 6px rgba(63, 185, 80, 0.4);
}

/* Quick Links */
.quick-links {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.quick-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	color: var(--text-secondary);
	font-size: 14px;
	border-radius: var(--radius-sm);
	transition: all var(--transition);
}

.quick-link:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

.quick-link svg {
	flex-shrink: 0;
	opacity: 0.6;
}

.quick-link:hover svg {
	opacity: 1;
	stroke: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
	margin-top: 40px;
	background: var(--bg-secondary);
	border-top: 1px solid var(--border-primary);
	padding: 48px 24px 24px;
}

.footer-container {
	max-width: 1280px;
	margin: 0 auto;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
}

.footer-logo {
	height: 36px;
	width: auto;
	margin-bottom: 12px;
	opacity: 0.8;
}

.footer-tagline {
	color: var(--text-muted);
	font-size: 14px;
}

.footer-links-col h4 {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-primary);
	margin-bottom: 12px;
}

.footer-links-col ul {
	list-style: none;
}

.footer-links-col li {
	margin-bottom: 6px;
}

.footer-links-col a {
	color: var(--text-muted);
	font-size: 14px;
	transition: color var(--transition);
}

.footer-links-col a:hover {
	color: var(--text-primary);
}

.footer-bottom {
	border-top: 1px solid var(--border-primary);
	padding-top: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: var(--text-muted);
}

.footer-bottom a {
	color: var(--text-secondary);
}

.footer-copy {
	color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
	0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
	50% { opacity: 0.6; transform: translateX(-50%) scale(1.05); }
}

@keyframes pulse-dot {
	0%, 100% { box-shadow: 0 0 8px rgba(63, 185, 80, 0.4); }
	50% { box-shadow: 0 0 16px rgba(63, 185, 80, 0.7); }
}

@keyframes glow {
	0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
	50% { box-shadow: 0 0 20px var(--accent-glow); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ============================================
   MYAAC SPECIFIC OVERRIDES
   ============================================ */

/* Message boxes */
.message, .success, .error, .warning, .note {
	padding: 14px 18px;
	border-radius: var(--radius-sm);
	margin: 12px 0;
	font-size: 14px;
	border: 1px solid;
}

.success {
	background: rgba(63, 185, 80, 0.1);
	border-color: rgba(63, 185, 80, 0.3);
	color: var(--success);
}

.error {
	background: rgba(248, 81, 73, 0.1);
	border-color: rgba(248, 81, 73, 0.3);
	color: var(--danger);
}

.warning {
	background: rgba(210, 153, 34, 0.1);
	border-color: rgba(210, 153, 34, 0.3);
	color: var(--warning);
}

.note {
	background: rgba(88, 166, 255, 0.1);
	border-color: rgba(88, 166, 255, 0.3);
	color: var(--info);
}

/* Pagination */
.pagination {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin: 20px 0;
	flex-wrap: wrap;
}

.pagination a, .pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 4px 10px;
	font-size: 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-primary);
	color: var(--text-secondary);
	transition: all var(--transition);
}

.pagination a:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-color: var(--border-primary);
}

.pagination .current, .pagination .active {
	background: var(--accent-gradient);
	color: #fff;
	border-color: var(--accent);
}

/* Tooltip and misc */
.tooltip {
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	color: var(--text-primary);
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	font-size: 13px;
}

/* Old tibia tables override */
.TableContainer, .InnerTableContainer {
	background: transparent !important;
}

.TableContent td, .TableContent th {
	padding: 8px 12px;
}

/* Background fix for old content */
td[style*="background"], div[style*="background"] {
	background-color: transparent !important;
	background-image: none !important;
}

/* Override MyAAC form tables */
.content-box table.Table1,
.content-box table.Table2,
.content-box table.Table3,
.content-box .TableContainer {
	background: transparent;
}

/* Make old colored links visible */
.content-box a {
	color: var(--accent);
}

.content-box a:hover {
	color: var(--accent-hover);
	text-decoration: underline;
}

/* ============================================
   DOWNLOADS PAGE
   ============================================ */
.downloads-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 20px;
}

.download-card {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 32px 24px;
	text-align: center;
	transition: all var(--transition);
}

.download-card:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-glow);
	transform: translateY(-4px);
}

.download-card svg {
	margin-bottom: 16px;
	color: var(--accent);
}

.download-card h3 {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 8px;
}

.download-card p {
	color: var(--text-muted);
	font-size: 14px;
	margin-bottom: 20px;
}

.download-card .btn {
	width: 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
	.content-grid {
		grid-template-columns: 1fr;
	}

	.content-sidebar {
		order: -1;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.content-sidebar .sidebar-widget {
		margin-bottom: 0;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	.nav-links, .nav-actions {
		display: none;
	}

	.nav-hamburger {
		display: flex;
	}

	.nav-links.mobile-open {
		display: flex;
		flex-direction: column;
		position: fixed;
		top: var(--navbar-height);
		left: 0;
		right: 0;
		bottom: 0;
		background: var(--bg-secondary);
		padding: 16px;
		gap: 4px;
		overflow-y: auto;
		z-index: 999;
		animation: fadeIn 0.2s ease;
	}

	.nav-links.mobile-open .nav-dropdown-menu {
		position: static;
		display: none;
		box-shadow: none;
		border: none;
		background: var(--bg-tertiary);
		margin-top: 4px;
		border-radius: var(--radius-sm);
	}

	.nav-links.mobile-open .nav-dropdown.active .nav-dropdown-menu {
		display: block;
	}

	.nav-links.mobile-open .nav-link {
		width: 100%;
		text-align: left;
		padding: 12px 14px;
	}

	.nav-links.mobile-open .nav-actions-mobile {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding-top: 16px;
		border-top: 1px solid var(--border-primary);
		margin-top: 8px;
	}

	.hero-content {
		flex-direction: column;
		text-align: center;
	}

	.hero-title {
		font-size: 32px;
	}

	.hero-subtitle {
		margin-left: auto;
		margin-right: auto;
	}

	.hero-buttons {
		justify-content: center;
	}

	.hero-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.content-sidebar {
		grid-template-columns: 1fr;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.footer-bottom {
		flex-direction: column;
		text-align: center;
	}

	.content-box {
		padding: 16px;
	}
}

@media (max-width: 480px) {
	.hero {
		padding: 48px 16px 24px;
	}

	.hero-title {
		font-size: 26px;
	}

	.hero-subtitle {
		font-size: 15px;
	}

	.hero-stats {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.hero-stat {
		padding: 12px 8px;
	}

	.hero-stat-value {
		font-size: 22px;
	}

	.main-content {
		padding: 16px;
	}

	.btn-lg {
		font-size: 14px;
		padding: 10px 20px;
		height: 40px;
	}
}

/* ============================================
   RESPONSIVE - ENHANCED (Audit Pass 2)
   ============================================ */

/* --- Table scroll wrapper for mobile --- */
.table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 8px 0;
}

/* --- Touch targets: minimum 44x44px --- */
@media (pointer: coarse) {
	.nav-link,
	.nav-dropdown-item,
	.quick-link,
	.top-player,
	.pagination a,
	.pagination span {
		min-height: 44px;
		min-width: 44px;
		display: flex;
		align-items: center;
	}

	.btn-sm {
		min-height: 44px;
		padding: 8px 16px;
	}

	input[type="submit"],
	input[type="button"],
	button[type="submit"] {
		min-height: 44px;
	}
}

/* --- Performance: contain on cards --- */
.sidebar-widget,
.download-card,
.hero-stat {
	contain: content;
}

/* content-box excluded from contain: content to allow overflow-x scroll for tables */

/* --- Performance: will-change for animated elements --- */
.hero-glow,
.outfit-glow,
.outfit-img {
	will-change: transform, opacity;
}

.download-card:hover,
.hero-stat:hover,
.btn-primary:hover {
	will-change: transform;
}

/* --- Large Desktop: 1440px+ --- */
@media (min-width: 1440px) {
	.nav-container,
	.hero-content,
	.hero-stats,
	.content-container,
	.footer-container {
		max-width: 1400px;
	}

	.hero-title {
		font-size: 56px;
	}

	.hero-subtitle {
		font-size: 20px;
	}

	.content-grid {
		grid-template-columns: 1fr 360px;
	}
}

/* --- Tablet landscape: 768px - 1024px (enhanced) --- */
@media (max-width: 1024px) and (min-width: 769px) {
	.hero {
		padding: 60px 24px 32px;
	}

	.hero-title {
		font-size: 36px;
	}

	.hero-content {
		gap: 32px;
	}

	.outfit-showcase {
		width: 140px;
		height: 140px;
	}

	.outfit-img {
		width: 96px;
		height: 96px;
	}

	.downloads-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --- Mobile landscape: 480px - 768px (enhanced) --- */
@media (max-width: 768px) {
	/* Hamburger touch target */
	.nav-hamburger {
		min-width: 44px;
		min-height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	/* Mobile nav actions inside menu */
	.nav-links.mobile-open .nav-actions-mobile .btn {
		width: 100%;
		justify-content: center;
		min-height: 44px;
	}

	/* Downloads full width */
	.downloads-grid {
		grid-template-columns: 1fr;
	}

	.download-card {
		padding: 24px 20px;
	}

	/* Forms full width */
	.content-box input[type="text"],
	.content-box input[type="password"],
	.content-box input[type="email"],
	.content-box input[type="number"],
	.content-box input[type="search"],
	.content-box select,
	.content-box textarea {
		width: 100%;
		max-width: 100%;
	}

	/* Table horizontal scroll (container-level, not display:block) */
	.content-box {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.content-box table {
		min-width: 100%;
	}

	.content-box table th,
	.content-box table td {
		padding: 8px 10px;
		font-size: 13px;
	}
}

/* --- Small mobile: 320px - 480px (enhanced) --- */
@media (max-width: 480px) {
	.hero-buttons {
		flex-direction: column;
		width: 100%;
	}

	.hero-buttons .btn {
		width: 100%;
		justify-content: center;
	}

	.outfit-showcase {
		width: 120px;
		height: 120px;
	}

	.outfit-img {
		width: 80px;
		height: 80px;
	}

	.hero-stat-label {
		font-size: 11px;
	}

	.page-title {
		font-size: 22px;
	}

	.content-box {
		padding: 12px;
		border-radius: var(--radius-sm);
	}

	.widget-body {
		padding: 12px 14px;
	}

	.widget-header {
		padding: 10px 14px;
	}

	.rate-item {
		padding: 8px 4px;
	}

	.rate-value {
		font-size: 16px;
	}

	.rate-label {
		font-size: 10px;
	}

	.footer-grid {
		gap: 20px;
	}

	.site-footer {
		padding: 32px 16px 16px;
	}

	.download-card {
		padding: 20px 16px;
	}

	.download-card h3 {
		font-size: 16px;
	}

	/* Pagination wrapping */
	.pagination {
		gap: 2px;
	}

	.pagination a,
	.pagination span {
		min-width: 30px;
		height: 30px;
		padding: 2px 6px;
		font-size: 12px;
	}
}

/* --- Extra small: below 360px --- */
@media (max-width: 360px) {
	.hero-title {
		font-size: 22px;
	}

	.hero-subtitle {
		font-size: 14px;
	}

	.hero-stats {
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}

	.hero-stat-value {
		font-size: 18px;
	}

	.nav-logo-img {
		height: 32px;
	}
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.hero-glow,
	.outfit-glow {
		animation: none;
	}
}

/* --- Print styles --- */
@media print {
	.navbar,
	.hero-bg-effects,
	.nav-hamburger,
	.site-footer {
		display: none;
	}

	body {
		color: #000;
		background: #fff;
	}

	.content-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Language Switcher --- */
.lang-switcher {
	position: relative;
}

.lang-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-sm);
	padding: 6px 10px;
	color: var(--text-secondary);
	cursor: pointer;
	font-size: 13px;
	transition: all 0.2s ease;
}

.lang-toggle:hover {
	color: var(--text-primary);
	border-color: var(--accent);
}

.lang-current {
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.5px;
}

.lang-menu {
	min-width: 160px;
	right: 0;
	left: auto;
}

.lang-option {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lang-option.active {
	color: var(--accent);
	font-weight: 600;
}

.lang-flag {
	font-size: 16px;
	line-height: 1;
}

@media (max-width: 768px) {
	.lang-switcher {
		order: -1;
		margin-bottom: 8px;
	}

	.lang-menu {
		position: static;
		box-shadow: none;
		background: var(--bg-tertiary);
		border: 1px solid var(--border-primary);
		margin-top: 4px;
	}
}

/* ============================================
   AUDIT PASS 1 - COMPREHENSIVE FIXES
   ============================================ */

/* --- Micro-interactions: Link underline animation --- */
.content-box a:not(.btn):not(.skill-pill):not(.pagination a):not(.top-player) {
	position: relative;
	text-decoration: none;
}

.content-box a:not(.btn):not(.skill-pill):not(.pagination a):not(.top-player)::after {
	content: '';
	position: absolute;
	bottom: -1px;
	left: 0;
	width: 0;
	height: 1px;
	background: var(--accent-hover);
	transition: width 0.3s ease;
}

.content-box a:not(.btn):not(.skill-pill):not(.pagination a):not(.top-player):hover::after {
	width: 100%;
}

.content-box a:hover {
	text-decoration: none;
}

/* --- Card hover lift effects --- */
.content-box,
.sidebar-widget,
.rate-item,
.stats-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sidebar-widget:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

/* --- Button glow on hover --- */
.btn-primary:hover {
	filter: brightness(1.1);
	box-shadow: 0 4px 20px var(--accent-glow), 0 0 40px rgba(255, 69, 0, 0.15);
}

.btn-secondary:hover {
	box-shadow: var(--shadow-sm);
}

/* --- Nav item hover highlight --- */
.nav-link {
	transition: all 0.2s ease;
}

.nav-link:hover {
	color: var(--text-primary);
	background: var(--bg-tertiary);
}

.nav-dropdown-item {
	transition: all 0.2s ease;
}

/* --- Typography: heading hierarchy --- */
h1, .hero-title {
	line-height: 1.15;
}

h2, .page-title {
	line-height: 1.2;
}

h3, .widget-title {
	line-height: 1.25;
}

h4, h5, h6 {
	line-height: 1.3;
	color: var(--text-primary);
}

/* Uppercase letter-spacing */
.widget-title,
.rate-label,
.hero-stat-label,
.footer-links-col h4 {
	letter-spacing: 0.06em;
}

/* Code/monospace */
code, pre, .monospace, kbd, samp, tt {
	font-family: var(--font-mono);
	background: var(--bg-tertiary);
	color: var(--text-primary);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

pre {
	padding: 16px;
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-sm);
	overflow-x: auto;
}

/* ============================================
   MYAAC LEGACY TABLE OVERRIDES
   ============================================ */

/* TableContainer / Table1 / CaptionContainer (Account Login, Create) */
.TableContainer,
.InnerTableContainer,
.Table1, .Table2, .Table3 {
	background: transparent !important;
	border: none !important;
	width: 100%;
}

.TableContainer {
	margin: 8px 0;
}

.InnerTableContainer {
	background: transparent !important;
}

.InnerTableContainer table {
	width: 100%;
}

/* Caption bar (old Tibia-style header for form sections) */
.CaptionContainer {
	background: var(--bg-tertiary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm);
	padding: 10px 16px;
	margin-bottom: 12px;
	display: block;
}

.CaptionInnerContainer {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

/* Hide old Tibia border images */
.CaptionEdgeLeftTop,
.CaptionEdgeRightTop,
.CaptionEdgeLeftBottom,
.CaptionEdgeRightBottom,
.CaptionBorderTop,
.CaptionBorderBottom,
.CaptionVerticalLeft,
.CaptionVerticalRight {
	display: none !important;
}

.CaptionContainer .Text,
.CaptionInnerContainer .Text {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-primary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-align: center;
	width: 100%;
}

/* Label styles for MyAAC forms */
.LabelV, .LabelV150, .LabelH {
	color: var(--text-secondary) !important;
	font-size: 14px;
	font-weight: 500;
	padding: 8px 12px 8px 0 !important;
	white-space: nowrap;
	vertical-align: middle;
}

.LabelV {
	width: 150px;
}

.LabelV150 {
	width: 150px;
}

.LabelH {
	font-weight: 600;
	color: var(--text-primary) !important;
}

/* Form field errors */
.FormFieldError {
	color: var(--danger) !important;
	font-size: 13px;
	font-weight: 500;
}

/* Option container */
.OptionContainer {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-sm);
	padding: 12px 16px;
	margin: 8px 0;
}

/* ============================================
   MESSAGES.CSS DARK OVERRIDE
   (Override the light-themed /tools/css/messages.css)
   ============================================ */

.error, .success, .note, .warning {
	font-weight: 600 !important;
	font-size: 14px !important;
	padding: 12px 18px !important;
	border-radius: var(--radius-sm) !important;
	border-width: 1px !important;
	border-style: solid !important;
	background-repeat: no-repeat !important;
	background-position: 12px center !important;
}

.error {
	background-color: rgba(248, 81, 73, 0.1) !important;
	border-color: rgba(248, 81, 73, 0.3) !important;
	color: #f88070 !important;
}

.success {
	background-color: rgba(63, 185, 80, 0.1) !important;
	border-color: rgba(63, 185, 80, 0.3) !important;
	color: #56d364 !important;
}

.note {
	background-color: rgba(88, 166, 255, 0.1) !important;
	border-color: rgba(88, 166, 255, 0.3) !important;
	color: #79c0ff !important;
}

.warning {
	background-color: rgba(210, 153, 34, 0.1) !important;
	border-color: rgba(210, 153, 34, 0.3) !important;
	color: #e3b341 !important;
}

/* ============================================
   INLINE STYLE OVERRIDES
   (Kill light backgrounds from inline styles)
   ============================================ */

/* Override any inline background-image on old Tibia elements */
[style*="background-image:url(templates/arcfall/images/content/"],
[style*="background-image:url(templates/arcfall/images/news/"],
[style*="background-image:url(templates/arcfall/images/global/"] {
	background-image: none !important;
}

/* Override inline light borders */
[style*="border:1px solid #faf0d7"],
[style*="border: 1px solid #faf0d7"] {
	border-color: var(--border-primary) !important;
}

/* Override inline light bg colors */
[style*="background-color: #D4C0A1"],
[style*="background-color: #F1E0C6"],
[style*="background-color: #F5F5F5"],
[style*="background-color: #fff"],
[style*="background-color: white"],
[style*="background-color:#D4C0A1"],
[style*="background-color:#F1E0C6"] {
	background-color: var(--bg-secondary) !important;
}

/* Override bgcolor attribute on old tables */
[bgcolor="#D4C0A1"],
[bgcolor="#F1E0C6"],
[bgcolor="#505050"],
[bgcolor="#0d1117"],
tr[bgcolor] {
	background-color: var(--bg-tertiary) !important;
}

/* Force dark on ALL td/th that may have inline bg */
.content-box td[style*="background"],
.content-box th[style*="background"],
.content-box tr[style*="background"] {
	background-color: transparent !important;
	background-image: none !important;
}

/* Override white class text */
.white, td.white, .white b {
	color: var(--text-primary) !important;
}

/* ============================================
   NEWS HEADLINE DARK STYLING
   ============================================ */

.NewsHeadline {
	margin-bottom: 24px;
}

.NewsHeadlineBackground {
	background-image: none !important;
	background-color: transparent !important;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.NewsHeadlineIcon {
	flex-shrink: 0;
}

.NewsHeadlineDate {
	font-size: 13px;
	color: var(--text-muted);
}

.NewsHeadlineText {
	font-size: 20px;
	font-weight: 700;
	color: var(--text-primary);
	flex: 1;
	min-width: 200px;
}

.NewsHeadlineAuthor {
	font-size: 13px;
	color: var(--text-muted);
	width: 100%;
}

.NewsHeadlineAuthor b {
	color: var(--text-secondary);
	font-weight: 600;
}

/* News body table */
.content-box > table[style*="clear:both"],
.content-box > table[style*="clear: both"] {
	margin-bottom: 16px;
}

.content-box > table td[style*="padding-left:10px"] {
	color: var(--text-secondary) !important;
	line-height: 1.7;
	font-size: 14px;
	padding: 12px 16px !important;
}

.content-box > table td[style*="padding-left:10px"] b {
	color: var(--text-primary);
}

/* ============================================
   ONLINE PAGE TABLE OVERRIDES
   ============================================ */

.myaac-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.myaac-table > tbody > tr:nth-child(even) {
	background: var(--bg-secondary) !important;
}

.myaac-table > tbody > tr:nth-child(odd) {
	background: var(--bg-tertiary) !important;
}

.myaac-table > tbody > tr:hover {
	background: rgba(48, 54, 61, 0.5) !important;
}

.myaac-table > tbody > tr > td {
	padding: 8px 12px !important;
	color: var(--text-primary);
	border-bottom: 1px solid var(--border-secondary);
}

.myaac-table > thead > tr > td,
.myaac-table > thead > tr > th {
	padding: 10px 12px !important;
	background: var(--bg-primary) !important;
	color: var(--text-primary) !important;
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 1px solid var(--border-primary);
}

.myaac-table > tfoot > tr > td {
	padding: 10px 12px !important;
	background: var(--bg-primary) !important;
	color: var(--text-primary) !important;
	border-top: 1px solid var(--border-primary);
}

/* Generic tables in content without specific class */
.content-box table[border="0"],
.content-box table[cellpadding],
.content-box table[cellspacing] {
	background: transparent;
	border-collapse: collapse;
}

.content-box table[border="0"] td,
.content-box table[cellpadding] td {
	padding: 6px 10px;
	color: var(--text-primary);
}

/* ============================================
   HIGHSCORES PAGE SPECIFIC STYLES
   ============================================ */

.highscores-page {
	color: var(--text-primary);
}

.highscores-hero {
	text-align: center;
	padding: 24px 0 32px;
	border-bottom: 1px solid var(--border-secondary);
	margin-bottom: 24px;
}

.highscores-hero .hero-title h1 {
	font-size: 28px;
	font-weight: 800;
	text-transform: capitalize;
	margin-bottom: 4px;
}

.highscores-hero .subtitle {
	font-size: 14px;
	color: var(--text-muted);
}

/* Podium */
.top-players-podium {
	display: flex;
	justify-content: center;
	align-items: flex-end;
	gap: 24px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.podium-player {
	text-align: center;
	padding: 20px 16px;
	border-radius: var(--radius-md);
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	min-width: 140px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.podium-player:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}

.podium-player.gold {
	border-color: #ffd700;
	box-shadow: 0 0 16px rgba(255, 215, 0, 0.15);
	order: 2;
}

.podium-player.silver {
	border-color: #c0c0c0;
	order: 1;
}

.podium-player.bronze {
	border-color: #cd7f32;
	order: 3;
}

.rank-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-weight: 800;
	font-size: 14px;
	margin-bottom: 8px;
}

.podium-player.gold .rank-badge {
	background: linear-gradient(135deg, #ffd700, #ffaa00);
	color: #1a1a1a;
}

.podium-player.silver .rank-badge {
	background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
	color: #1a1a1a;
}

.podium-player.bronze .rank-badge {
	background: linear-gradient(135deg, #cd7f32, #a0622a);
	color: #fff;
}

.podium-player .player-outfit img {
	width: 64px;
	height: 64px;
	object-fit: contain;
	image-rendering: pixelated;
	filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.podium-player .player-name {
	font-size: 15px;
	font-weight: 700;
	margin: 8px 0 2px;
}

.podium-player .player-name a {
	color: var(--text-primary);
}

.podium-player .player-name a:hover {
	color: var(--accent);
}

.podium-player .player-vocation {
	font-size: 12px;
	color: var(--text-muted);
}

.podium-player .player-value {
	font-size: 24px;
	font-weight: 800;
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-top: 8px;
}

.podium-player .player-value-label {
	font-size: 11px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* Filters */
.highscores-filters {
	padding: 16px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	margin-bottom: 16px;
}

.filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
}

.filter-label {
	font-size: 13px;
	color: var(--text-muted);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.filter-select {
	background: var(--bg-input) !important;
	border: 1px solid var(--border-primary) !important;
	color: var(--text-primary) !important;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	cursor: pointer;
}

.filter-select:focus {
	outline: none;
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* Skill pills */
.skill-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	width: 100%;
	margin-top: 8px;
}

.skill-pill {
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	border: 1px solid var(--border-primary);
	transition: all 0.2s ease;
	text-decoration: none;
}

.skill-pill:hover {
	color: var(--text-primary);
	background: var(--border-primary);
	border-color: var(--text-muted);
}

.skill-pill.active {
	background: var(--accent-gradient);
	color: #fff;
	border-color: var(--accent);
}

/* Stats cards */
.stats-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}

.stats-card {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-sm);
	padding: 16px 12px;
	text-align: center;
}

.stats-card:hover {
	border-color: var(--accent);
	box-shadow: var(--shadow-glow);
	transform: translateY(-2px);
}

.stats-card-value {
	font-size: 22px;
	font-weight: 800;
	background: var(--accent-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-transform: capitalize;
}

.stats-card-label {
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 2px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Rankings card */
.rankings-card {
	background: var(--bg-tertiary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.rankings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border-secondary);
	background: var(--bg-secondary);
}

.rankings-title {
	font-size: 15px;
	font-weight: 700;
	color: var(--text-primary);
	text-transform: capitalize;
}

.skill-name {
	text-transform: capitalize;
}

.rankings-info {
	font-size: 13px;
	color: var(--text-muted);
}

/* Rankings table */
.rankings-table {
	width: 100%;
	border-collapse: collapse;
}

.rankings-table thead {
	background: var(--bg-primary);
}

.rankings-table thead th {
	padding: 10px 14px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border-primary);
	text-align: left;
}

.rankings-table tbody tr {
	transition: background 0.15s ease;
	border-bottom: 1px solid var(--border-secondary);
}

.rankings-table tbody tr:hover {
	background: rgba(48, 54, 61, 0.3);
}

.rankings-table tbody tr:last-child {
	border-bottom: none;
}

.rankings-table tbody td {
	padding: 10px 14px;
	font-size: 14px;
	color: var(--text-primary);
	vertical-align: middle;
}

.rank-cell {
	font-weight: 700;
	color: var(--text-muted);
}

.rank-cell.top-1 {
	color: #ffd700;
	font-size: 16px;
}

.rank-cell.top-2 {
	color: #c0c0c0;
	font-size: 15px;
}

.rank-cell.top-3 {
	color: #cd7f32;
	font-size: 15px;
}

.player-cell {
	display: flex;
	align-items: center;
	gap: 10px;
}

.player-cell-outfit img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	image-rendering: pixelated;
}

.player-cell-info {
	display: flex;
	flex-direction: column;
}

.player-cell-name {
	font-weight: 600;
}

.player-cell-name a {
	color: var(--text-primary);
}

.player-cell-name a:hover {
	color: var(--accent);
}

.player-cell-vocation {
	font-size: 12px;
	color: var(--text-muted);
}

.value-cell {
	font-weight: 600;
}

.value-cell.experience {
	font-family: var(--font-mono);
	font-size: 13px;
}

.center { text-align: center; }
.hide-mobile { }

/* Pagination for highscores */
.pagination-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 16px;
	border-top: 1px solid var(--border-secondary);
}

.pagination-btn {
	padding: 6px 14px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 600;
	background: var(--bg-secondary);
	color: var(--text-secondary);
	border: 1px solid var(--border-primary);
	text-decoration: none;
	transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border-color: var(--text-muted);
}

.pagination-btn.disabled {
	opacity: 0.4;
	cursor: default;
}

.pagination-info {
	font-size: 13px;
	color: var(--text-muted);
}

.cache-notice {
	font-size: 12px;
	color: var(--text-muted);
	text-align: center;
	padding: 8px;
}

.update-time {
	font-size: 12px;
	color: var(--text-muted);
}

/* ============================================
   PANEL & WELL (MyAAC Generic)
   ============================================ */

.panel, .well {
	background: var(--bg-secondary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm);
	padding: 16px;
	color: var(--text-primary);
	margin: 8px 0;
}

.panel-heading, .panel-title {
	color: var(--text-primary) !important;
	font-weight: 700;
	font-size: 15px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-secondary);
	margin-bottom: 12px;
}

.panel-body {
	color: var(--text-secondary);
}

/* ============================================
   FLASH MESSAGES (MyAAC)
   ============================================ */

.flash-message, .alert {
	padding: 12px 18px;
	border-radius: var(--radius-sm);
	margin: 12px 0;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid;
}

.alert-success, .flash-success {
	background: rgba(63, 185, 80, 0.1);
	border-color: rgba(63, 185, 80, 0.3);
	color: #56d364;
}

.alert-danger, .alert-error, .flash-error {
	background: rgba(248, 81, 73, 0.1);
	border-color: rgba(248, 81, 73, 0.3);
	color: #f88070;
}

.alert-warning, .flash-warning {
	background: rgba(210, 153, 34, 0.1);
	border-color: rgba(210, 153, 34, 0.3);
	color: #e3b341;
}

.alert-info, .flash-info {
	background: rgba(88, 166, 255, 0.1);
	border-color: rgba(88, 166, 255, 0.3);
	color: #79c0ff;
}

/* ============================================
   CHECKBOX & RADIO DARK STYLING
   ============================================ */

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--accent);
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* ============================================
   SELECT DARK STYLING (deeper override)
   ============================================ */

select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238b949e'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	padding-right: 30px !important;
}

select option {
	background: var(--bg-secondary);
	color: var(--text-primary);
}

/* ============================================
   HERO PARTICLE/STAR EFFECT
   ============================================ */

.hero-bg-effects::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
		radial-gradient(1px 1px at 30% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
		radial-gradient(1px 1px at 50% 10%, rgba(255, 255, 255, 0.5) 0%, transparent 100%),
		radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
		radial-gradient(1px 1px at 90% 70%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
		radial-gradient(1.5px 1.5px at 15% 80%, rgba(255, 69, 0, 0.3) 0%, transparent 100%),
		radial-gradient(1.5px 1.5px at 45% 35%, rgba(255, 69, 0, 0.2) 0%, transparent 100%),
		radial-gradient(1.5px 1.5px at 75% 85%, rgba(255, 69, 0, 0.3) 0%, transparent 100%),
		radial-gradient(1px 1px at 20% 45%, rgba(255, 255, 255, 0.35) 0%, transparent 100%),
		radial-gradient(1px 1px at 60% 75%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
		radial-gradient(1px 1px at 80% 15%, rgba(255, 255, 255, 0.45) 0%, transparent 100%),
		radial-gradient(1px 1px at 40% 90%, rgba(255, 255, 255, 0.25) 0%, transparent 100%),
		radial-gradient(1.5px 1.5px at 55% 55%, rgba(255, 69, 0, 0.25) 0%, transparent 100%),
		radial-gradient(1px 1px at 85% 50%, rgba(255, 255, 255, 0.4) 0%, transparent 100%),
		radial-gradient(1px 1px at 5% 65%, rgba(255, 255, 255, 0.3) 0%, transparent 100%),
		radial-gradient(1px 1px at 95% 25%, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
	animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
	0% { opacity: 0.6; }
	50% { opacity: 1; }
	100% { opacity: 0.7; }
}

/* ============================================
   CTA BUTTON GRADIENT ANIMATION
   ============================================ */

.hero-buttons .btn-primary {
	background: linear-gradient(135deg, #ff4500, #ff6a33, #e8430a);
	background-size: 200% 200%;
	animation: gradientShift 3s ease-in-out infinite;
	box-shadow: 0 4px 16px var(--accent-glow);
}

.hero-buttons .btn-primary:hover {
	box-shadow: 0 6px 28px var(--accent-glow), 0 0 48px rgba(255, 69, 0, 0.2);
	transform: translateY(-2px);
}

@keyframes gradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* ============================================
   CONSISTENT BORDER-RADIUS ENFORCEMENT
   ============================================ */

.content-box { border-radius: 8px; }
.sidebar-widget { border-radius: 8px; }
input, select, textarea { border-radius: 6px !important; }
.btn { border-radius: 6px; }
.rank-badge, .status-dot { border-radius: 50%; }
.skill-pill { border-radius: 20px; }

/* ============================================
   RESPONSIVE FOR NEW ELEMENTS
   ============================================ */

@media (max-width: 768px) {
	.stats-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.top-players-podium {
		flex-direction: column;
		align-items: center;
	}

	.podium-player.gold {
		order: 0;
	}

	.podium-player.silver {
		order: 1;
	}

	.podium-player.bronze {
		order: 2;
	}

	.rankings-table thead th,
	.rankings-table tbody td {
		padding: 8px 10px;
		font-size: 13px;
	}

	.hide-mobile {
		display: none !important;
	}

	.highscores-filters {
		flex-direction: column;
		align-items: flex-start;
	}

	.skill-pills {
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 4px;
	}
}

@media (max-width: 480px) {
	.stats-cards {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.stats-card {
		padding: 12px 8px;
	}

	.podium-player {
		min-width: 120px;
		padding: 16px 12px;
	}
}

/* ============================================
   TEMPLATE FORM SELECT (sidebar)
   ============================================ */

.widget-body form select {
	width: 100%;
	margin-bottom: 8px;
}

.widget-body form input[type="submit"] {
	width: 100%;
}

/* ============================================
   IMAGE FIXES - Outfit centering
   ============================================ */

.outfit-showcase {
	display: flex;
	align-items: center;
	justify-content: center;
}

.outfit-img {
	display: block;
	margin: 0 auto;
}

/* ============================================
   BROWSEHAPPY DARK
   ============================================ */

.browsehappy {
	background: rgba(210, 153, 34, 0.15);
	color: var(--warning);
	padding: 12px 24px;
	text-align: center;
	border-bottom: 1px solid rgba(210, 153, 34, 0.3);
}

.browsehappy a {
	color: var(--accent);
	font-weight: 600;
}


/* ============================================
   MYAAC CHARACTER PAGE & GLOBAL OVERRIDES
   CSS-only fixes for all MyAAC-generated pages
   Overrides inline styles from PHP templates
   ============================================ */

/* ===== CHARACTER PAGE - OUTFIT DISPLAY ===== */

/* Fix outfit image absolute positioning - convert to centered flex layout */
.content-box div[style*="position:absolute"] {
	position: relative !important;
	margin: 20px auto !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	float: none !important;
	left: auto !important;
	right: auto !important;
}

/* Outfit circle border - use accent color on dark background */
.content-box div[style*="border-radius:50px"] {
	border-color: var(--accent) !important;
	background: var(--bg-tertiary) !important;
	margin: 20px auto !important;
	position: relative !important;
	box-shadow: 0 0 20px var(--accent-glow);
}

/* Fix the margin-left:376px that breaks layout */
.content-box div[style*="margin-left:376px"] {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Outfit image inside the circle */
.content-box div[style*="border-radius:50px"] img[alt="player outfit"] {
	image-rendering: pixelated;
	filter: drop-shadow(0 0 8px var(--accent-glow));
}

/* ===== CHARACTER PAGE - EQUIPMENT SLOTS ===== */

/* Outer equipment table with #808080 background */
.content-box table[style*="background: #808080"],
.content-box table[style*="background:#808080"] {
	background: var(--bg-tertiary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm) !important;
	overflow: hidden;
}

/* Inner equipment table with #292929 background */
.content-box table[style*="background: #292929"],
.content-box table[style*="background:#292929"] {
	background: var(--bg-primary) !important;
}

/* Equipment slot cells with #808080 borders */
.content-box td[style*="border:1px solid #808080"] {
	border-color: var(--border-primary) !important;
	background: var(--bg-secondary) !important;
	padding: 2px !important;
	transition: border-color var(--transition);
}

.content-box td[style*="border:1px solid #808080"]:hover {
	border-color: var(--accent) !important;
}

/* Item images - pixelated rendering for retro sprites */
.content-box img[src*="images/items/"] {
	image-rendering: pixelated;
	border-radius: 2px;
	display: block;
}

/* No-item placeholder images (no_helmet, no_armor, etc.) */
.content-box img[src*="no_helmet"],
.content-box img[src*="no_armor"],
.content-box img[src*="no_legs"],
.content-box img[src*="no_boots"],
.content-box img[src*="no_ring"],
.content-box img[src*="no_ammo"],
.content-box img[src*="no_shield"],
.content-box img[src*="no_weapon"] {
	opacity: 0.3;
	filter: grayscale(100%);
}

/* ===== CHARACTER PAGE - INFO TABLES ===== */

/* Override ALL bgcolor attributes on table rows */
.content-box table tr[bgcolor="#0d1117"],
.content-box table tr[bgcolor="#161b22"],
.content-box table tr[bgcolor="#30363d"] {
	background: transparent !important;
}

/* Header rows (bgcolor=#0d1117 with class white) */
.content-box table tr[bgcolor="#0d1117"] {
	background: var(--bg-tertiary) !important;
	border-bottom: 2px solid var(--border-primary) !important;
}

/* Alternating data rows */
.content-box table tr[bgcolor="#161b22"] {
	background: var(--bg-secondary) !important;
}

.content-box table tr[bgcolor="#30363d"] {
	background: var(--bg-tertiary) !important;
}

/* All table cells - consistent dark theme */
.content-box table td {
	color: var(--text-primary) !important;
	padding: 8px 12px !important;
	border-bottom: 1px solid var(--border-secondary) !important;
	font-size: 14px;
}

/* Header cells (class="white") */
.content-box td.white,
td.white {
	color: var(--text-primary) !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.03em !important;
	padding: 12px !important;
	background: var(--bg-tertiary) !important;
	border-bottom: 2px solid var(--accent) !important;
}

/* Table width override */
.content-box > table[width="100%"],
.content-box table[border="0"][cellpadding][cellspacing][width="100%"] {
	width: 100% !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	background: transparent !important;
}

/* ===== CHARACTER PAGE - LABELS ===== */

.LabelV,
.LabelV150 {
	color: var(--text-secondary) !important;
	font-weight: 500 !important;
	font-size: 14px !important;
}

/* ===== CHARACTER PAGE - SIGNATURE SECTION ===== */

/* Signature embed input fields */
.content-box input[style*="width: 400px"],
.content-box input[style*="width:400px"] {
	background: var(--bg-primary) !important;
	color: var(--text-secondary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm) !important;
	font-family: var(--font-mono) !important;
	font-size: 12px !important;
	padding: 8px 12px !important;
	width: 100% !important;
	max-width: 500px !important;
}

.content-box input[style*="width: 400px"]:focus,
.content-box input[style*="width:400px"]:focus {
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px var(--accent-subtle) !important;
	outline: none !important;
}

/* Signature image */
.content-box img[src*=".png"][alt*="Signature"] {
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-primary);
	margin: 8px 0;
}

/* ===== CHARACTER PAGE - FLAGS ===== */

img[src*="images/flags/"] {
	vertical-align: middle;
	margin-right: 4px;
	border-radius: 2px;
}

/* ===== CHARACTER PAGE - BLANK SPACER IMAGES ===== */

/* Hide blank.gif spacer images completely */
img[src*="blank.gif"] {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
}

/* Fix layout cells that contain blank.gif spacers */
.content-box > table > tbody > tr > td:has(img[src*="blank.gif"]) {
	display: none !important;
	width: 0 !important;
	padding: 0 !important;
}

/* ===== CHARACTER PAGE - FORMS ===== */

/* Character search form inputs */
.content-box input[type="text"],
.content-box input[type="password"],
.content-box input[type="email"],
.content-box input[name="name"] {
	background: var(--bg-primary) !important;
	color: var(--text-primary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm) !important;
	padding: 8px 12px !important;
	font-family: var(--font-family) !important;
	font-size: 14px !important;
	transition: all var(--transition) !important;
}

.content-box input[type="text"]:focus,
.content-box input[type="password"]:focus,
.content-box input[type="email"]:focus,
.content-box input[name="name"]:focus {
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px var(--accent-subtle) !important;
	outline: none !important;
}

/* Submit/View buttons */
.content-box input[type="submit"] {
	background: var(--accent-gradient) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--radius-sm) !important;
	padding: 8px 20px !important;
	font-family: var(--font-family) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: all var(--transition) !important;
	letter-spacing: 0.02em;
}

.content-box input[type="submit"]:hover {
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 12px var(--accent-glow) !important;
	filter: brightness(1.1);
}

/* Select dropdowns */
.content-box select {
	background: var(--bg-primary) !important;
	color: var(--text-primary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm) !important;
	padding: 8px 12px !important;
	font-family: var(--font-family) !important;
	font-size: 14px !important;
	cursor: pointer !important;
}

.content-box select:focus {
	border-color: var(--accent) !important;
	box-shadow: 0 0 0 3px var(--accent-subtle) !important;
	outline: none !important;
}

/* ===== GLOBAL - INLINE BGCOLOR OVERRIDES ===== */

/* Override ALL bgcolor attributes on any element */
*[bgcolor="#0d1117"] {
	background-color: var(--bg-tertiary) !important;
}

*[bgcolor="#161b22"] {
	background-color: var(--bg-secondary) !important;
}

*[bgcolor="#30363d"] {
	background-color: var(--bg-tertiary) !important;
}

/* Override inline background-color styles */
*[style*="background-color: #30363d"],
*[style*="background-color:#30363d"] {
	background-color: var(--bg-tertiary) !important;
}

*[style*="background-color: #161b22"],
*[style*="background-color:#161b22"] {
	background-color: var(--bg-secondary) !important;
}

*[style*="background-color: #0d1117"],
*[style*="background-color:#0d1117"] {
	background-color: var(--bg-tertiary) !important;
}

/* ===== GLOBAL - INLINE COLOR OVERRIDES ===== */

/* Override hardcoded Tibia gold/tan color */
*[style*="color: #F1E0C6"],
*[style*="color:#F1E0C6"],
*[style*="color: #f1e0c6"],
*[style*="color:#f1e0c6"] {
	color: var(--text-primary) !important;
}

/* Override old border colors */
*[style*="border:1px solid #faf0d7"],
*[style*="border: 1px solid #faf0d7"] {
	border-color: var(--border-primary) !important;
}

*[style*="border:1px solid #808080"],
*[style*="border: 1px solid #808080"] {
	border-color: var(--border-primary) !important;
}

/* ===== GLOBAL - MYAAC TABLE CLASS ===== */

.myaac-table {
	width: 100% !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	background: transparent !important;
	border-radius: var(--radius-sm) !important;
	overflow: hidden !important;
}

.myaac-table > thead > tr > td,
.myaac-table > thead > tr > th {
	background: var(--bg-tertiary) !important;
	color: var(--text-primary) !important;
	font-weight: 700 !important;
	padding: 10px 12px !important;
	border-bottom: 2px solid var(--accent) !important;
	text-transform: uppercase !important;
	letter-spacing: 0.03em !important;
	font-size: 13px !important;
}

.myaac-table > tbody > tr > td {
	padding: 8px 12px !important;
	color: var(--text-primary) !important;
	border-bottom: 1px solid var(--border-secondary) !important;
	font-size: 14px !important;
}

.myaac-table > tbody > tr:nth-child(even) {
	background: var(--bg-secondary) !important;
}

.myaac-table > tbody > tr:nth-child(odd) {
	background: transparent !important;
}

.myaac-table > tbody > tr:hover {
	background: rgba(48, 54, 61, 0.5) !important;
}

.myaac-table > tbody > tr:last-child > td {
	border-bottom: none !important;
}

.myaac-table > tfoot > tr > td {
	background: var(--bg-tertiary) !important;
	color: var(--text-primary) !important;
	padding: 10px 12px !important;
	border-top: 1px solid var(--border-primary) !important;
}

/* ===== GLOBAL - FORM FIELD ERRORS ===== */

.FormFieldError {
	color: var(--danger) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	margin-top: 4px;
	display: inline-block;
}

/* ===== GLOBAL - OLD TIBIA TABLE CONTAINERS ===== */

/* TableShadow containers from old templates */
.TableShadowContainerRightTop,
.TableShadowRightTop,
.TableBottomShadow,
.TableBottomLeftShadow,
.TableBottomRightShadow,
.TableContentAndRightShadow {
	background-image: none !important;
	background: transparent !important;
}

.TableContent {
	background: var(--bg-secondary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm) !important;
	border-color: var(--border-primary) !important;
}

.TableContent td {
	color: var(--text-primary) !important;
	padding: 8px 12px !important;
}

.TableContainer,
.InnerTableContainer {
	background: transparent !important;
	border: none !important;
}

/* ===== GLOBAL - FLASH MESSAGES ===== */

.message {
	padding: 14px 18px !important;
	border-radius: var(--radius-sm) !important;
	margin: 12px 0 !important;
	font-size: 14px !important;
	border: 1px solid !important;
	background: rgba(88, 166, 255, 0.1) !important;
	border-color: rgba(88, 166, 255, 0.3) !important;
	color: var(--info) !important;
}

.success, .message.success {
	background: rgba(63, 185, 80, 0.1) !important;
	border-color: rgba(63, 185, 80, 0.3) !important;
	color: var(--success) !important;
}

.error, .message.error {
	background: rgba(248, 81, 73, 0.1) !important;
	border-color: rgba(248, 81, 73, 0.3) !important;
	color: var(--danger) !important;
}

.warning, .message.warning {
	background: rgba(210, 153, 34, 0.1) !important;
	border-color: rgba(210, 153, 34, 0.3) !important;
	color: var(--warning) !important;
}

/* ===== GLOBAL - PAGINATION ===== */

.pagination a,
.pagination span,
.page-link,
a.page {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 34px !important;
	height: 34px !important;
	padding: 4px 10px !important;
	font-size: 14px !important;
	border-radius: var(--radius-sm) !important;
	border: 1px solid var(--border-primary) !important;
	color: var(--text-secondary) !important;
	background: transparent !important;
	transition: all var(--transition) !important;
	text-decoration: none !important;
}

.pagination a:hover,
a.page:hover {
	background: var(--bg-tertiary) !important;
	color: var(--text-primary) !important;
}

.pagination .current,
.pagination .active,
a.page.active {
	background: var(--accent-gradient) !important;
	color: #fff !important;
	border-color: var(--accent) !important;
}

/* ===== GLOBAL - NOBR ELEMENTS ===== */

nobr {
	white-space: nowrap;
	color: var(--text-primary);
}

/* ===== GLOBAL - FONT COLOR OVERRIDES ===== */

/* Override old font color tags and inline colors for dark theme */
.content-box font[color],
.content-box *[style*="color: red"],
.content-box *[style*="color:red"] {
	color: var(--accent) !important;
}

.content-box *[style*="color: green"],
.content-box *[style*="color:green"] {
	color: var(--success) !important;
}

.content-box *[style*="color: yellow"],
.content-box *[style*="color:yellow"] {
	color: var(--warning) !important;
}

/* ===== GLOBAL - ACCOUNT PAGES ===== */

/* Account creation / management tables */
.content-box table.TableContent {
	width: 100% !important;
	background: var(--bg-secondary) !important;
	border: 1px solid var(--border-primary) !important;
	border-radius: var(--radius-sm) !important;
}

.content-box table.TableContent td {
	color: var(--text-primary) !important;
	padding: 8px 12px !important;
	border-bottom: 1px solid var(--border-secondary) !important;
}

.content-box table.TableContent input[type="text"],
.content-box table.TableContent input[type="password"],
.content-box table.TableContent input[type="email"],
.content-box table.TableContent select {
	width: 100% !important;
	max-width: 300px !important;
}

/* Indicator images (checkmarks/x marks) */
.content-box img[src*="nok.gif"],
.content-box img[src*="ok.gif"] {
	vertical-align: middle;
	margin-left: 8px;
}

/* OptionContainer for vocation selection etc. */
.OptionContainer {
	color: var(--text-primary) !important;
}

/* ===== GLOBAL - GUILD PAGES ===== */

.content-box table[width="100%"] img[src*="guild"] {
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-primary);
}

/* ===== GLOBAL - SELECT DROPDOWN STYLING ===== */

select {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 10px center !important;
	padding-right: 32px !important;
}

select option {
	background: var(--bg-secondary) !important;
	color: var(--text-primary) !important;
	padding: 8px !important;
}

/* ===== GLOBAL - BOLD TEXT IN DATA CELLS ===== */

.content-box td b,
.content-box td strong {
	color: var(--text-primary) !important;
	font-weight: 600;
}

/* ===== GLOBAL - LINKS IN TABLES ===== */

.content-box table a {
	color: var(--accent) !important;
	transition: color var(--transition);
}

.content-box table a:hover {
	color: var(--accent-hover) !important;
	text-decoration: underline !important;
}

/* ===== GLOBAL - HR SPACING ===== */

.content-box hr {
	border: none !important;
	border-top: 1px solid var(--border-secondary) !important;
	margin: 16px 0 !important;
}

/* ===== CHARACTER PAGE - DEATH LIST ===== */

/* Death entries - timestamp styling */
.content-box table tr[bgcolor="#30363d"] td[align="center"],
.content-box table tr[bgcolor="#161b22"] td[align="center"] {
	color: var(--text-muted) !important;
	font-size: 13px !important;
	white-space: nowrap;
}

/* ===== CHARACTER PAGE - CHARACTERS LIST ===== */

/* Character list "View" buttons - secondary style */
.content-box table table form input[type="submit"][value="View"] {
	background: var(--bg-tertiary) !important;
	color: var(--text-primary) !important;
	border: 1px solid var(--border-primary) !important;
	padding: 4px 14px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
}

.content-box table table form input[type="submit"][value="View"]:hover {
	background: var(--accent) !important;
	color: #fff !important;
	border-color: var(--accent) !important;
}

/* Nested tables in character list - clean up borders */
.content-box table table[border="0"][cellspacing="0"][cellpadding="0"] {
	margin: 0 !important;
}

.content-box table table[border="0"][cellspacing="0"][cellpadding="0"] td {
	border-bottom: none !important;
	padding: 2px !important;
}

/* ===== CHARACTER PAGE - SEARCH FORM ===== */

/* Search form row background override */
.content-box tr[style*="background-color: #30363d"],
.content-box tr[style*="background-color:#30363d"] {
	background-color: var(--bg-secondary) !important;
}

/* Search form inner table - transparent */
.content-box tr[style*="background-color"] table {
	background: transparent !important;
}

.content-box tr[style*="background-color"] table td {
	border-bottom: none !important;
	padding: 8px !important;
}

/* ===== GLOBAL - RESPONSIVE TABLE FIXES ===== */

@media (max-width: 768px) {
	/* Equipment grid - stack on mobile */
	.content-box table[style*="background: #808080"] td {
		display: block !important;
		width: 100% !important;
	}

	/* Signature inputs full width */
	.content-box input[style*="width: 400px"],
	.content-box input[style*="width:400px"] {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Character info tables */
	.content-box table td[width="20%"] {
		width: 35% !important;
	}

	/* Search form */
	.content-box tr[style*="background-color"] table tr {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 8px !important;
		align-items: center !important;
	}

	.content-box tr[style*="background-color"] table td {
		width: auto !important;
	}

	.content-box input[style*="width:165px"] {
		width: 100% !important;
	}
}

/* ===== GLOBAL - IMAGE BORDER CLEANUP ===== */

.content-box img[border="0"] {
	border: none !important;
}

/* ===== GLOBAL - NOK/OK INDICATORS ===== */

img[src*="nok.gif"] {
	filter: hue-rotate(0deg) brightness(1.2);
}

img[src*="ok.gif"] {
	filter: hue-rotate(90deg) brightness(1.2);
}

/* ===== CLICK-TO-TOGGLE DROPDOWNS ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 6px;
    margin-top: 4px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.nav-dropdown.active > .nav-dropdown-menu {
    display: block;
    animation: dropIn 0.15s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-menu .nav-dropdown-item {
    display: block;
    padding: 9px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.15s;
}

.nav-dropdown-menu .nav-dropdown-item:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Mobile */
@media (max-width: 1024px) {
    .nav-dropdown > .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        background: transparent;
        margin-top: 0;
    }
}


/* ============================================
   CHARACTER PROFILE PAGE
   ============================================ */

/* --- Vocation Color System --- */
.char-profile[data-voc="knight"]   { --voc: #f85149; --voc-bg: rgba(248,81,73,0.08); --voc-border: rgba(248,81,73,0.2); --voc-glow: rgba(248,81,73,0.15); }
.char-profile[data-voc="paladin"]  { --voc: #3fb950; --voc-bg: rgba(63,185,80,0.08); --voc-border: rgba(63,185,80,0.2); --voc-glow: rgba(63,185,80,0.15); }
.char-profile[data-voc="sorcerer"] { --voc: #58a6ff; --voc-bg: rgba(88,166,255,0.08); --voc-border: rgba(88,166,255,0.2); --voc-glow: rgba(88,166,255,0.15); }
.char-profile[data-voc="druid"]    { --voc: #bc8cff; --voc-bg: rgba(188,140,255,0.08); --voc-border: rgba(188,140,255,0.2); --voc-glow: rgba(188,140,255,0.15); }
.char-profile[data-voc="monk"]     { --voc: #d29922; --voc-bg: rgba(210,153,34,0.08); --voc-border: rgba(210,153,34,0.2); --voc-glow: rgba(210,153,34,0.15); }
.char-profile[data-voc="none"]     { --voc: #8b949e; --voc-bg: rgba(139,148,158,0.08); --voc-border: rgba(139,148,158,0.2); --voc-glow: rgba(139,148,158,0.1); }

/* Strip content-box wrapper */
.content-box:has(.char-profile) {
	background: none;
	border: none;
	padding: 0;
	animation: none;
}

/* Also strip the underline animation on links inside char profile */
.content-box:has(.char-profile) a::after {
	display: none !important;
}

.char-profile {
	animation: cpFadeIn 0.4s ease;
}

@keyframes cpFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

/* --- Admin --- */
.cp-admin { text-align: right; margin-bottom: 6px; }
.cp-admin a {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	opacity: 0.7;
	transition: all 0.2s;
}
.cp-admin a:hover { opacity: 1; color: var(--voc, var(--accent)); }

/* ===== HERO BANNER ===== */
.cp-hero {
	position: relative;
	background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
	border: 1px solid var(--voc-border, var(--border-primary));
	border-radius: var(--radius-lg);
	padding: 32px;
	margin-bottom: 16px;
	overflow: hidden;
}

.cp-hero-glow {
	position: absolute;
	top: -50%;
	left: -10%;
	width: 50%;
	height: 200%;
	background: radial-gradient(ellipse, var(--voc-glow, rgba(255,69,0,0.08)) 0%, transparent 70%);
	pointer-events: none;
}

.cp-hero-inner {
	position: relative;
	display: flex;
	align-items: center;
	gap: 28px;
	z-index: 1;
}

/* --- Outfit --- */
.cp-outfit {
	position: relative;
	flex-shrink: 0;
}

.cp-outfit-frame {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	border: 3px solid var(--voc, var(--accent));
	background: radial-gradient(circle, var(--voc-bg, rgba(255,69,0,0.05)), var(--bg-primary) 70%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 0 30px var(--voc-glow, rgba(255,69,0,0.1)), inset 0 0 20px rgba(0,0,0,0.3);
}

.cp-outfit-img {
	width: 128px;
	height: 128px;
	image-rendering: pixelated;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
	margin-top: -24px;
	margin-left: -20px;
}

.cp-online-dot {
	position: absolute;
	bottom: 6px;
	right: 6px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #555;
	border: 3px solid var(--bg-secondary);
}

.cp-online-dot.online {
	background: var(--success);
	box-shadow: 0 0 8px rgba(63,185,80,0.6);
	animation: cpPulse 2s ease-in-out infinite;
}

@keyframes cpPulse {
	0%, 100% { box-shadow: 0 0 8px rgba(63,185,80,0.4); }
	50% { box-shadow: 0 0 16px rgba(63,185,80,0.8); }
}

/* --- Identity --- */
.cp-identity {
	flex: 1;
	min-width: 0;
}

.cp-name {
	font-size: 26px;
	font-weight: 800;
	color: #fff;
	margin: 0 0 10px 0;
	line-height: 1.2;
	text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.cp-name img {
	vertical-align: middle;
	margin-right: 4px;
}

/* --- Tags --- */
.cp-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.cp-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
}

.cp-tag img { width: 12px; height: 12px; }

.voc-tag {
	background: var(--voc-bg, rgba(255,69,0,0.1));
	color: var(--voc, var(--accent));
	border: 1px solid var(--voc-border, rgba(255,69,0,0.2));
}

.lvl-tag {
	background: rgba(255,255,255,0.04);
	color: var(--text-secondary);
	border: 1px solid rgba(255,255,255,0.06);
}

.skull-tag {
	background: rgba(248,81,73,0.15);
	color: #f85149;
	border: 1px solid rgba(248,81,73,0.25);
}

.online-tag {
	background: rgba(63,185,80,0.12);
	color: #3fb950;
	border: 1px solid rgba(63,185,80,0.2);
}

.prem-tag {
	background: rgba(210,153,34,0.1);
	color: #d29922;
	border: 1px solid rgba(210,153,34,0.2);
}

/* --- XP Bar --- */
.cp-xp {
	max-width: 420px;
}

.cp-xp-meta {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--text-muted);
	margin-bottom: 6px;
}

.cp-xp-bar {
	position: relative;
	height: 22px;
	background: rgba(0,0,0,0.4);
	border-radius: 11px;
	overflow: hidden;
	border: 1px solid rgba(255,255,255,0.06);
}

.cp-xp-fill {
	height: 100%;
	min-width: 0;
	background: linear-gradient(90deg, var(--voc, var(--accent)), color-mix(in srgb, var(--voc, var(--accent)) 70%, white));
	border-radius: 11px;
	position: relative;
	transition: width 0.8s ease;
}

.cp-xp-pct {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0,0,0,0.8);
	white-space: nowrap;
}

/* ===== STAT CARDS ===== */
.cp-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.cp-stat {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	transition: border-color 0.2s, transform 0.2s;
}

.cp-stat:hover {
	transform: translateY(-2px);
}

.cp-stat-icon {
	font-size: 22px;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	flex-shrink: 0;
}

.s-level .cp-stat-icon { background: var(--voc-bg, rgba(255,69,0,0.1)); color: var(--voc, var(--accent)); }
.s-hp .cp-stat-icon    { background: rgba(248,81,73,0.1); color: #f85149; }
.s-mp .cp-stat-icon    { background: rgba(88,166,255,0.1); color: #58a6ff; }
.s-magic .cp-stat-icon { background: rgba(188,140,255,0.1); color: #bc8cff; }

.s-level:hover { border-color: var(--voc-border, rgba(255,69,0,0.2)); }
.s-hp:hover    { border-color: rgba(248,81,73,0.3); }
.s-mp:hover    { border-color: rgba(88,166,255,0.3); }
.s-magic:hover { border-color: rgba(188,140,255,0.3); }

.cp-stat-val {
	font-size: 20px;
	font-weight: 800;
	color: var(--text-primary);
	line-height: 1;
}

.cp-stat-lbl {
	font-size: 11px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	margin-top: 2px;
}

/* ===== MAIN GRID ===== */
.cp-grid {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 16px;
	align-items: start;
}

/* ===== CARDS ===== */
.cp-card {
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 20px 22px;
	margin-bottom: 16px;
}

.cp-card-head {
	font-size: 13px;
	font-weight: 700;
	color: var(--text-primary);
	text-transform: uppercase;
	letter-spacing: 0.8px;
	padding-bottom: 12px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--border-secondary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.cp-card-icon {
	font-size: 16px;
	color: var(--voc, var(--accent));
}

/* ===== INFO TABLE ===== */
.cp-info {
	width: 100%;
	border-collapse: collapse;
}

.cp-info tr:nth-child(odd) td {
	background: rgba(255,255,255,0.015);
}

.cp-info tr:hover td {
	background: rgba(255,255,255,0.03);
}

.cp-info td {
	padding: 9px 12px;
	font-size: 13px;
	border: none;
	border-bottom: none;
}

.cp-k {
	color: var(--text-muted);
	font-weight: 500;
	width: 130px;
	white-space: nowrap;
}

.cp-v {
	color: var(--text-primary);
	text-align: right;
}

.cp-v a {
	color: var(--voc, var(--accent)) !important;
	text-decoration: none !important;
}

.cp-v a:hover {
	text-decoration: underline !important;
}

.cp-info-sm td {
	padding: 7px 10px;
	font-size: 12px;
}

.cp-info-sm .cp-k {
	width: 80px;
}

.cp-voc-text {
	color: var(--voc, var(--text-primary));
	font-weight: 600;
}

.c-online { color: var(--success); font-weight: 600; }
.c-off    { color: var(--text-primary); }
.c-prem   { color: #d29922; font-weight: 600; }
.c-del    { color: var(--danger); font-size: 11px; }
.c-ban    { color: var(--danger); font-size: 11px; }

/* ===== SKILLS ===== */
.cp-skills {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cp-skill-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 4px;
}

.cp-skill-name {
	font-size: 13px;
	color: var(--text-secondary);
	text-transform: capitalize;
}

.cp-skill-lvl {
	font-size: 14px;
	font-weight: 800;
	color: var(--text-primary);
	font-variant-numeric: tabular-nums;
}

.cp-skill-bar {
	height: 6px;
	background: rgba(255,255,255,0.04);
	border-radius: 3px;
	overflow: hidden;
}

.cp-skill-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--voc, var(--accent)), color-mix(in srgb, var(--voc, var(--accent)) 60%, white));
	border-radius: 3px;
	transition: width 0.5s ease;
}

/* ===== QUESTS ===== */
.cp-quests {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.cp-quest {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border-radius: 4px;
	font-size: 13px;
	color: var(--text-muted);
}

.cp-quest.done {
	color: var(--success);
	background: rgba(63,185,80,0.04);
}

.cp-quest img {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ===== DEATHS ===== */
.cp-deaths {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cp-death {
	padding: 10px 14px;
	border-radius: 6px;
	background: rgba(248,81,73,0.03);
	border-left: 3px solid var(--danger);
}

.cp-frag {
	background: rgba(63,185,80,0.03);
	border-left-color: var(--success);
}

.cp-death-when {
	display: block;
	font-size: 11px;
	color: var(--text-muted);
	margin-bottom: 3px;
}

.cp-death-what {
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.5;
}

.cp-death-what a {
	color: var(--voc, var(--accent)) !important;
	text-decoration: none !important;
}

.cp-death-what a:hover {
	text-decoration: underline !important;
}

.cp-unjust {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	background: rgba(248,81,73,0.15);
	color: var(--danger);
}

.cp-just {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	background: rgba(63,185,80,0.1);
	color: var(--success);
}

/* ===== EQUIPMENT - BODY GRID ===== */
.cp-eq-card {
	text-align: center;
}

.cp-equip {
	display: grid;
	grid-template-columns: 56px 56px 56px;
	grid-template-rows: 56px 56px 56px 56px;
	gap: 5px;
	justify-content: center;
	grid-template-areas:
		"amulet  helmet   backpack"
		"weapon  armor    shield"
		"ring    legs     ammo"
		".       boots    .";
	padding: 8px 0;
}

/* Named grid placement */
.eq-helmet   { grid-area: helmet; }
.eq-amulet   { grid-area: amulet; }
.eq-backpack { grid-area: backpack; }
.eq-armor    { grid-area: armor; }
.eq-weapon   { grid-area: weapon; }
.eq-shield   { grid-area: shield; }
.eq-legs     { grid-area: legs; }
.eq-boots    { grid-area: boots; }
.eq-ring     { grid-area: ring; }
.eq-ammo     { grid-area: ammo; }

/* Equipment slot base */
.eq-s {
	background: rgba(0,0,0,0.35);
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: all 0.2s;
	cursor: default;
}

/* Center column slots */
.eq-helmet,
.eq-armor,
.eq-legs,
.eq-boots {
	border-color: var(--voc-border, rgba(255,255,255,0.1));
}

.eq-s:hover {
	border-color: var(--voc, var(--accent));
	box-shadow: 0 0 10px var(--voc-glow, rgba(255,69,0,0.12));
	z-index: 2;
}

/* Tooltip label on hover */
.eq-s::after {
	content: attr(data-tip);
	position: absolute;
	top: -22px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 9px;
	font-weight: 600;
	color: var(--text-primary);
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
	z-index: 5;
}

.eq-s:hover::after {
	opacity: 1;
}

.eq-s img {
	max-width: 32px;
	max-height: 32px;
	image-rendering: pixelated;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* ===== CHARACTER LIST ===== */
.cp-chars {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.cp-char {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 6px;
	text-decoration: none !important;
	color: var(--text-secondary);
	font-size: 13px;
	transition: all 0.15s;
	border: 1px solid transparent;
}

.cp-char:hover {
	background: rgba(255,255,255,0.03);
	color: var(--text-primary);
	border-color: var(--border-secondary);
}

.cp-char.active {
	background: var(--voc-bg, rgba(255,69,0,0.06));
	color: var(--voc, var(--accent));
	border-color: var(--voc-border, rgba(255,69,0,0.15));
	font-weight: 600;
}

.cp-char-name { flex: 1; }

.cp-char-info {
	font-size: 11px;
	color: var(--text-muted);
	white-space: nowrap;
}

.cp-char-on {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--success);
	flex-shrink: 0;
	box-shadow: 0 0 4px rgba(63,185,80,0.5);
}

/* ===== SIGNATURE ===== */
.cp-sig {
	margin-top: 16px;
}

.cp-sig-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.cp-sig-img {
	max-width: 100%;
	border-radius: 4px;
}

.cp-sig-btn {
	background: none;
	border: 1px solid var(--border-primary);
	color: var(--text-muted);
	padding: 5px 14px;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s;
}

.cp-sig-btn:hover {
	color: var(--voc, var(--accent));
	border-color: var(--voc, var(--accent));
}

.cp-sig-links { display: none; width: 100%; }
.cp-sig-links.show { display: block; }

.cp-sig-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.cp-sig-row label {
	font-size: 11px;
	color: var(--text-muted);
	min-width: 50px;
	font-weight: 600;
}

.cp-sig-row input {
	flex: 1;
	background: var(--bg-primary);
	border: 1px solid var(--border-secondary);
	color: var(--text-secondary);
	padding: 5px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-family: var(--font-mono);
}

/* ===== SEARCH ===== */
.cp-search-wrap {
	margin-top: 16px;
}

.char-search-form {
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-md);
	padding: 16px 20px;
}

.char-search-inner {
	display: flex;
}

.char-search-row {
	display: flex;
	gap: 8px;
	width: 100%;
}

.char-search-input {
	flex: 1;
	padding: 10px 14px;
	background: var(--bg-primary);
	border: 1px solid var(--border-primary);
	border-radius: var(--radius-sm);
	color: var(--text-primary);
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s;
}

.char-search-input:focus {
	border-color: var(--voc, var(--accent));
}

.char-search-input::placeholder {
	color: var(--text-muted);
}

.char-search-btn {
	padding: 10px 18px;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius-sm);
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: background 0.2s;
}

.char-search-btn:hover {
	background: var(--accent-hover);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
	.cp-grid {
		grid-template-columns: 1fr;
	}

	.cp-right {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}

	.cp-right .cp-card {
		margin-bottom: 0;
	}
}

@media (max-width: 768px) {
	.cp-hero {
		padding: 20px;
	}

	.cp-hero-inner {
		flex-direction: column;
		text-align: center;
		gap: 16px;
	}

	.cp-tags {
		justify-content: center;
	}

	.cp-xp {
		max-width: 100%;
	}

	.cp-xp-meta {
		justify-content: center;
		gap: 16px;
	}

	.cp-right {
		grid-template-columns: 1fr;
	}

	.cp-quests {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.cp-hero {
		padding: 16px;
		border-radius: var(--radius-md);
	}

	.cp-name {
		font-size: 20px;
	}

	.cp-outfit-frame {
		width: 120px;
		height: 120px;
	}

	.cp-card {
		padding: 14px 16px;
	}

	.cp-stat {
		padding: 10px 12px;
	}

	.cp-stat-icon {
		width: 36px;
		height: 36px;
		font-size: 18px;
	}

	.cp-stat-val {
		font-size: 17px;
	}

	.cp-info td {
		display: block;
		text-align: left !important;
		padding: 3px 10px;
	}

	.cp-k {
		width: auto;
		font-size: 11px;
		padding-bottom: 0 !important;
	}

	.cp-v {
		text-align: left;
		padding-top: 0 !important;
		padding-bottom: 8px !important;
		border-bottom: 1px solid var(--border-secondary);
	}

	.cp-info tr:last-child .cp-v {
		border-bottom: none;
	}

	.cp-equip {
		grid-template-columns: 48px 48px 48px;
		grid-template-rows: 48px 48px 48px 48px;
		gap: 4px;
	}
}

/* ===== END CHARACTER PROFILE ===== */

/* ============================================
   AUDIT PASS 3 - MOBILE, UX, POLISH
   ============================================ */

/* --- Mobile Nav Actions (visible inside hamburger menu) --- */
.nav-actions-mobile {
	display: none;
}

@media (max-width: 768px) {
	/* Show mobile actions inside the hamburger menu */
	.nav-links.mobile-open .nav-actions-mobile {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding-top: 16px;
		border-top: 1px solid var(--border-primary);
		margin-top: 8px;
	}

	.nav-links.mobile-open .nav-actions-mobile .btn {
		width: 100%;
		justify-content: center;
		min-height: 44px;
	}
}

/* Hide mobile actions on desktop (always hidden outside hamburger) */
@media (min-width: 769px) {
	.nav-actions-mobile {
		display: none !important;
	}
}

/* --- Focus-visible styles for keyboard navigation --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.nav-dropdown-item:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* --- Skip-to-content link (accessibility) --- */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	background: var(--accent);
	color: #fff;
	padding: 8px 16px;
	z-index: 10000;
	font-weight: 600;
	font-size: 14px;
	border-radius: 0 0 var(--radius-sm) 0;
	transition: top 0.2s;
}

.skip-link:focus {
	top: 0;
}

/* --- Fix table display:block on mobile (preserve table semantics) --- */
@media (max-width: 768px) {
	/* Use wrapper-based scroll instead of display:block on table */
	.content-box table {
		display: table;
		min-width: 100%;
	}

	/* Wrap tables in a scrollable container via CSS */
	.content-box {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Keep the character profile info table stacked */
	.cp-info {
		display: table;
	}
}

/* --- Improved text overflow handling --- */
.cp-death-what,
.cp-v,
.player-cell-name,
.top-player-name,
.gl-desc,
.fb-title {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* --- Z-index stacking fix for dropdowns and modals --- */
.navbar {
	z-index: 1000;
}

.nav-dropdown-menu {
	z-index: 1001;
}

.nav-links.mobile-open {
	z-index: 999;
}

/* Ensure modal overlays appear above everything */
.modal-overlay,
.modal-backdrop,
[class*="modal"] {
	z-index: 2000;
}

/* --- Highscores table mobile improvements --- */
@media (max-width: 768px) {
	.rankings-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.rankings-table thead,
	.rankings-table tbody,
	.rankings-table tr {
		display: table;
		width: 100%;
		table-layout: fixed;
	}

	.rankings-table thead {
		display: table-header-group;
	}

	.rankings-table tbody {
		display: table-row-group;
	}
}

/* --- Forum boards 320px small phone --- */
@media (max-width: 480px) {
	.fb-row > .fb-stat,
	.fb-row > .fb-lastpost {
		padding-left: 0 !important;
	}

	.ft-title {
		font-size: 16px !important;
	}

	.ft-author-outfit {
		width: 32px !important;
		height: 32px !important;
	}
}

/* --- Guild list 480px improvements --- */
@media (max-width: 480px) {
	.gl-card {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 16px 12px !important;
	}

	.gl-logo {
		margin-bottom: 4px;
	}

	.gv-info-grid {
		grid-template-columns: 1fr !important;
	}

	.gv-members-table th:nth-child(3),
	.gv-members-table td:nth-child(3),
	.gv-members-table th:nth-child(4),
	.gv-members-table td:nth-child(4) {
		display: none;
	}
}

/* --- 320px extra-small phone fixes --- */
@media (max-width: 360px) {
	.cp-equip {
		grid-template-columns: 44px 44px 44px;
		grid-template-rows: 44px 44px 44px 44px;
		gap: 3px;
	}

	.cp-stat {
		padding: 8px 10px;
		gap: 8px;
	}

	.cp-stat-icon {
		width: 32px;
		height: 32px;
		font-size: 16px;
		border-radius: 8px;
	}

	.cp-stat-val {
		font-size: 15px;
	}

	.cp-name {
		font-size: 18px;
	}

	.cp-tag {
		padding: 3px 8px;
		font-size: 10px;
	}

	/* Login/create form tighter padding */
	.login-card,
	.create-card {
		padding: 16px !important;
	}

	.login-header h2,
	.create-header h2 {
		font-size: 18px;
	}
}

/* --- Account management page mobile fixes --- */
@media (max-width: 768px) {
	.content-box table.TableContent input[type="text"],
	.content-box table.TableContent input[type="password"],
	.content-box table.TableContent input[type="email"],
	.content-box table.TableContent select {
		max-width: 100% !important;
	}

	/* Stack label + value vertically on narrow screens */
	.LabelV,
	.LabelV150 {
		display: block !important;
		width: 100% !important;
		padding-bottom: 2px !important;
	}
}

/* --- News archive page responsive --- */
@media (max-width: 480px) {
	.NewsHeadlineBackground {
		flex-direction: column;
		gap: 4px;
	}

	.NewsHeadlineText {
		font-size: 16px;
		min-width: 0;
	}
}

/* --- Improved button hover states (all buttons get lift effect) --- */
.btn:hover {
	transform: translateY(-1px);
}

.btn:active {
	transform: translateY(0);
}

/* Ghost button hover improvement */
.btn-ghost:hover {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	box-shadow: var(--shadow-sm);
}

/* --- Download card icon animation --- */
.download-card:hover svg {
	transform: translateY(-2px);
	transition: transform 0.2s ease;
}

/* --- Sidebar widget link hover consistency --- */
.quick-link:hover {
	transform: translateX(4px);
	transition: all 0.2s ease;
}

/* --- Rate item hover glow --- */
.rate-item:hover {
	border-color: var(--accent);
	box-shadow: 0 0 8px var(--accent-glow);
}

/* --- Character profile: outfit image fine-tuning --- */
/* The outfit sprite is 128x128 but the actual character is offset from top-left.
   Centering adjustments to place the character visually in the ring frame. */
.cp-outfit-frame {
	overflow: hidden;
}

/* --- Print: hide more non-essential elements --- */
@media print {
	.hero,
	.content-sidebar,
	.cp-search-wrap,
	.cp-sig {
		display: none;
	}

	.content-grid {
		grid-template-columns: 1fr !important;
	}

	.cp-grid {
		grid-template-columns: 1fr !important;
	}
}

/* v9 - audit pass 3 */
/* v9 */

/* ============================================
   ERROR PAGES (404, 500)
   ============================================ */
.error-page {
    text-align: center;
    padding: 48px 16px;
    max-width: 560px;
    margin: 0 auto;
}

.error-icon {
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0.9;
}

.error-icon-danger {
    color: var(--danger);
}

.error-code {
    font-size: 72px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-icon-danger + .error-code {
    background: linear-gradient(135deg, var(--danger), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
}

.error-message {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.error-detail {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 15px;
}

.error-detail code {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    border: 1px solid var(--border-primary);
    word-break: break-all;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
