/* ============================================
   INFINITY2 PREMIUM REDESIGN
   Solaris-inspired layout with Infinity2 blue-purple theme
   ============================================ */

/* ============================================
   0. PRELOADER OVERLAY - Global
   ============================================ */
.preloader-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
	            visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1),
	            transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	pointer-events: auto;
	overflow: hidden;
}

.preloader-overlay.hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: scale(1.05);
}

/* Background Image */
.preloader-bg {
	position: absolute;
	inset: 0;
	background-image: url('../img/backgroundos.png');
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	opacity: 0.15;
	z-index: 0;
}

/* Dark Overlay + Nebula Glow */
.preloader-overlay-gradient {
	position: absolute;
	inset: 0;
	background: 
		radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.2) 0%, transparent 60%),
		linear-gradient(
			to bottom,
			rgba(10, 14, 26, 0.85) 0%,
			rgba(10, 14, 26, 0.90) 50%,
			rgba(10, 14, 26, 0.85) 100%
		);
	z-index: 1;
}

/* Loader Card - Glass Effect */
.preloader-card {
	position: relative;
	z-index: 2;
	background: var(--bg-glass);
	backdrop-filter: var(--blur-md);
	-webkit-backdrop-filter: var(--blur-md);
	border: 1px solid var(--border-accent);
	border-radius: var(--radius-lg);
	padding: 40px 50px;
	box-shadow: 
		0 8px 32px rgba(0, 0, 0, 0.5),
		0 0 40px rgba(138, 43, 226, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 30px;
	text-align: center;
	animation: preloaderCardFadeIn 0.5s ease-out;
}

@keyframes preloaderCardFadeIn {
	from {
		opacity: 0;
		transform: translateY(-20px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Logo */
.preloader-logo {
	width: 120px;
	height: auto;
	opacity: 0.9;
	animation: preloaderLogoPulse 2s ease-in-out infinite;
}

.preloader-logo img {
	width: 100%;
	height: auto;
	filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.5));
}

@keyframes preloaderLogoPulse {
	0%, 100% {
		opacity: 0.9;
		transform: scale(1);
	}
	50% {
		opacity: 1;
		transform: scale(1.05);
	}
}

/* Loading Bars Container */
.preloader-bars {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 12px;
	height: 60px;
}

/* Individual Bar */
.preloader-bar {
	width: 12px;
	height: 40px;
	background: linear-gradient(
		to top,
		var(--accent-primary) 0%,
		var(--accent-secondary) 100%
	);
	border-radius: 6px;
	box-shadow: 
		0 0 20px rgba(138, 43, 226, 0.6),
		0 0 40px rgba(79, 89, 177, 0.4),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	animation: preloaderBarBounce 1.2s ease-in-out infinite;
	transform-origin: bottom center;
}

@keyframes preloaderBarBounce {
	0%, 100% {
		height: 20px;
		opacity: 0.6;
		transform: scaleY(0.5);
	}
	50% {
		height: 60px;
		opacity: 1;
		transform: scaleY(1);
	}
}

/* Loading Text */
.preloader-text {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
	text-transform: uppercase;
	letter-spacing: 2px;
	opacity: 0.9;
	text-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
	animation: preloaderTextPulse 2s ease-in-out infinite;
}

@keyframes preloaderTextPulse {
	0%, 100% {
		opacity: 0.7;
	}
	50% {
		opacity: 1;
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.preloader-overlay {
		transition: opacity 0.3s ease, visibility 0.3s ease;
	}
	
	.preloader-card {
		animation: none;
	}
	
	.preloader-logo {
		animation: none;
	}
	
	.preloader-bar {
		animation: preloaderBarBounceReduced 1.5s ease-in-out infinite;
	}
	
	.preloader-text {
		animation: none;
		opacity: 1;
	}
}

@keyframes preloaderBarBounceReduced {
	0%, 100% {
		opacity: 0.5;
	}
	50% {
		opacity: 1;
	}
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.preloader-card {
		padding: 30px 35px;
		gap: 25px;
	}
	
	.preloader-logo {
		width: 100px;
	}
	
	.preloader-bars {
		height: 50px;
		gap: 10px;
	}
	
	.preloader-bar {
		width: 10px;
	}
	
	.preloader-text {
		font-size: 14px;
		letter-spacing: 1px;
	}
}

/* Reset */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	background: var(--bg-secondary);
	color: var(--text-primary);
	font-family: "Open Sans", sans-serif;
}

/* ============================================
   CSS VARIABLES - Infinity2 Theme
   ============================================ */
:root {
	--bg-primary: #0a0e1a;
	--bg-secondary: #0f1525;
	--bg-panel: rgba(15, 21, 37, 0.8);
	--bg-glass: rgba(10, 14, 26, 0.6);
	--border-color: rgba(79, 89, 177, 0.3);
	--border-accent: rgba(138, 43, 226, 0.5);
	--accent-primary: #8a2be2; /* Lila */
	--accent-secondary: #4f59b1; /* Kék */
	--text-primary: #ffffff;
	--text-secondary: rgba(255, 255, 255, 0.8);
	--text-muted: rgba(255, 255, 255, 0.6);
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--blur-sm: blur(10px);
	--blur-md: blur(15px);
}

/* ============================================
   1. HERO SZEKCIÓ - FULL-BLEED
   ============================================ */
.hero-section {
	position: relative;
	width: 100vw;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	height: 100vh;
	min-height: 600px;
	max-height: 100vh;
	overflow: hidden;
	background: var(--bg-primary);
	z-index: 1;
}

/* Hero Video */
.hero-section .hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	z-index: 0;
	pointer-events: none;
}

/* Hero Overlay - Gradient */
.hero-section::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.75) 0%,
		rgba(0, 0, 0, 0.4) 30%,
		rgba(0, 0, 0, 0.2) 50%,
		rgba(0, 0, 0, 0.3) 70%,
		rgba(0, 0, 0, 0.7) 100%
	);
	z-index: 1;
	pointer-events: none;
}

