/* ========================================
   RC.LV — Remote RC Car Platform
   Gaming / Tech SaaS design
   ======================================== */

:root {
	--bg: #0b0b0f;
	--surface: rgba(255, 255, 255, 0.03);
	--surface-hover: rgba(255, 255, 255, 0.06);
	--glass: rgba(255, 255, 255, 0.05);
	--glass-border: rgba(255, 255, 255, 0.08);
	--glass-border-hover: rgba(255, 255, 255, 0.18);
	--primary: #00ff88;
	--primary-rgb: 0, 255, 136;
	--accent: #7c3aed;
	--accent-rgb: 124, 58, 237;
	--cyan: #00d4ff;
	--cyan-rgb: 0, 212, 255;
	--danger: #ff3366;
	--warning: #ffaa00;
	--text: #f0f0f0;
	--text-2: #b0b0b0;
	--text-3: #707070;
	--text-4: #404040;
	--font-h: 'Orbitron', 'Arial Black', sans-serif;
	--font: 'Inter', 'Segoe UI', system-ui, sans-serif;
	--r: 16px;
	--r-lg: 24px;
	--r-pill: 50px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	padding-top: 80px;
	-webkit-font-smoothing: antialiased;
}
body.fullscreen-mode { padding-top: 0; overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-h);
	font-weight: 700;
	letter-spacing: 0.5px;
	line-height: 1.2;
}
a { color: var(--text); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); text-decoration: none; }
img { max-width: 100%; }

.text-glow {
	color: var(--primary);
	text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.4);
}

.section { padding: 100px 0; }

.section-label {
	font-family: var(--font-h);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--primary);
	margin-bottom: 14px;
	display: block;
	text-align: center;
}

.section-title {
	font-size: 2.2rem;
	text-align: center;
	margin-bottom: 60px;
	font-weight: 800;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn-rc {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, var(--primary), var(--cyan));
	color: #000;
	border: none;
	padding: 15px 38px;
	border-radius: var(--r-pill);
	font-family: var(--font-h);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
	position: relative;
	overflow: hidden;
}
.btn-rc::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent);
	opacity: 0;
	transition: opacity 0.3s;
}
.btn-rc:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.35);
	color: #000;
	text-decoration: none;
}
.btn-rc:hover::before { opacity: 1; }
.btn-rc span { position: relative; z-index: 1; }

.btn-rc-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: transparent;
	color: var(--text);
	border: 1.5px solid var(--glass-border-hover);
	padding: 14px 38px;
	border-radius: var(--r-pill);
	font-family: var(--font-h);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
}
.btn-rc-outline:hover {
	border-color: var(--primary);
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.06);
	box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.15);
	transform: translateY(-2px);
	text-decoration: none;
}
.btn-rc-outline span { position: relative; z-index: 1; }

.btn-rc-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: rgba(var(--accent-rgb), 0.15);
	color: #c4b5fd;
	border: 1.5px solid rgba(var(--accent-rgb), 0.3);
	padding: 14px 38px;
	border-radius: var(--r-pill);
	font-family: var(--font-h);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 0.3s;
	text-decoration: none;
}
.btn-rc-secondary:hover {
	background: rgba(var(--accent-rgb), 0.25);
	border-color: var(--accent);
	box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
	color: #ddd6fe;
	transform: translateY(-2px);
	text-decoration: none;
}
.btn-rc-secondary span { position: relative; z-index: 1; }

.btn-sm { padding: 10px 28px; font-size: 0.7rem; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */

.navbar {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: 72px;
	background: rgba(11, 11, 15, 0.6);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	z-index: 1000;
	border-bottom: 1px solid var(--glass-border);
	transition: background 0.3s;
}
.navbar.scrolled { background: rgba(11, 11, 15, 0.92); }

.nav-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 140px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	height: 100%;
}

.nav-logo { flex-shrink: 0; text-decoration: none; min-width: 0; }
.nav-logo:focus { outline: none; }
.nav-logo img { height: 36px; }
.nav-logo-text {
	font-family: var(--font-h);
	font-size: 1.4rem;
	font-weight: 900;
	color: var(--text);
}

.nav-menu {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	gap: 4px;
	overflow: hidden;
}
.nav-menu li a {
	color: var(--text-2);
	font-size: 0.82rem;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: var(--r);
	transition: all 0.2s;
	white-space: nowrap;
}
.nav-menu li a:hover { color: var(--text); background: var(--surface); }
.nav-menu li a.nav-active { color: var(--primary); background: rgba(var(--primary-rgb), 0.08); }
.nav-menu li a:focus { outline: none; }

.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.nav-user { display: flex; align-items: center; gap: 6px; }

.nav-user-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 7px 16px;
	border: 1px solid var(--glass-border);
	border-radius: var(--r-pill);
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text-2);
	transition: all 0.2s;
}
.nav-user-link i { font-size: 0.9rem; }
.nav-user-link:hover,
.nav-user-link.nav-active { border-color: var(--primary); color: var(--primary); background: rgba(var(--primary-rgb), 0.06); }
.nav-user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }

.nav-user-logout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px; height: 32px;
	border-radius: 50%;
	color: var(--text-3);
	font-size: 0.85rem;
	transition: all 0.2s;
}
.nav-user-logout:hover { background: rgba(255,51,102,0.12); color: var(--danger); }

.nav-langs { display: flex; gap: 2px; }
.lang-link {
	font-size: 0.72rem;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	opacity: 0.4;
	color: var(--text);
	transition: all 0.2s;
}
.lang-link:hover { opacity: 0.7; color: var(--text); }
.lang-link.lang-active { opacity: 1; color: var(--primary); background: rgba(var(--primary-rgb), 0.1); }

.nav-burger { display: none; }

/* ── Mobile Menu (separate overlay) ──────────────────────────────────────── */

