/* Desktop layer - macOS-style desktop background with app icons */
#desktop {
	position: fixed;
	top: 32px;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 5;
	pointer-events: none;
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(auto-fill, 100px);
	justify-content: end;
	align-content: start;
	padding: 16px 20px;
	gap: 4px;
}

/* Desktop icon */
.desktop-icon {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	width: 90px;
	padding: 8px 4px;
	border-radius: 8px;
	cursor: default;
	user-select: none;
	-webkit-user-select: none;
	outline: none;
	transition: background 0.15s ease;
}

.desktop-icon:hover {
	background: rgba(255, 255, 255, 0.06);
}

.desktop-icon.selected {
	background: rgba(88, 166, 255, 0.2);
}

.desktop-icon-image {
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.desktop-icon-image img {
	width: 64px;
	height: 64px;
	border-radius: 14px;
	filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.desktop-icon-label {
	font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
	font-size: 11px;
	font-weight: 500;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0px 1px rgba(0, 0, 0, 0.6);
	text-align: center;
	line-height: 1.2;
	padding: 1px 6px;
	border-radius: 3px;
	max-width: 86px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.desktop-icon.selected .desktop-icon-label {
	background: var(--link-color, #58a6ff);
	color: #fff;
	text-shadow: none;
}

/* Bounce animation on launch */
.desktop-icon.launching .desktop-icon-image img {
	animation: icon-bounce 0.6s ease;
}

@keyframes icon-bounce {
	0%   { transform: translateY(0); }
	25%  { transform: translateY(-16px); }
	50%  { transform: translateY(0); }
	70%  { transform: translateY(-6px); }
	100% { transform: translateY(0); }
}

/* Installer window content styles */
.installer-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px 16px 16px;
	text-align: center;
}

.installer-hero img {
	width: 96px;
	height: 96px;
	border-radius: 20px;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
	margin-bottom: 12px;
}

.installer-hero h2 {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 600;
	color: var(--text-primary);
}

.installer-hero .tagline {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--text-secondary);
}

.installer-hero .version-badge {
	display: inline-block;
	padding: 2px 10px;
	background: var(--bg-tertiary);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
	color: var(--text-secondary);
	font-variant-numeric: tabular-nums;
}

/* About / description section */
.installer-about {
	padding: 0 20px 16px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--text-secondary);
}

.installer-about p {
	margin: 0 0 12px;
}

.alpha-notice {
	padding: 10px 12px;
	background: rgba(210, 153, 34, 0.1);
	border: 1px solid rgba(210, 153, 34, 0.25);
	border-radius: 8px;
	font-size: 12px;
	line-height: 1.45;
	color: var(--text-secondary);
	margin-bottom: 14px;
}

.feature-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.feature-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.feature-icon {
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
	margin-top: 1px;
}

.feature-item strong {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 1px;
}

.feature-item span {
	font-size: 12px;
	color: var(--text-secondary);
	line-height: 1.4;
}

/* Platform download cards */
.installer-platforms {
	padding: 0 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.platform-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--bg-secondary);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	transition: border-color 0.15s ease;
}

.platform-card.recommended {
	border-color: var(--link-color);
}

.platform-card-info {
	flex: 1;
	min-width: 0;
}

.platform-card-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.platform-card-name .recommended-badge {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--link-color);
	background: rgba(88, 166, 255, 0.12);
	padding: 1px 6px;
	border-radius: 4px;
}

.platform-card-arch {
	font-size: 12px;
	color: var(--text-secondary);
	margin-top: 2px;
}

.platform-card-actions {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.download-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	background: var(--link-color);
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: opacity 0.15s ease;
	white-space: nowrap;
}

.download-btn:hover {
	opacity: 0.85;
}

.download-btn.secondary {
	background: var(--bg-tertiary);
	color: var(--text-primary);
	border: 1px solid var(--border-color);
}

.download-btn.secondary:hover {
	background: var(--border-color);
}

/* Platform icon */
.platform-icon {
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
}

/* Footer note */
.installer-footer {
	padding: 0 16px 16px;
	text-align: center;
	font-size: 11px;
	color: var(--text-muted);
	line-height: 1.4;
}

.installer-footer a {
	color: var(--link-color);
	text-decoration: none;
}

.installer-footer a:hover {
	text-decoration: underline;
}

/* Light mode overrides */
html.light-mode .desktop-icon-label {
	color: #1d1d1f;
	text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8), 0 0px 1px rgba(255, 255, 255, 0.6);
}

html.light-mode .desktop-icon.selected .desktop-icon-label {
	color: #fff;
	text-shadow: none;
}

html.light-mode .desktop-icon:hover {
	background: rgba(0, 0, 0, 0.06);
}

html.light-mode .desktop-icon.selected {
	background: rgba(0, 102, 204, 0.2);
}

/* Hide desktop on mobile */
@media (max-width: 720px) {
	#desktop {
		display: none;
	}
}