/* Top Navigation - Glass Menu */
.hero-nav {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100%;
	max-width: 1400px;
	padding: 20px 40px;
	z-index: 10;
	background: var(--bg-glass);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	border-bottom: 1px solid var(--border-color);
}

.hero-nav-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 40px;
}

.hero-nav a {
	color: var(--text-secondary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 8px 16px;
	border-radius: var(--radius-sm);
	transition: all 0.3s ease;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-nav a:hover,
.hero-nav a.active {
	color: var(--text-primary);
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

/* Hero Content - Center */
.hero-content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 5;
	text-align: center;
	width: 100%;
	max-width: 800px;
	padding: 0 20px;
}

.hero-logo {
	margin-bottom: 30px;
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
}

.hero-logo img {
	max-width: 300px;
	height: auto;
}

.hero-tagline {
	font-size: 20px;
	color: var(--text-secondary);
	margin-bottom: 40px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
	font-weight: 300;
	letter-spacing: 1px;
}

.hero-cta {
	display: flex;
	gap: 20px;
	justify-content: center;
	flex-wrap: wrap;
}

/* CTA Buttons */
.btn-hero-primary,
.btn-hero-secondary {
	padding: 16px 40px;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	border-radius: var(--radius-md);
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
	box-shadow: var(--shadow-md);
}

.btn-hero-primary {
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	color: var(--text-primary);
}

.btn-hero-primary:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
	background: linear-gradient(135deg, #9a3af2, #5f69c1);
}

.btn-hero-secondary {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	color: var(--text-primary);
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-2px);
}

/* ============================================
   2. STAT STRIP - 4 Stat Blocks
   ============================================ */
.stat-strip {
	position: relative;
	width: 100vw;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background: var(--bg-glass);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	padding: 30px 20px;
	z-index: 2;
}

.stat-strip-container {
	max-width: 1400px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
}

.stat-block {
	text-align: center;
	padding: 20px;
	border-radius: var(--radius-md);
	background: rgba(15, 21, 37, 0.4);
	border: 1px solid var(--border-color);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.stat-block::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.1), transparent);
	transition: left 0.5s ease;
}

.stat-block:hover::before {
	left: 100%;
}

.stat-block:hover {
	border-color: var(--border-accent);
	box-shadow: 0 4px 20px rgba(138, 43, 226, 0.3);
	transform: translateY(-4px);
}

.stat-icon {
	font-size: 32px;
	color: var(--accent-primary);
	margin-bottom: 12px;
	display: block;
}

.stat-number {
	font-size: 36px;
	font-weight: 700;
	color: var(--text-primary);
	margin-bottom: 8px;
	display: block;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
	font-size: 14px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 500;
}

/* ============================================
   3. LANGUAGE SELECTOR - Pill Container
   ============================================ */
.language-bar {
	position: relative;
	width: 100vw;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	padding: 20px;
	z-index: 2;
	background: var(--bg-secondary);
	border-top: 1px solid var(--border-color);
}