.nav-mobile {
	position: fixed;
	inset: 0;
	background: #0b0b0f;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-mobile.open { transform: translateX(0); }

.nav-mobile-close {
	position: absolute;
	top: 18px; right: 20px;
	width: 44px; height: 44px;
	background: none;
	border: 1px solid var(--glass-border);
	border-radius: 12px;
	color: var(--text-2);
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
}
.nav-mobile-close:active { background: rgba(255,255,255,0.08); color: var(--text); }

.nav-mobile-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 300px;
	padding: 0 20px;
}

.nav-mobile-content ul {
	list-style: none;
	padding: 0;
	margin: 0;
	width: 100%;
}
.nav-mobile-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	color: var(--text-2);
	font-size: 1.15rem;
	font-weight: 500;
	padding: 16px 20px;
	border-radius: var(--r);
	transition: all 0.15s;
	text-decoration: none;
}
.nav-mobile-link:hover,
.nav-mobile-link:active {
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.06);
	text-decoration: none;
}
.nav-mobile-link i {
	width: 22px;
	text-align: center;
	font-size: 1rem;
	color: var(--text-3);
}
.nav-mobile-link:hover i,
.nav-mobile-link:active i { color: var(--primary); }

.nav-mobile-divider {
	width: 80%;
	height: 1px;
	background: var(--glass-border);
	margin: 8px auto;
}

.nav-mobile-langs {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--glass-border);
	width: 100%;
}
.lang-btn {
	font-size: 0.85rem;
	font-weight: 600;
	padding: 8px 18px;
	border-radius: 8px;
	border: 1px solid var(--glass-border);
	color: var(--text-3);
	transition: all 0.2s;
	text-decoration: none;
}
.lang-btn:hover { border-color: var(--glass-border-hover); color: var(--text); text-decoration: none; }
.lang-btn.lang-active {
	border-color: var(--primary);
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.08);
}

@media (max-width: 991px) {
	.navbar { height: 64px; }
	.nav-menu { display: none; }
	.nav-user { display: none; }
	.nav-langs { display: none; }
	.nav-burger {
		display: flex;
		align-items: center;
		justify-content: center;
		background: none;
		border: none;
		width: 44px; height: 44px;
		cursor: pointer;
		padding: 0;
		-webkit-tap-highlight-color: transparent;
		position: absolute;
		top: 12px;
		right: 12px;
	}
	.nav-burger span {
		display: block;
		width: 22px;
		height: 2px;
		background: var(--text);
		position: absolute;
		transition: transform 0.3s, opacity 0.2s;
	}
	.nav-burger span:nth-child(1) { transform: translateY(-7px); }
	.nav-burger span:nth-child(2) { transform: translateY(0); }
	.nav-burger span:nth-child(3) { transform: translateY(7px); }
	body { padding-top: 64px; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin-top: -80px;
	padding-top: 80px;
	overflow: hidden;
	background:
		radial-gradient(ellipse 60% 50% at 50% 0%, rgba(var(--primary-rgb), 0.08) 0%, transparent 60%),
		radial-gradient(ellipse 40% 40% at 80% 60%, rgba(var(--accent-rgb), 0.06) 0%, transparent 60%),
		var(--bg);
}
.hero-bg {
	position: absolute; inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.3;
}
.hero-overlay {
	position: absolute; inset: 0;
	background: linear-gradient(to bottom, rgba(11,11,15,0.5), rgba(11,11,15,0.95));
	z-index: 1;
}
.hero-grid-bg {
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(var(--primary-rgb), 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(var(--primary-rgb), 0.04) 1px, transparent 1px);
	background-size: 80px 80px;
	z-index: 1;
	mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 24px; }

.hero h1 {
	font-size: 4rem;
	font-weight: 900;
	line-height: 1.1;
	margin-bottom: 24px;
	letter-spacing: 1px;
}
.hero p {
	font-size: 1.15rem;
	color: var(--text-2);
	margin-bottom: 40px;
	max-width: 540px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero::after {
	content: '';
	position: absolute;
	bottom: 0; left: 0; right: 0;
	height: 200px;
	background: linear-gradient(transparent, var(--bg));
	z-index: 2;
	pointer-events: none;
}
.hero-scroll {
	position: absolute;
	bottom: 40px; left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	opacity: 0.25;
	animation: scrollBounce 2.5s infinite;
}
.hero-scroll span {
	display: block;
	width: 16px; height: 16px;
	border-right: 2px solid var(--primary);
	border-bottom: 2px solid var(--primary);
	transform: rotate(45deg);
	margin: -7px auto 0;
}
@keyframes scrollBounce {
	0%, 100% { opacity: 0.2; transform: translateX(-50%) translateY(0); }
	50% { opacity: 0.5; transform: translateX(-50%) translateY(10px); }
}

@media (max-width: 768px) {
	.hero { margin-top: -64px; padding-top: 64px; }
	.hero h1 { font-size: 2.2rem; }
	.hero p { font-size: 1rem; }
}


/* ── Steps / How It Works ─────────────────────────────────────────────────── */

.steps-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: 960px;
	margin: 0 auto;
}
.step-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 40px 28px;
	text-align: center;
	transition: all 0.3s;
	position: relative;
}
.step-card:hover {
	background: var(--surface-hover);
	border-color: var(--glass-border-hover);
	transform: translateY(-4px);
}
.step-number {
	font-family: var(--font-h);
	font-size: 3.5rem;
	font-weight: 900;
	background: linear-gradient(135deg, var(--primary), var(--cyan));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	opacity: 0.2;
	line-height: 1;
	margin-bottom: -10px;
}
.step-icon {
	font-size: 2rem;
	color: var(--primary);
	margin-bottom: 18px;
}
.step-card h3 { font-size: 0.9rem; letter-spacing: 1px; margin-bottom: 10px; }
.step-card p { color: var(--text-2); font-size: 0.88rem; line-height: 1.7; margin: 0; }

