/* =========================================
   Earning Tech – Countdown | style.css
   ========================================= */

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

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

:root {
	--bg-deep: #050d1a;
	--bg-card: rgba(255, 255, 255, 0.035);
	--border: rgba(99, 179, 237, 0.18);
	--accent: #3b82f6;
	--accent2: #f59e0b;
	--red: #ef4444;
	--text: #e2e8f0;
	--muted: #64748b;
	--font-head: 'Orbitron', monospace;
	--font-body: 'Rajdhani', sans-serif;
	--radius: 16px;
}

html,
body {
	height: 100%;
	overflow-x: hidden;
}

body {
	background: var(--bg-deep);
	font-family: var(--font-body);
	color: var(--text);
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	position: relative;
}

/* --- Animated Grid Background --- */
.bg-grid {
	position: fixed;
	inset: 0;
	background-image:
		linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
	background-size: 44px 44px;
	animation: gridDrift 20s linear infinite;
	pointer-events: none;
	z-index: 0;
}

@keyframes gridDrift {
	0% {
		background-position: 0 0;
	}
	100% {
		background-position: 44px 44px;
	}
}

/* --- Floating Particles --- */
.particles {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	overflow: hidden;
}

.particle {
	position: absolute;
	border-radius: 50%;
	opacity: 0;
	animation: floatUp linear infinite;
}

@keyframes floatUp {
	0% {
		transform: translateY(0) scale(1);
		opacity: 0;
	}
	10% {
		opacity: 0.6;
	}
	90% {
		opacity: 0.2;
	}
	100% {
		transform: translateY(-100vh) scale(0.5);
		opacity: 0;
	}
}

/* --- Wrapper & Card --- */
.wrapper {
	position: relative;
	z-index: 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 24px;
	padding: 2.5rem 2rem 2.25rem;
	text-align: center;
	max-width: 420px;
	width: 100%;
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	box-shadow:
		0 0 60px rgba(59, 130, 246, 0.08),
		0 0 120px rgba(15, 30, 60, 0.5),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
	animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
	from {
		opacity: 0;
		transform: translateY(24px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* --- Logo --- */
.logo-ring {
	width: 120px;
	height: 120px;
	margin: 0 auto 1.4rem;
	border-radius: 50%;
	padding: 4px;
	background: conic-gradient(
		#3b82f6 0deg,
		#1d4ed8 90deg,
		#f59e0b 180deg,
		#1d4ed8 270deg,
		#3b82f6 360deg
	);
	animation: spin 8s linear infinite;
	flex-shrink: 0;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.logo-circle {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: radial-gradient(circle at 40% 35%, #1e3a6e, #050d1a);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	animation: spin 8s linear infinite reverse;
}

.shield {
	width: 46px;
	height: 52px;
	filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.7));
}

.logo-text {
	color: #93c5fd;
	font-family: var(--font-body);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* --- Brand Title --- */
.brand {
	font-family: var(--font-head);
	font-size: clamp(18px, 5vw, 26px);
	font-weight: 900;
	color: #ffffff;
	letter-spacing: 4px;
	text-transform: uppercase;
	margin-bottom: 6px;
	text-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

.tagline {
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 600;
	color: var(--accent);
	letter-spacing: 3px;
	text-transform: uppercase;
	margin-bottom: 1.75rem;
	opacity: 0.85;
}

/* --- Timer --- */
.timer {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 8px;
	margin-bottom: 1.75rem;
	flex-wrap: nowrap;
}

.time-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.box {
	font-family: var(--font-head);
	font-size: clamp(24px, 7vw, 36px);
	font-weight: 700;
	color: var(--red);
	background: rgba(239, 68, 68, 0.07);
	border: 1px solid rgba(239, 68, 68, 0.22);
	border-radius: 10px;
	width: clamp(56px, 15vw, 72px);
	height: clamp(50px, 14vw, 64px);
	display: flex;
	align-items: center;
	justify-content: center;
	letter-spacing: 2px;
	position: relative;
	overflow: hidden;
	transition: transform 0.12s ease;
}

.box::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.04) 0%,
		transparent 50%
	);
	pointer-events: none;
}

.box.pop {
	transform: scale(1.08);
}

.unit-label {
	font-family: var(--font-body);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--muted);
}

.sep {
	font-family: var(--font-head);
	font-size: clamp(22px, 6vw, 32px);
	font-weight: 700;
	color: var(--red);
	margin-top: clamp(10px, 3vw, 14px);
	animation: blink 1s step-end infinite;
	line-height: 1;
}

@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.2;
	}
}

/* --- Expired --- */
.expired {
	font-family: var(--font-head);
	font-size: 16px;
	color: var(--red);
	font-weight: 700;
	letter-spacing: 1px;
	margin-bottom: 1rem;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.7;
		transform: scale(1.04);
	}
}

/* --- Telegram Button --- */
.tg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: linear-gradient(135deg, #1565c0 0%, #0288d1 50%, #1565c0 100%);
	background-size: 200% 200%;
	color: #ffffff;
	font-family: var(--font-body);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	padding: 20px 28px;
	border-radius: 50px;
	border: none;
	width: 100%;
	max-width: 320px;
	cursor: pointer;
	box-shadow:
		0 4px 24px rgba(2, 136, 209, 0.45),
		0 0 0 1px rgba(2, 136, 209, 0.3);
	animation: shimmer 3s ease-in-out infinite;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

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

.tg-btn:hover {
	transform: translateY(-3px);
	box-shadow:
		0 8px 32px rgba(2, 136, 209, 0.6),
		0 0 0 1px rgba(2, 136, 209, 0.5);
}

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

.tg-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 400px) {
	.card {
		padding: 1.75rem 1rem 1.5rem;
	}
	.timer {
		gap: 5px;
	}
	.tg-btn {
		font-size: 20px;
		padding: 20px 20px;
		letter-spacing: 1.5px;
	}
}

@media (max-width: 320px) {
	.timer {
		gap: 3px;
	}
	.sep {
		font-size: 20px;
	}
}
