:root {
	color-scheme: dark;
	--bg: #0c0d10;
	--panel: rgba(24, 26, 32, 0.96);
	--panel-soft: #20232b;
	--border: rgba(255, 255, 255, 0.08);
	--muted: #989da9;
	--text: #f6f7f9;
	--red: #ef3d36;
	--red-dark: #c92320;
	--green: #62c78d;
	--shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

body {
	margin: 0;
	background:
		radial-gradient(circle at 12% 12%, rgba(239, 61, 54, 0.08), transparent 34%),
		radial-gradient(circle at 88% 82%, rgba(239, 61, 54, 0.06), transparent 34%),
		linear-gradient(145deg, #0a0b0e 0%, #111319 48%, #0b0c0f 100%);
	color: var(--text);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	overflow-x: hidden;
}

body::before {
	position: fixed;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
	background-size: 42px 42px;
	content: "";
	mask-image: linear-gradient(to bottom, black, transparent 92%);
	pointer-events: none;
}

.ambient {
	position: fixed;
	width: 360px;
	height: 360px;
	border-radius: 50%;
	background: rgba(239, 61, 54, 0.08);
	filter: blur(100px);
	pointer-events: none;
}

.ambient-one {
	top: -150px;
	left: -100px;
}

.ambient-two {
	right: -140px;
	bottom: -180px;
}

.download-shell {
	position: relative;
	z-index: 1;
	display: grid;
	min-height: 100vh;
	place-items: center;
	padding: 34px 18px;
}

.download-card {
	width: min(100%, 690px);
	padding: 26px 34px 30px;
	border: 1px solid var(--border);
	border-radius: 20px;
	background: linear-gradient(155deg, rgba(29, 31, 38, 0.98), rgba(18, 20, 25, 0.98));
	box-shadow: var(--shadow);
	text-align: center;
}

.card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--border);
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #d7d9df;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.11em;
}

.brand-mark {
	display: grid;
	width: 36px;
	height: 30px;
	place-items: center;
	border-radius: 6px;
	background: var(--red);
	box-shadow: 0 7px 20px rgba(239, 61, 54, 0.25);
	color: #fff;
	font-size: 13px;
	letter-spacing: -0.03em;
}

.secure-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 10px;
	border: 1px solid rgba(98, 199, 141, 0.2);
	border-radius: 999px;
	background: rgba(98, 199, 141, 0.06);
	color: #a7dfbd;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.secure-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--green);
	box-shadow: 0 0 0 4px rgba(98, 199, 141, 0.1);
}

.download-icon {
	display: grid;
	width: 82px;
	height: 82px;
	margin: 32px auto 20px;
	place-items: center;
	border: 1px solid rgba(239, 61, 54, 0.34);
	border-radius: 24px;
	background: linear-gradient(145deg, rgba(239, 61, 54, 0.2), rgba(239, 61, 54, 0.06));
	box-shadow: 0 15px 38px rgba(239, 61, 54, 0.12), inset 0 1px rgba(255, 255, 255, 0.06);
	transform: rotate(-2deg);
}

.download-icon svg,
.download-button svg {
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2;
}

.download-icon svg {
	width: 38px;
	height: 38px;
	color: #ff655e;
}

.eyebrow {
	margin: 0 0 10px;
	color: #ff716b;
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 0.17em;
}

h1 {
	max-width: 580px;
	margin: 0 auto;
	font-size: clamp(25px, 5vw, 38px);
	line-height: 1.16;
	letter-spacing: -0.035em;
	word-break: break-word;
}

.lead {
	max-width: 510px;
	margin: 15px auto 25px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.6;
}

.file-panel {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.025);
	text-align: left;
}

.file-symbol {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 9px;
	background: #2a2d35;
	color: #ff655e;
	font-size: 13px;
	font-weight: 900;
}

.file-copy {
	min-width: 0;
}

.file-label {
	display: block;
	margin-bottom: 4px;
	color: #737985;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.12em;
}

.file-copy strong {
	display: block;
	overflow: hidden;
	color: #78e6a8;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .01em;
	text-overflow: ellipsis;
	text-shadow: 0 0 16px rgba(98, 199, 141, .24);
	white-space: nowrap;
}

.file-type {
	padding: 6px 8px;
	border-radius: 6px;
	background: rgba(239, 61, 54, 0.09);
	color: #ff716b;
	font-size: 9px;
	font-weight: 900;
	letter-spacing: 0.09em;
}

.countdown {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 24px;
	margin: 21px 0 15px;
	color: #aeb2bb;
	font-size: 13px;
}

.countdown strong {
	color: #fff;
}

.spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.13);
	border-top-color: var(--red);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.countdown.started {
	color: #a7dfbd;
}

.ready-check {
	display: grid;
	width: 19px;
	height: 19px;
	place-items: center;
	border-radius: 50%;
	background: rgba(98, 199, 141, 0.15);
	color: var(--green);
	font-size: 12px;
	font-weight: 900;
}

.download-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	width: 100%;
	min-height: 54px;
	padding: 14px 20px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	background: linear-gradient(180deg, #f14942, #d72e29);
	box-shadow: 0 13px 28px rgba(215, 46, 41, 0.22), inset 0 1px rgba(255, 255, 255, 0.17);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: 0.045em;
	text-decoration: none;
	transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.download-button:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	box-shadow: 0 17px 34px rgba(215, 46, 41, 0.3), inset 0 1px rgba(255, 255, 255, 0.2);
}

.download-button:active {
	transform: translateY(1px);
}

.download-button:focus-visible {
	outline: 3px solid rgba(239, 61, 54, 0.35);
	outline-offset: 3px;
}

.download-button svg {
	width: 21px;
	height: 21px;
}

.download-button.secondary {
	margin-top: 22px;
	background: #2d3038;
	box-shadow: none;
}

.retry-note {
	margin: 12px 0 0;
	color: #727782;
	font-size: 11px;
}

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--border);
	color: #6f7480;
	font-size: 10px;
}

.card-footer span:first-child {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.card-footer i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
}

.card-footer b {
	color: #959aa5;
}

.error-card {
	max-width: 560px;
	padding-top: 30px;
}

.error-icon {
	display: grid;
	width: 72px;
	height: 72px;
	margin: 35px auto 22px;
	place-items: center;
	border: 1px solid rgba(239, 61, 54, 0.3);
	border-radius: 22px;
	background: rgba(239, 61, 54, 0.08);
	color: #ff655e;
	font-size: 36px;
	font-weight: 300;
}

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

@media (max-width: 620px) {
	.download-shell {
		padding: 16px 12px;
	}

	.download-card {
		padding: 20px 18px 23px;
		border-radius: 15px;
	}

	.card-header {
		align-items: flex-start;
		gap: 12px;
	}

	.brand {
		text-align: left;
	}

	.secure-pill {
		padding: 6px 8px;
		font-size: 8px;
	}

	.download-icon {
		margin-top: 27px;
	}

	.file-type {
		display: none;
	}

	.file-panel {
		grid-template-columns: auto minmax(0, 1fr);
	}

	.card-footer {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
	}
}

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