@media (max-width: 768px) { .steps-grid { grid-template-columns: 1fr; } }


/* ── Feature Cards ────────────────────────────────────────────────────────── */

.features-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
.feature-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 36px 28px;
	text-align: center;
	transition: all 0.3s;
	position: relative;
}
.feature-card:hover {
	background: var(--surface-hover);
	border-color: rgba(var(--primary-rgb), 0.25);
	transform: translateY(-4px);
	box-shadow: 0 20px 60px -20px rgba(var(--primary-rgb), 0.15);
}
.feature-icon {
	width: 56px; height: 56px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.08);
	border-radius: 14px;
}
.feature-card h3 { font-size: 0.85rem; letter-spacing: 1px; margin-bottom: 12px; }
.feature-card p { color: var(--text-2); font-size: 0.85rem; line-height: 1.7; margin: 0; }

@media (max-width: 991px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .features-grid { grid-template-columns: 1fr; } }


/* ── Pricing ──────────────────────────────────────────────────────────────── */

.pricing-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	max-width: 960px;
	margin: 0 auto;
}
.pricing-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 44px 32px;
	text-align: center;
	transition: all 0.3s;
	position: relative;
}
.pricing-card:hover { border-color: var(--glass-border-hover); transform: translateY(-4px); }
.pricing-card.featured {
	border-color: rgba(var(--primary-rgb), 0.3);
	background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.04), rgba(var(--accent-rgb), 0.04));
	box-shadow: 0 0 40px -10px rgba(var(--primary-rgb), 0.15);
}
.pricing-badge {
	position: absolute;
	top: -1px; left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, var(--primary), var(--cyan));
	color: #000;
	font-family: var(--font-h);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 5px 18px;
	border-radius: 0 0 10px 10px;
}
.pricing-card h3 { font-size: 0.9rem; letter-spacing: 1.5px; margin-bottom: 20px; color: var(--text-2); }
.pricing-amount {
	font-family: var(--font-h);
	font-size: 3rem;
	font-weight: 900;
	background: linear-gradient(135deg, var(--primary), var(--cyan));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1;
	margin-bottom: 4px;
}
.pricing-period { color: var(--text-3); font-size: 0.85rem; margin-bottom: 28px; }
.pricing-features { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; }
.pricing-features li {
	padding: 9px 0;
	color: var(--text-2);
	font-size: 0.88rem;
	border-bottom: 1px solid var(--glass-border);
}
.pricing-features li:last-child { border: none; }
.pricing-features li i { color: var(--primary); margin-right: 10px; width: 16px; }

@media (max-width: 768px) {
	.pricing-grid { grid-template-columns: 1fr; max-width: 380px; }
}


/* ── FAQ ──────────────────────────────────────────────────────────────────── */

.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
	border: 1px solid var(--glass-border);
	border-radius: var(--r);
	margin-bottom: 10px;
	overflow: hidden;
	transition: border-color 0.2s;
}
.faq-item:hover,
.faq-item.active { border-color: var(--glass-border-hover); }

.faq-question {
	padding: 18px 22px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.92rem;
	font-weight: 500;
	background: none;
	border: none;
	color: var(--text);
	width: 100%;
	text-align: left;
	transition: color 0.2s;
}
.faq-question:hover { color: var(--primary); }
.faq-question i { transition: transform 0.3s; color: var(--text-3); font-size: 0.8rem; }
.faq-item.active .faq-question i { transform: rotate(180deg); color: var(--primary); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; }
.faq-item.active .faq-answer { max-height: 300px; padding: 0 22px 18px; }
.faq-answer p { color: var(--text-2); font-size: 0.9rem; line-height: 1.8; margin: 0; }


/* ── Car Cards ────────────────────────────────────────────────────────────── */

.cars-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: 20px;
}
.car-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: all 0.3s;
}
.car-card:hover {
	border-color: rgba(var(--primary-rgb), 0.3);
	transform: translateY(-4px);
	box-shadow: 0 20px 60px -20px rgba(var(--primary-rgb), 0.12);
}
.car-card-thumb {
	height: 200px;
	background: rgba(255,255,255,0.02);
	position: relative;
	overflow: hidden;
}
.car-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.car-card:hover .car-card-thumb img { transform: scale(1.05); }

.car-card-status {
	position: absolute;
	top: 12px; right: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(11, 11, 15, 0.7);
	backdrop-filter: blur(8px);
	padding: 5px 12px;
	border-radius: var(--r-pill);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.5px;
}
.car-card-status .status-dot { width: 7px; height: 7px; border-radius: 50%; }
.status-online .status-dot { background: var(--primary); box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.6); }
.status-online { color: var(--primary); }
.status-offline .status-dot { background: var(--text-4); }
.status-offline { color: var(--text-3); }
.status-busy .status-dot { background: var(--warning); box-shadow: 0 0 8px rgba(255,170,0,0.5); }
.status-busy { color: var(--warning); }

.car-card-body { padding: 22px; }
.car-card-body h3 { font-size: 1rem; margin-bottom: 6px; }
.car-card-body p { color: var(--text-3); font-size: 0.85rem; margin-bottom: 18px; }


/* ── Page Header ──────────────────────────────────────────────────────────── */

.page-header {
	padding: 50px 0 40px;
	text-align: center;
	background:
		radial-gradient(ellipse 50% 80% at 50% 0%, rgba(var(--primary-rgb), 0.05) 0%, transparent 60%),
		var(--bg);
	border-bottom: 1px solid var(--glass-border);
}
.page-header h1 { font-size: 2rem; letter-spacing: 1px; margin: 0 0 8px; }
.page-header p { color: var(--text-3); font-size: 1rem; margin: 0; }


/* ── CTA Banner ───────────────────────────────────────────────────────────── */

