/*
RSK World – Tower Defense 3D Evolution Styles
For support, licensing, or custom development inquiries: help@rskworld.in • Phone/WhatsApp: +91 9330539277
Website: RSK World • Business Inquiries: help@rskworld.in
🤝 Contributing: Suggestions and improvements are welcome!
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
	--bg: #030712; /* Deep black-blue */
	--panel: rgba(17, 24, 39, 0.7); /* Translucent panel */
	--text: #f8fafc;
	--muted: #94a3b8;
	--accent: #06b6d4; /* Cyan */
	--accent-2: #8b5cf6; /* Violet */
	--danger: #ef4444;
	--gold: #fbbf24;
	--elixir: #a855f7;
	--glass-border: rgba(255, 255, 255, 0.1);
	--glass-bg: rgba(15, 23, 42, 0.6);
}

* { box-sizing: border-box; }
html, body { height: 100%; overscroll-behavior: none; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: 'Outfit', sans-serif;
	letter-spacing: -0.01em;
	overflow: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; text-decoration: none; }

.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 24px;
	background: rgba(2, 6, 23, 0.8);
	backdrop-filter: blur(12px) saturate(180%);
	-webkit-backdrop-filter: blur(12px) saturate(180%);
	border-bottom: 1px solid var(--glass-border);
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo { 
	margin: 0; 
	font-size: 22px; 
	font-weight: 700; 
	background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.hud { display: flex; gap: 12px; font-weight: 600; flex-wrap: wrap; }
.pill { 
	padding: 6px 14px; 
	border-radius: 12px; 
	border: 1px solid var(--glass-border); 
	background: var(--glass-bg); 
	color: #e2e8f0; 
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pill:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.2); }

.pill-gold { border-left: 4px solid var(--gold); }
.pill-elixir { border-left: 4px solid var(--elixir); }
.pill-builders { border-left: 4px solid var(--muted); }
.pill-lives { border-left: 4px solid var(--danger); }
.pill-wave { border-left: 4px solid var(--accent); }

main { position: relative; height: calc(100vh - 160px); }
#game-container {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
#game-container canvas { display: block; }

.controls {
	position: absolute;
	top: 24px;
	left: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: rgba(15, 23, 42, 0.85);
	backdrop-filter: blur(12px);
	padding: 16px;
	border: 1px solid var(--glass-border);
	border-radius: 16px;
	z-index: 15;
	max-width: 320px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.control-group { 
	display: flex; 
	flex-direction: column; 
	gap: 8px; 
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	padding-bottom: 8px;
}
.control-group:last-child { border: none; }

.btn {
	background: rgba(30, 41, 59, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #f1f5f9;
	padding: 10px 14px;
	border-radius: 10px;
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	transition: all 0.2s ease;
	text-align: left;
}
.btn:hover { 
	background: rgba(51, 65, 85, 0.8); 
	border-color: var(--accent);
	transform: translateX(4px);
}
.btn.primary { 
	background: linear-gradient(135deg, var(--accent), var(--accent-2)); 
	border: none; 
	color: #030712; 
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.btn.primary:hover {
	filter: brightness(1.1);
	transform: scale(1.02);
}

.icon { margin-right: 4px; font-size: 16px; }

.hint { 
	font-size: 12px; 
	color: var(--muted); 
	margin-top: 4px; 
	font-style: italic; 
	padding: 4px 8px;
	background: rgba(0,0,0,0.2);
	border-radius: 6px;
	display: none;
}
.hint.show { display: block; }

.footer {
	position: fixed;
	bottom: 0;
	width: 100%;
	padding: 12px 24px;
	text-align: center;
	background: rgba(2, 6, 23, 0.9);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--glass-border);
	font-size: 13px;
}
.footer p { margin: 0; color: var(--muted); line-height: 1.6; }
.contrib { color: var(--accent); font-weight: 600; }

/* Menu overlay */
.menu-overlay { 
	position: fixed; 
	inset: 0; 
	background: rgba(2, 6, 23, 0.85); 
	backdrop-filter: blur(8px);
	display: none; 
	align-items: center; 
	justify-content: center; 
	z-index: 200; 
}
.menu-overlay.show { display: flex; animation: fadeIn 0.3s ease; }

.menu-card { 
	width: min(500px, 92vw); 
	background: #0f172a; 
	border: 1px solid var(--accent); 
	border-radius: 24px; 
	padding: 32px; 
	box-shadow: 0 0 40px rgba(6, 182, 212, 0.2); 
	text-align: center;
}
.menu-card h2 { 
	margin: 0 0 16px; 
	font-size: 28px; 
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}
.menu-card p { color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.menu-actions { display: grid; gap: 12px; }
.menu-actions .btn { text-align: center; font-size: 16px; padding: 14px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Ad Container */
.ad-sidebar {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 160px;
	height: 600px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	overflow: hidden;
}

@media (max-width: 1024px) {
	.ad-sidebar { display: none; }
}