.language-container {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	justify-content: center;
	align-items: center;
}

.language-pill {
	background: var(--bg-glass);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	border: 1px solid var(--border-color);
	border-radius: 50px;
	padding: 12px 24px;
	box-shadow: var(--shadow-sm);
}

.language-pill ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.language-pill li {
	margin: 0;
	padding: 0;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.language-pill li:hover {
	transform: translateY(-4px) scale(1.1);
	filter: drop-shadow(0 4px 12px rgba(138, 43, 226, 0.5));
}

.language-pill li a {
	display: block;
}

.language-pill li a img {
	width: 40px;
	height: auto;
	border-radius: 4px;
	opacity: 0.85;
	transition: opacity 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.language-pill li:hover a img {
	opacity: 1;
	box-shadow: 0 4px 16px rgba(138, 43, 226, 0.4);
}

/* ============================================
   4. MAIN CONTENT - 3 Column Grid
   ============================================ */
.main-content {
	position: relative;
	width: 100vw;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	background: var(--bg-secondary);
	padding: 60px 20px;
	z-index: 2;
	/* Background Image */
	background-image: url('../img/backgroundos.png');
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: fixed; /* Smooth scroll effect */
}

/* Background Overlay - Dark gradient for readability */
.main-content::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(10, 14, 26, 0.65) 0%,
		rgba(10, 14, 26, 0.55) 50%,
		rgba(10, 14, 26, 0.65) 100%
	);
	z-index: 0;
	pointer-events: none;
}

/* Ensure content stays above overlay */
.main-content > * {
	position: relative;
	z-index: 1;
}

.main-grid {
	max-width: 1400px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 320px 1fr 320px;
	gap: 30px;
}

/* ============================================
   5. CARD COMPONENT SYSTEM
   ============================================ */
.card {
	background: var(--bg-panel);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 0;
	margin-bottom: 30px;
	box-shadow: var(--shadow-md);
	overflow: hidden;
	transition: all 0.3s ease;
}

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

.card-header {
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-color);
	background: rgba(138, 43, 226, 0.1);
}

.card-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text-primary);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.card-body {
	padding: 24px;
}

/* ============================================
   6. LOGIN CARD
   ============================================ */