.cta-banner {
	padding: 100px 0;
	text-align: center;
	background:
		radial-gradient(ellipse 50% 60% at 50% 50%, rgba(var(--primary-rgb), 0.06) 0%, transparent 60%),
		radial-gradient(ellipse 40% 40% at 20% 80%, rgba(var(--accent-rgb), 0.04) 0%, transparent 50%),
		var(--bg);
	position: relative;
}
.cta-banner-content { position: relative; z-index: 1; }
.cta-banner h2 { font-size: 2.2rem; margin-bottom: 14px; }
.cta-banner p { color: var(--text-2); font-size: 1.05rem; margin-bottom: 32px; }
.cta-banner-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }


/* ── Contacts ─────────────────────────────────────────────────────────────── */

.contacts-grid {
	display: grid;
	grid-template-columns: 1fr 1.4fr;
	gap: 32px;
	align-items: start;
}
.contacts-info { display: flex; flex-direction: column; gap: 16px; }

.contact-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 28px;
	transition: all 0.3s;
}
.contact-card:hover { border-color: var(--glass-border-hover); transform: translateY(-2px); }

.contact-card-icon {
	width: 44px; height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.08);
	border-radius: 12px;
	margin-bottom: 14px;
}
.contact-card-title {
	font-family: var(--font-h);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	margin-bottom: 6px;
}
.contact-card p { color: var(--text-2); font-size: 0.9rem; margin: 0; line-height: 1.7; }
.contact-card a { color: var(--text-2); }
.contact-card a:hover { color: var(--primary); }

.contacts-form-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 36px;
}
.contacts-form-title { font-size: 1rem; letter-spacing: 1px; margin-bottom: 28px; }

@media (max-width: 768px) {
	.contacts-grid { grid-template-columns: 1fr; }
	.contacts-form-card { padding: 28px 22px; }
}


/* ── Auth Forms ───────────────────────────────────────────────────────────── */

.auth-card {
	max-width: 460px;
	margin: 0 auto;
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 48px 40px;
	text-align: center;
}
.auth-icon {
	width: 64px; height: 64px;
	margin: 0 auto 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	color: var(--primary);
	background: rgba(var(--primary-rgb), 0.08);
	border-radius: 18px;
}
.auth-title { font-size: 1.4rem; letter-spacing: 1px; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-3); font-size: 0.9rem; margin-bottom: 32px; }

.auth-error {
	background: rgba(255, 51, 102, 0.08);
	border: 1px solid rgba(255, 51, 102, 0.2);
	color: var(--danger);
	padding: 12px 18px;
	border-radius: var(--r);
	font-size: 0.88rem;
	margin-bottom: 20px;
	text-align: left;
}
.auth-error i { margin-right: 8px; }
.auth-success {
	background: rgba(var(--primary-rgb), 0.08);
	border: 1px solid rgba(var(--primary-rgb), 0.2);
	color: var(--primary);
	padding: 12px 18px;
	border-radius: var(--r);
	font-size: 0.88rem;
	margin-bottom: 20px;
	text-align: left;
}
.auth-success i { margin-right: 8px; }

.auth-form { text-align: left; }
.auth-field { margin-bottom: 18px; flex: 1; }
.auth-field label {
	display: block;
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text-2);
	margin-bottom: 6px;
}
.auth-field-error label { color: var(--danger); }
.auth-field-error input { border-color: var(--danger) !important; }

.auth-input-wrap { position: relative; }
.auth-input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-4); font-size: 0.85rem; pointer-events: none; }
.auth-input-wrap input { padding-left: 40px !important; }

.auth-field input,
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.contacts-form-card textarea {
	width: 100%;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--glass-border);
	color: var(--text);
	padding: 13px 16px;
	font-family: var(--font);
	font-size: 0.92rem;
	border-radius: 12px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus,
.contacts-form-card textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.auth-field input::placeholder,
.contacts-form-card textarea::placeholder { color: var(--text-4); }

.contacts-form-card textarea { resize: vertical; min-height: 120px; }

.auth-row { display: flex; gap: 14px; }

.auth-divider {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--text-3);
	text-align: center;
	margin: 24px 0 18px;
	position: relative;
}
.auth-divider::before, .auth-divider::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 28%;
	height: 1px;
	background: var(--glass-border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-submit { width: 100%; margin-top: 8px; justify-content: center; }

.auth-footer { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--glass-border); }
.auth-footer p { color: var(--text-3); font-size: 0.88rem; margin: 0; }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }
.auth-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 576px) {
	.auth-card { padding: 32px 24px; }
	.auth-row { flex-direction: column; gap: 0; }
}


/* ── Profile ──────────────────────────────────────────────────────────────── */

.profile-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 32px;
	margin-bottom: 24px;
}
.profile-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-avatar {
	width: 64px; height: 64px;
	background: linear-gradient(135deg, var(--primary), var(--cyan));
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-h);
	font-size: 1.6rem;
	font-weight: 900;
	color: #000;
	flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 150px; }
.profile-name { font-family: var(--font-h); font-size: 1.1rem; font-weight: 700; }
.profile-email { color: var(--text-3); font-size: 0.88rem; margin-top: 3px; }
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.profile-stat-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 28px 20px;
	text-align: center;
	transition: border-color 0.2s;
}
.profile-stat-card:hover { border-color: var(--glass-border-hover); }
.profile-stat-icon { font-size: 1.3rem; color: var(--primary); margin-bottom: 10px; }
.profile-stat-value { font-family: var(--font-h); font-size: 1.8rem; font-weight: 900; margin-bottom: 4px; }
.profile-stat-label { font-size: 0.72rem; font-weight: 500; color: var(--text-3); letter-spacing: 0.5px; }

.profile-section {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	padding: 28px;
}
.profile-section-title {
	font-family: var(--font-h);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 1px;
	margin-bottom: 20px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--glass-border);
}
.profile-section-title i { color: var(--primary); margin-right: 10px; }

.profile-empty { text-align: center; padding: 36px 20px; color: var(--text-3); }
.profile-empty i { font-size: 2rem; color: var(--text-4); margin-bottom: 12px; display: block; }
.profile-empty p { margin-bottom: 16px; }

.rides-list { display: flex; flex-direction: column; gap: 2px; }
.ride-item {
	display: flex; align-items: center; gap: 14px; padding: 12px 16px;
	background: rgba(255,255,255,0.02); border-radius: 10px;
	transition: background 0.2s;
}
.ride-item:hover { background: rgba(255,255,255,0.05); }
.ride-icon { color: var(--primary); font-size: 1.1rem; width: 24px; text-align: center; }
.ride-info { flex: 1; min-width: 0; }
.ride-car { font-weight: 600; font-size: 0.92rem; }
.ride-date { font-size: 0.78rem; color: var(--text-3); margin-top: 2px; }
.ride-duration { font-family: var(--font-h); font-size: 0.85rem; color: var(--cyan); white-space: nowrap; }

@media (max-width: 768px) {
	.profile-grid { grid-template-columns: 1fr; }
	.profile-header { text-align: center; justify-content: center; }
	.profile-actions { justify-content: center; }
}

/* ── Car card: driver tag ──────────────────────────────────────────────────── */

.car-driver-tag {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 0.75rem; color: var(--text-3);
	margin-bottom: 8px;
}
.car-driver-tag i { color: var(--primary); }

/* ── Drive HUD: session timer states ──────────────────────────────────────── */

#drive-timer-val.warning {
	color: var(--warning, #f59e0b);
	animation: timerPulse 1s ease-in-out infinite;
}
#drive-timer-val.expired {
	color: var(--danger, #ef4444);
	animation: none;
}
@keyframes timerPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}


/* ── Drive HUD ────────────────────────────────────────────────────────────── */

.drive-container { position: fixed; inset: 0; z-index: 0; background: #000; }
.drive-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

.drive-hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; -webkit-user-select: none; user-select: none; }
#drive-app { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.drive-hud > * { pointer-events: auto; }

.hud-block {
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-radius: 12px;
	color: var(--text);
}
.hud-top {
	position: absolute;
	top: 0; left: 0; right: 0;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	padding: 12px 20px;
	background: linear-gradient(180deg, rgba(0,0,0,0.6), transparent);
}
.hud-top-left { display: flex; align-items: center; gap: 10px; }
.hud-top-center { display: flex; justify-content: center; }
.hud-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }

.hud-bottom {
	position: absolute;
	bottom: 16px; left: 0; right: 0;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: flex-end;
	padding: 0 20px;
	pointer-events: none;
	z-index: 55;
}
.hud-bottom > * { pointer-events: auto; }
.hud-gears-panel {
	position: absolute;
	bottom: 140px; left: 40px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	pointer-events: auto;
	z-index: 55;
}
.hud-bottom-left { }
.hud-bottom-btns { display: flex; gap: 16px; }
.hud-bottom-label {
	font-family: var(--font-h);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #fff;
	padding-left: 4px;
}
.hud-bottom-center { display: flex; justify-content: center; gap: 8px; }
.hud-bottom-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.hud-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	background: rgba(0,0,0,0.4);
	backdrop-filter: blur(6px);
	border-radius: 8px;
}
.hud-stats {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	background: rgba(0,0,0,0.4);
	backdrop-filter: blur(6px);
	border-radius: 8px;
	color: var(--text-2);
}
.hud-stats span { display: flex; align-items: center; gap: 4px; }
.hud-stats i { color: var(--text-3); }
.hud-dot {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--danger);
	transition: background 0.3s;
}
.hud-dot.connected { background: var(--primary); }
.hud-dot.reconnecting { background: var(--warning); animation: pulse 1.2s infinite; }