.login-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.login-form label {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.login-form label span {
	font-size: 12px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.login-form input {
	padding: 12px 16px;
	background: rgba(10, 14, 26, 0.6);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-sm);
	color: var(--text-primary);
	font-size: 14px;
	transition: all 0.3s ease;
}

.login-form input:focus {
	outline: none;
	border-color: var(--accent-primary);
	box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

.login-form button {
	padding: 14px 24px;
	background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
	border: none;
	border-radius: var(--radius-sm);
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-top: 8px;
}

.login-form button:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.login-links {
	margin-top: 16px;
	text-align: center;
	font-size: 13px;
}

.login-links a {
	color: var(--accent-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}

.login-links a:hover {
	color: var(--accent-secondary);
}

/* ============================================
   7. RANKING TABLES
   ============================================ */
.ranking-table {
	width: 100%;
	border-collapse: collapse;
}

.ranking-table thead {
	background: rgba(138, 43, 226, 0.1);
	border-bottom: 1px solid var(--border-color);
}

.ranking-table th {
	padding: 12px 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
	text-align: left;
}

.ranking-table tbody tr {
	border-bottom: 1px solid rgba(79, 89, 177, 0.1);
	transition: background 0.3s ease;
}

.ranking-table tbody tr:hover {
	background: rgba(138, 43, 226, 0.05);
}

.ranking-table td {
	padding: 12px 8px;
	font-size: 14px;
	color: var(--text-secondary);
}

.ranking-table .rank-number {
	font-weight: 700;
	color: var(--accent-primary);
	width: 40px;
}

.ranking-table .rank-name {
	font-weight: 500;
	color: var(--text-primary);
}

.ranking-table .rank-empire {
	width: 80px;
}

.ranking-table .rank-level {
	text-align: right;
	font-weight: 600;
	color: var(--accent-secondary);
}

/* ============================================
   8. NEWS CARDS
   ============================================ */
.news-card {
	margin-bottom: 30px;
	transition: all 0.3s ease;
}

.news-card:hover {
	transform: translateY(-4px);
}

.news-date {
	font-size: 12px;
	color: var(--text-muted);
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.news-title {
	font-size: 20px;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 12px;
	line-height: 1.4;
}

.news-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

.news-title a:hover {
	color: var(--accent-primary);
}

.news-excerpt {
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.6;
	margin-bottom: 16px;
}

.news-read-more {
	display: inline-block;
	padding: 8px 20px;
	background: rgba(138, 43, 226, 0.2);
	border: 1px solid var(--border-accent);
	border-radius: var(--radius-sm);
	color: var(--accent-primary);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: all 0.3s ease;
}

.news-read-more:hover {
	background: rgba(138, 43, 226, 0.3);
	transform: translateX(4px);
}

/* ============================================
   9. STATISTICS TABLE
   ============================================ */
.stats-table {
	width: 100%;
	border-collapse: collapse;
}

.stats-table tr {
	border-bottom: 1px solid rgba(79, 89, 177, 0.1);
}

.stats-table th,
.stats-table td {
	padding: 12px 8px;
	font-size: 14px;
}

.stats-table th {
	text-align: left;
	color: var(--text-muted);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.5px;
}

.stats-table td {
	text-align: right;
	color: var(--text-primary);
	font-weight: 600;
	font-size: 16px;
}

/* ============================================
   10. RESPONSIVE DESIGN
   ============================================ */

/* Mobile: Stronger overlay for better readability */
@media (max-width: 1023px) {
	.main-content::before {
		background: linear-gradient(
			to bottom,
			rgba(10, 14, 26, 0.75) 0%,
			rgba(10, 14, 26, 0.70) 50%,
			rgba(10, 14, 26, 0.75) 100%
		);
	}
	
	/* Disable fixed attachment on mobile for better performance */
	.main-content {
		background-attachment: scroll;
	}
}

/* Tablet: Medium overlay */
@media (min-width: 1024px) and (max-width: 1919px) {
	.main-content::before {
		background: linear-gradient(
			to bottom,
			rgba(10, 14, 26, 0.60) 0%,
			rgba(10, 14, 26, 0.50) 50%,
			rgba(10, 14, 26, 0.60) 100%
		);
	}
}

/* Tablet (1024px - 1919px) */
@media (max-width: 1919px) {
	.hero-section {
		height: 80vh;
		min-height: 500px;
	}
	
	.main-grid {
		grid-template-columns: 280px 1fr 280px;
		gap: 20px;
	}
	
	.stat-strip-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

/* Mobile (max 1023px) */
@media (max-width: 1023px) {
	.hero-section {
		height: 70vh;
		min-height: 400px;
	}
	
	.hero-nav-container {
		flex-wrap: wrap;
		gap: 15px;
	}
	
	.hero-logo img {
		max-width: 200px;
	}
	
	.hero-tagline {
		font-size: 16px;
		margin-bottom: 30px;
	}
	
	.hero-cta {
		flex-direction: column;
		align-items: center;
	}
	
	.btn-hero-primary,
	.btn-hero-secondary {
		width: 100%;
		max-width: 300px;
	}
	
	.stat-strip-container {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.main-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}
	
	.language-pill ul {
		gap: 8px;
	}
	
	.language-pill li a img {
		width: 35px;
	}
	
	/* News responsive */
	.news-content-wrapper {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.news-image-container {
		max-width: 100%;
		aspect-ratio: 16/9;
	}
	
	.news-single .news-title {
		font-size: 20px;
	}
	
	.news-meta {
		font-size: 12px;
	}
}

/* Ultrawide (2560px+) */
@media (min-width: 2560px) {
	.hero-section {
		max-height: 1080px;
	}
	
	.main-grid {
		max-width: 1600px;
		grid-template-columns: 360px 1fr 360px;
	}
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.hero-section .hero-video {
		display: none !important;
	}
	
	* {
		transition: none !important;
		animation: none !important;
	}
}

/* ============================================
   11. COMPATIBILITY WITH OLD STRUCTURE
   ============================================ */
/* Old box-sm-v1 compatibility */
.box-sm-v1 {
	background: var(--bg-panel);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 0;
	margin-bottom: 30px;
	box-shadow: var(--shadow-md);
	overflow: hidden;
}

.box-sm-v1 .heading {
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-color);
	background: rgba(138, 43, 226, 0.1);
}

.box-sm-v1 .heading h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text-primary);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.box-sm-v1 .inner {
	padding: 24px;
}

/* Old ranking table compatibility */
.pix-tab {
	display: table;
	width: 100%;
	border-collapse: collapse;
}

.pix-tab.p-thead {
	background: rgba(138, 43, 226, 0.1);
	border-bottom: 1px solid var(--border-color);
}

.pix-tab.p-thead > div {
	display: table-cell;
	padding: 12px 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.pix-tab.p-tbody .lane {
	display: table-row;
	border-bottom: 1px solid rgba(79, 89, 177, 0.1);
	transition: background 0.3s ease;
	text-decoration: none;
	color: inherit;
}

.pix-tab.p-tbody .lane:hover {
	background: rgba(138, 43, 226, 0.05);
}

.pix-tab.p-tbody .lane > div {
	display: table-cell;
	padding: 12px 8px;
	font-size: 14px;
	color: var(--text-secondary);
	vertical-align: middle;
}

.pix-tab .order {
	font-weight: 700;
	color: var(--accent-primary);
	width: 40px;
}

.pix-tab .username {
	font-weight: 500;
	color: var(--text-primary);
}

.pix-tab .kingdom {
	width: 80px;
}

.pix-tab .level {
	text-align: right;
	font-weight: 600;
	color: var(--accent-secondary);
}

/* Old newsfeed compatibility */
.newsfeed {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.news-single {
	background: var(--bg-panel);
	backdrop-filter: var(--blur-sm);
	-webkit-backdrop-filter: var(--blur-sm);
	border: 1px solid var(--border-color);
	border-radius: var(--radius-md);
	padding: 0;
	box-shadow: var(--shadow-md);
	transition: all 0.3s ease;
	margin-bottom: 30px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.news-single:hover {
	border-color: var(--border-accent);
	box-shadow: var(--shadow-lg);
	transform: translateY(-2px);
}

/* News Header */
.news-header {
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-color);
	background: rgba(138, 43, 226, 0.05);
}

.news-title-wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.news-single .news-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.4;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.news-single .news-title a {
	color: var(--text-primary);
	text-decoration: none;
	transition: color 0.3s ease;
	flex: 1;
}

.news-single .news-title a:hover {
	color: var(--accent-primary);
}

.news-admin-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.news-admin-actions a {
	color: var(--text-muted);
	font-size: 16px;
	transition: color 0.3s ease;
	text-decoration: none;
}

.news-admin-actions a:hover {
	color: var(--accent-primary);
}

.news-admin-actions a[onclick]:hover {
	color: #ff6b6b;
}

.news-meta {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 13px;
	color: var(--text-muted);
	flex-wrap: wrap;
}

.news-author {
	color: var(--accent-secondary);
	font-weight: 600;
}

.news-date {
	color: var(--text-muted);
}

.news-time {
	opacity: 0.8;
}

/* News Content Wrapper - Grid Layout */
.news-content-wrapper {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 24px;
	padding: 24px;
	align-items: start;
}

/* News Image Container */
.news-image-container {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--bg-secondary);
	border: 1px solid var(--border-color);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	flex-shrink: 0;
}

.news-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: var(--radius-md);
	transition: transform 0.3s ease;
}

.news-single:hover .news-image {
	transform: scale(1.05);
}

/* News Text Content */
.news-text-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0; /* Prevents flex item overflow */
}

.news-content-image {
	margin: 0 0 16px 0;
	text-align: center;
}

.news-content-image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-color);
}

.news-excerpt {
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.7;
}

.news-excerpt p {
	margin: 0 0 12px 0;
}

.news-excerpt p:last-child {
	margin-bottom: 0;
}

.news-read-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(79, 89, 177, 0.15));
	border: 1px solid var(--border-accent);
	border-radius: var(--radius-sm);
	color: var(--accent-primary);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
	align-self: flex-start;
	margin-top: 8px;
}

.news-read-more:hover {
	background: linear-gradient(135deg, rgba(138, 43, 226, 0.3), rgba(79, 89, 177, 0.25));
	transform: translateX(4px);
	box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3);
}

.news-read-more i {
	font-size: 12px;
	transition: transform 0.3s ease;
}

.news-read-more:hover i {
	transform: translateX(2px);
}

/* Old stats-box compatibility */
.stats-box table {
	width: 100%;
	border-collapse: collapse;
}

.stats-box table tr {
	border-bottom: 1px solid rgba(79, 89, 177, 0.1);
}

.stats-box table th,
.stats-box table td {
	padding: 12px 8px;
	font-size: 14px;
}

.stats-box table th {
	text-align: left;
	color: var(--text-muted);
	font-weight: 500;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: 0.5px;
	background-image: none !important;
	background-repeat: no-repeat !important;
}

.stats-box table td {
	text-align: right;
	color: var(--text-primary);
	font-weight: 600;
	font-size: 16px;
	background-image: none !important;
	background-repeat: no-repeat !important;
}