.hud-btn {
	width: 36px; height: 36px;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	background: rgba(0,0,0,0.4);
	backdrop-filter: blur(6px);
	border-radius: 10px;
	color: var(--text);
	transition: background 0.15s;
}
.hud-btn:hover { background: rgba(255,255,255,0.12); }
.hud-btn.active { background: var(--primary); color: #000; }
.hud-lights { color: var(--text-3); }
.hud-lights.active { background: rgba(0,180,80,0.2); color: #00cc55; }
.lights-icon { display: block; }
.hud-honk { color: var(--text-3); }
.hud-honk.active { background: rgba(var(--primary-rgb), 0.3); color: var(--primary); }
.hud-esp { color: var(--text-3); }
.hud-esp.active { background: rgba(244,174,0,0.25); color: #F4AE00; }
.hud-gyro-panel { display: flex; align-items: center; gap: 6px; padding: 4px 8px; }
.hud-gyro-panel input[type=range] { width: 80px; height: 4px; }
.hud-gyro-panel span { font-size: 11px; min-width: 20px; }
.hud-gyro-panel .active { background: rgba(244,174,0,0.25); color: #F4AE00; }
.hud-hazard { color: var(--text-3); }
.hud-hazard.active { background: rgba(255,100,0,0.3); color: #ff6600; }
.hud-hazard.blink { opacity: 0.15; }
.hud-estop { background: rgba(200,0,0,0.3); color: #ff4444; font-size: 16px; }
.hud-estop:hover { background: rgba(200,0,0,0.5); }
.hud-estop.active { background: #ff0000; color: #fff; animation: estopPulse 0.8s ease-in-out infinite; }
@keyframes estopPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.hud-info { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 12px; }
.hud-info i { color: var(--text-3); width: 16px; text-align: center; }

.hud-right-panel {
	position: absolute;
	top: 60px; right: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	pointer-events: auto;
}
.hud-gear {
	padding: 8px 20px;
	font-family: var(--font-h);
	font-size: 32px;
	font-weight: 700;
	min-width: 52px;
	text-align: center;
	line-height: 1;
}
.hud-speed {
	padding: 6px 14px;
	text-align: center;
	line-height: 1;
}
#drive-speed-val {
	font-family: var(--font-h);
	font-size: 22px;
	font-weight: 700;
	color: var(--text);
}
.hud-speed-unit {
	font-size: 10px;
	color: var(--text-3);
	letter-spacing: 1px;
	display: block;
	margin-top: 2px;
}
.hud-gear .brake { color: var(--warning); }
.hud-gear .reverse { color: var(--danger); }

/* ── Mobile controls (touch devices only) ─────────────────────────────── */

.mobile-controls {
	display: none;
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 50;
	pointer-events: none;
}
.mobile-zone {
	position: absolute;
	top: 0; bottom: 0;
	width: 50%;
	pointer-events: auto;
	touch-action: none;
	-webkit-tap-highlight-color: transparent;
}
.mobile-zone-left { left: 0; }
.mobile-zone-right { right: 0; }

.mobile-shift-btn {
	width: 44px; height: 44px;
	border: none;
	border-radius: 12px;
	background: rgba(255,255,255,0.08);
	backdrop-filter: blur(6px);
	color: var(--text);
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: none;
}
.mobile-shift-btn:active { background: rgba(255,255,255,0.2); }


.mobile-gear-controls {
	display: none;
}
.mobile-gear-btn {
	width: 48px; height: 48px;
	border: 2px solid rgba(255,255,255,0.2);
	border-radius: 50%;
	background: rgba(0,0,0,0.4);
	backdrop-filter: blur(6px);
	color: var(--text);
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: none;
}
.mobile-gear-btn:active { background: rgba(255,255,255,0.15); }

/* ── Drive Settings (PWA only) ─────────────────────────────────────────── */

.drive-settings-btn {
	position: absolute;
	bottom: 16px;
	right: 16px;
	width: 44px; height: 44px;
	border: 1.5px solid rgba(255,255,255,0.15);
	border-radius: 50%;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--text-2);
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 55;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
	touch-action: none;
	transition: all 0.2s;
}
.drive-settings-btn:active { background: rgba(255,255,255,0.12); color: var(--primary); }

.drive-settings-popup {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
}
.drive-settings-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.7);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.drive-settings-panel {
	position: relative;
	z-index: 1;
	width: 340px;
	max-width: 90vw;
	background: rgba(20,20,28,0.95);
	border: 1px solid var(--glass-border-hover);
	border-radius: var(--r-lg);
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.drive-settings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--glass-border);
	font-family: var(--font-h);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 1px;
}
.drive-settings-header i { color: var(--primary); margin-right: 8px; }
.drive-settings-close {
	width: 32px; height: 32px;
	border: none;
	background: rgba(255,255,255,0.06);
	border-radius: 8px;
	color: var(--text-3);
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.15s;
}
.drive-settings-close:active { background: rgba(255,255,255,0.15); color: var(--text); }

.drive-settings-body { padding: 12px; }

.drive-settings-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 1.5px solid var(--glass-border);
	border-radius: var(--r);
	margin-bottom: 8px;
	cursor: pointer;
	transition: all 0.2s;
	-webkit-tap-highlight-color: transparent;
}
.drive-settings-option:last-child { margin-bottom: 0; }
.drive-settings-option input { display: none; }
.drive-settings-option:has(input:checked) {
	border-color: var(--primary);
	background: rgba(var(--primary-rgb), 0.06);
}

.drive-settings-option-content { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.drive-settings-option-icon {
	width: 40px; height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	color: var(--text-3);
	background: rgba(255,255,255,0.04);
	border-radius: 10px;
	flex-shrink: 0;
}
.drive-settings-option:has(input:checked) .drive-settings-option-icon { color: var(--primary); background: rgba(var(--primary-rgb), 0.1); }

.drive-settings-option-title {
	font-weight: 600;
	font-size: 0.88rem;
	margin-bottom: 2px;
}
.drive-settings-option-desc {
	font-size: 0.72rem;
	color: var(--text-3);
	line-height: 1.4;
}

.drive-settings-check {
	flex-shrink: 0;
	font-size: 1.1rem;
	color: transparent;
	transition: color 0.2s;
}
.drive-settings-option:has(input:checked) .drive-settings-check { color: var(--primary); }

.drive-settings-slider-wrap {
	padding: 14px 16px 8px;
	border: 1px solid var(--glass-border);
	border-radius: var(--r);
	margin-top: 4px;
}
.drive-settings-slider-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--text-2);
	margin-bottom: 10px;
}
.drive-settings-slider-label i { color: var(--primary); }
.drive-settings-slider-label span { margin-left: auto; color: var(--primary); font-weight: 700; }

.drive-settings-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 4px;
	background: var(--glass-border);
	border-radius: 2px;
	outline: none;
}
.drive-settings-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px; height: 22px;
	background: var(--primary);
	border-radius: 50%;
	cursor: pointer;
}

.drive-settings-exit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px;
	margin-top: 4px;
	border: 1px solid rgba(255,51,102,0.2);
	border-radius: var(--r);
	color: var(--danger);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s;
}
.drive-settings-exit:active {
	background: rgba(255,51,102,0.1);
	text-decoration: none;
	color: var(--danger);
}

.drive-rotate-overlay {
	display: none;
	position: fixed; inset: 0;
	background: var(--bg);
	z-index: 200;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--text);
	font-family: var(--font-h);
	font-size: 1.2rem;
}
@media (pointer: coarse) and (orientation: portrait) {
	.drive-rotate-overlay { display: flex; }
}

.hud-session-timer {
	padding: 8px 14px;
	font-family: var(--font-h);
	font-size: 1.1rem;
	font-weight: 600;
	letter-spacing: 2px;
}
.hud-session-timer i { color: var(--primary); margin-right: 8px; }


.drive-connecting {
	position: fixed; inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: var(--bg);
	z-index: 100;
}
.drive-connecting .spinner {
	width: 44px; height: 44px;
	border: 3px solid var(--glass-border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 18px;
}
.drive-connecting p { font-size: 0.85rem; color: var(--text-3); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

@media (max-width: 768px) {
}


/* ── Spectate HUD elements ────────────────────────────────────────────── */

.hud-pedals {
	padding: 8px 12px;
	display: flex;
	justify-content: center;
}
.hud-pedal-bar {
	width: 14px;
	height: 100px;
	background: rgba(255,255,255,0.06);
	border-radius: 7px;
	position: relative;
	overflow: hidden;
}
.hud-pedal-center {
	position: absolute;
	top: 50%; left: 0; right: 0;
	height: 2px;
	background: rgba(255,255,255,0.2);
	transform: translateY(-1px);
}
.hud-pedal-fill {
	position: absolute;
	left: 2px; right: 2px;
	border-radius: 5px;
	transition: height 0.08s ease-out;
}
.hud-pedal-throttle {
	bottom: 50%;
	height: 0;
	background: linear-gradient(to top, rgba(var(--primary-rgb), 0.5), var(--primary));
}
.hud-pedal-brake {
	top: 50%;
	height: 0;
	background: linear-gradient(to bottom, rgba(255,51,102,0.5), var(--danger));
}

.spectate-driver-tag {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 500;
}
.spectate-driver-tag i { color: var(--primary); }

.spectate-steering-wrap {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 20;
	background: rgba(0,0,0,0.4);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border-radius: 16px 16px 8px 8px;
	padding: 8px 12px 4px;
	border: 1px solid rgba(255,255,255,0.06);
}
.steer-arc-svg { display: block; }
.steer-needle {
	filter: drop-shadow(0 0 8px rgba(0,255,136,0.8));
}
.steer-angle {
	font-family: var(--font-h);
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
	letter-spacing: 1px;
	margin-top: -2px;
}

/* ── Spectate ─────────────────────────────────────────────────────────────── */

.spectate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
.spectate-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: all 0.3s;
}
.spectate-card:hover { border-color: rgba(var(--accent-rgb), 0.3); transform: translateY(-3px); }
.spectate-video-wrap { position: relative; aspect-ratio: 16/9; background: #000; }
.spectate-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.spectate-live-badge {
	position: absolute;
	top: 12px; left: 12px;
	background: var(--danger);
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	padding: 4px 10px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.spectate-live-badge::before {
	content: '';
	width: 5px; height: 5px;
	border-radius: 50%;
	background: #fff;
	animation: pulse 1.5s infinite;
}
.spectate-viewers {
	position: absolute;
	top: 12px; right: 12px;
	background: rgba(0,0,0,0.6);
	padding: 4px 10px;
	border-radius: 6px;
	font-size: 0.78rem;
	color: var(--text-2);
}
.spectate-viewers i { margin-right: 5px; }
.spectate-card-body { padding: 18px; display: flex; justify-content: space-between; align-items: center; }
.spectate-card-body h3 { font-size: 0.88rem; letter-spacing: 1px; margin: 0; }

@media (max-width: 576px) { .spectate-grid { grid-template-columns: 1fr; } }


/* ── Footer ───────────────────────────────────────────────────────────────── */

#footer {
	background: rgba(255,255,255,0.02);
	padding: 60px 0 0;
	border-top: 1px solid var(--glass-border);
}
body.fullscreen-mode #footer { display: none; }

.footer-logo { max-height: 32px; margin-bottom: 16px; opacity: 0.7; }
.footer-logo-text { font-family: var(--font-h); font-size: 1.2rem; font-weight: 900; margin-bottom: 16px; }
.footer-desc { color: var(--text-3); font-size: 0.85rem; line-height: 1.7; }

.footer-heading {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 18px;
	color: var(--text-2);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-3); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }

.footer-col p { color: var(--text-2); font-size: 0.88rem; margin-bottom: 6px; }
.footer-col p i { color: var(--primary); width: 18px; margin-right: 8px; }

.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	border: 1px solid var(--glass-border);
	border-radius: 10px;
	font-size: 0.9rem;
	color: var(--text-3);
	transition: all 0.2s;
}
.social-icon:hover { border-color: var(--primary); color: var(--primary); background: rgba(var(--primary-rgb), 0.08); }

.footer-bottom { margin-top: 40px; padding: 16px 0; border-top: 1px solid var(--glass-border); }
.footer-bottom p { color: var(--text-4); font-size: 0.78rem; margin: 0; text-align: center; }

@media (max-width: 768px) {
	.footer-col { margin-bottom: 28px; text-align: center; }
	.footer-logo { margin: 0 auto 16px; display: block; }
	.footer-social { justify-content: center; }
}


/* ── 404 ──────────────────────────────────────────────────────────────────── */

.error-page {
	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: -80px;
	padding-top: 80px;
	background:
		radial-gradient(ellipse 50% 50% at 50% 40%, rgba(var(--primary-rgb), 0.06) 0%, transparent 60%),
		var(--bg);
}
.error-content { text-align: center; padding: 0 20px; }
.error-number { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; }
.error-4 { font-family: var(--font-h); font-size: 8rem; font-weight: 900; line-height: 1; color: var(--text); }
.error-0 { font-size: 6rem; color: var(--primary); line-height: 1; filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.5)); }
.error-content h2 { font-size: 1.3rem; letter-spacing: 1px; margin-bottom: 12px; }
.error-content p { color: var(--text-3); margin-bottom: 32px; }
.error-buttons { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

@media (max-width: 768px) {
	.error-4 { font-size: 5rem; }
	.error-0 { font-size: 3.5rem; }
	.error-page { margin-top: -64px; padding-top: 64px; }
}


/* ── Utilities ────────────────────────────────────────────────────────────── */

.sr-only {
	position: absolute;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	border: 0;
}
.no-results { text-align: center; padding: 60px 20px; color: var(--text-3); }
.no-results i { font-size: 2.5rem; color: var(--text-4); margin-bottom: 16px; display: block; }
.loading-spinner { display: flex; justify-content: center; padding: 60px; }
.loading-spinner::after {
	content: '';
	width: 36px; height: 36px;
	border: 3px solid var(--glass-border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}


/* ── Global: A4U built-in template overrides ──────────────────────────────── */

#a4u-content input[type="text"],
#a4u-content input[type="email"],
#a4u-content input[type="password"],
#a4u-content input[type="tel"],
#a4u-content input[type="number"],
#a4u-content select,
#a4u-content textarea {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--glass-border);
	color: var(--text);
	padding: 12px 16px;
	font-family: var(--font);
	font-size: 0.92rem;
	border-radius: 12px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	max-width: 100%;
}
#a4u-content input:focus,
#a4u-content select:focus,
#a4u-content textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
#a4u-content input::placeholder,
#a4u-content textarea::placeholder { color: var(--text-4); }

#a4u-content input[type="submit"],
#a4u-content input[type="button"],
#a4u-content button[type="submit"] {
	background: linear-gradient(135deg, var(--primary), var(--cyan));
	color: #000;
	border: none;
	padding: 12px 36px;
	font-family: var(--font-h);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	border-radius: var(--r-pill);
	cursor: pointer;
	transition: all 0.3s;
}
#a4u-content input[type="submit"]:hover,
#a4u-content button[type="submit"]:hover {
	box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.3);
	transform: translateY(-2px);
}

#a4u-content table { border-collapse: collapse; width: 100%; max-width: 500px; margin: 0 auto; }
#a4u-content table td { padding: 8px 10px; vertical-align: middle; }
#a4u-content table label { font-size: 0.8rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
#a4u-content h1 { font-size: 2rem; text-align: center; margin: 30px 0; }
#a4u-content a { color: var(--primary); }
#a4u-content a:hover { color: var(--cyan); }

/* ── Race UI ──────────────────────────────────────────────────────────────── */

.race-dual-view {
	display: flex;
	width: 100vw; height: 100vh;
	background: #000;
	position: fixed;
	top: 0; left: 0;
	z-index: 100;
}
.race-viewport {
	flex: 1;
	position: relative;
	overflow: hidden;
}
.race-viewport video {
	width: 100%; height: 100%;
	object-fit: cover;
}
.race-divider {
	width: 3px;
	background: linear-gradient(180deg, var(--primary), var(--cyan));
	flex-shrink: 0;
}
.race-player-tag {
	position: absolute;
	bottom: 16px; left: 16px;
	padding: 6px 14px;
	background: rgba(0,0,0,0.6);
	backdrop-filter: blur(6px);
	border-radius: 8px;
	font-family: var(--font-h);
	font-size: 0.85rem;
	font-weight: 600;
}
.race-overlay {
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 110;
	background: rgba(0,0,0,0.6);
}
.race-countdown {
	font-family: var(--font-h);
	font-size: 8rem;
	font-weight: 900;
	color: var(--text);
	text-shadow: 0 0 40px rgba(255,255,255,0.3);
	animation: countPulse 0.8s ease-out;
}
.race-countdown.go { color: var(--primary); text-shadow: 0 0 60px rgba(0,255,136,0.5); }
.race-countdown.finish { color: var(--cyan); font-size: 5rem; }
@keyframes countPulse {
	0% { transform: scale(2); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}
.race-hud {
	position: fixed;
	top: 0; left: 0; right: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	z-index: 105;
	pointer-events: none;
}
.race-hud > * { pointer-events: auto; }
.race-timer {
	padding: 8px 16px;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(6px);
	border-radius: 10px;
	font-family: var(--font-h);
	font-size: 1.2rem;
	display: flex; align-items: center; gap: 8px;
}
.race-status-badge {
	padding: 6px 16px;
	background: rgba(0,0,0,0.5);
	backdrop-filter: blur(6px);
	border-radius: 8px;
	font-family: var(--font-h);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.race-status-badge.racing { background: rgba(0,200,80,0.3); color: var(--primary); }

.race-card {
	background: var(--glass);
	border: 1px solid var(--glass-border);
	border-radius: var(--r-card);
	overflow: hidden;
}
.race-card-header {
	padding: 14px 18px;
	font-family: var(--font-h);
	font-weight: 700;
	border-bottom: 1px solid var(--glass-border);
}
.race-card-body {
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
}
.race-slot { text-align: center; }
.race-car { display: block; font-weight: 600; font-size: 0.95rem; }
.race-player { display: block; font-size: 0.8rem; color: var(--text-3); margin-top: 4px; }
.race-ready { color: var(--primary); font-weight: bold; }
.race-vs { font-family: var(--font-h); font-size: 1.5rem; font-weight: 900; color: var(--primary); }
.race-card-footer {
	padding: 12px 18px;
	border-top: 1px solid var(--glass-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.race-status { font-size: 0.8rem; text-transform: uppercase; color: var(--text-3); }

#race-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

@media (max-width: 768px) {
	.race-dual-view { flex-direction: column; }
	.race-divider { width: 100%; height: 3px; }
}

/* ── LED Button ────────────────────────────────────────────────────────── */

.hud-led.active { text-shadow: 0 0 8px currentColor; }

/* ── ArUco Lap Timer ───────────────────────────────────────────────────── */

.hud-stats-wrap { position: relative; }
.hud-lap {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 2px;
}
.hud-lap .lap-best-val { color: #0f0; }
