/* ===============================
   Theme variables
=============================== */
:root {
	--accent-primary: #6c7cff;
	--accent-secondary: #7dd3fc;

	--text-main: #e6e8ff;
	--text-muted: rgba(230, 232, 255, 0.7);

	--border-soft: rgba(255, 255, 255, 0.15);

	--radius-md: 10px;
	--radius-sm: 6px;
}

/* ===============================
   Base document
=============================== */
html,
body {
	height: 100%;
	margin: 0;
	background: #050812;
}

body {
	font-family:
		system-ui,
		-apple-system,
		BlinkMacSystemFont,
		sans-serif;

	color: var(--text-main);
	padding: 2rem;

	position: relative;
	overflow-x: hidden;
}

.orbit-controls {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.orbit-controls button {
  background: rgba(108,124,255,0.15);
  border: 1px solid rgba(108,124,255,0.4);
  color: #e6e8ff;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

header,
main,
footer,
.satellite {
	position: relative;
	z-index: 2;
}

/* ===============================
   Background effects
=============================== */
.bg-stars {
	position: fixed;
	inset: 0;
	z-index: 1;
	pointer-events: none;

	background-image:
		radial-gradient(
			3px 3px at 15% 25%,
			rgba(255, 255, 255, 0.75),
			transparent 65%
		),
		radial-gradient(
			3px 3px at 35% 75%,
			rgba(220, 230, 255, 0.6),
			transparent 65%
		),
		radial-gradient(
			4px 4px at 65% 40%,
			rgba(200, 220, 255, 0.7),
			transparent 60%
		),
		radial-gradient(
			4px 4px at 85% 15%,
			rgba(180, 210, 255, 0.45),
			transparent 65%
		),
		radial-gradient(
			3px 3px at 50% 50%,
			rgba(255, 255, 255, 0.5),
			transparent 60%
		);

	background-size:
		300px 300px,
		420px 420px,
		520px 520px,
		680px 680px,
		820px 820px;

	background-repeat: repeat;
	animation: stars-float 160s linear infinite;
}

@keyframes stars-float {
	from {
		transform: translateY(0);
	}
	to {
		transform: translateY(-200px);
	}
}

.bg-rainbow {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;

	background:
		radial-gradient(
			ellipse at left center,
			rgba(255, 120, 210, 0.22),
			transparent 70%
		),
		radial-gradient(
			ellipse at right center,
			rgba(120, 200, 255, 0.2),
			transparent 70%
		);

	filter: blur(140px);
}

.orbit-container {
	transition:
		box-shadow 0.25s ease,
		border-color 0.25s ease;
}

.orbit-container.active {
	box-shadow:
		0 0 0 1px rgba(108, 124, 255, 0.35),
		0 0 25px rgba(108, 124, 255, 0.35),
		0 0 60px rgba(125, 211, 252, 0.15);
	border-color: rgba(125, 211, 252, 0.6);
}

/* ===============================
   Header / text
=============================== */
header {
	text-align: center;
	margin-bottom: 2.5rem;
}

h1 {
	margin: 0;
	color: #ffffff;
	font-weight: 600;
	letter-spacing: 0.03em;
}

p {
	color: var(--text-muted);
}

header p {
	max-width: 900px;
	margin: 0.75rem auto 0;
}

.title-icon {
	height: 3.5em;
	vertical-align: middle;
	margin-left: 0.4rem;
	filter: drop-shadow(0 0 6px rgba(108, 124, 255, 0.35));
}

/* ===============================
   Satellite cards
=============================== */
.satellite {
	background: linear-gradient(
		180deg,
		rgba(10, 16, 34, 0.96),
		rgba(6, 10, 22, 0.97)
	);

	padding: 1.25rem;
	margin-bottom: 2rem;

	border-radius: var(--radius-md);
	border-left: 4px solid var(--accent-primary);

	box-shadow:
		0 10px 28px rgba(0, 0, 0, 0.55),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);

	text-align: center;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.satellite:hover {
	transform: translateY(-2px);
	box-shadow:
		0 16px 36px rgba(0, 0, 0, 0.65),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.satellite strong {
	font-size: 1.05rem;
	font-weight: 600;
	color: #ffffff;
	display: block;
	letter-spacing: 0.03em;
}

.satellite span {
	display: block;
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-top: 0.1rem;
}

/* ===============================
   Buttons
=============================== */
.toggle-btn {
	margin-top: 0.6rem;
	margin-right: 0.4rem;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	background: transparent;
	border: 1px solid var(--accent-primary);
	color: var(--text-main);

	padding: 0.35rem 0.7rem;
	border-radius: var(--radius-sm);
	font-size: 0.85rem;
	cursor: pointer;

	transition:
		background 0.2s ease,
		box-shadow 0.2s ease;
}

.toggle-btn:hover {
	background: rgba(108, 124, 255, 0.16);
	box-shadow: 0 0 12px rgba(108, 124, 255, 0.28);
}

/* ===============================
   Orbit container
=============================== */
.orbit-container {
	margin-top: 0.75rem;
	position: relative;
	overflow: hidden;

	min-height: 220px;
	max-height: 600px;

	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius-md);
}

.orbit-container iframe {
	width: 100%;
	height: calc(100% - 18px);
	border: none;
	border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* Drag bar */
.orbit-resizer {
	height: 18px;
	width: 100%;
	position: absolute;
	bottom: 0;
	left: 0;

	display: flex;
	align-items: center;
	justify-content: center;

	cursor: ns-resize;
	user-select: none;

	background: linear-gradient(
		to right,
		rgba(108, 124, 255, 0.28),
		rgba(125, 211, 252, 0.28),
		rgba(108, 124, 255, 0.28)
	);

	color: #ffffff;
	font-size: 0.9rem;
	letter-spacing: 4px;
	opacity: 0.8;
}

.orbit-resizer::after {
	content: "drag to resize";
	position: absolute;
	bottom: -1.1rem;
	font-size: 0.65rem;
	color: var(--text-muted);
	letter-spacing: 1px;
}

/* ===============================
   Debris context
=============================== */
.debris-container {
	margin-top: 0.75rem;
	padding: 0.75rem;

	background: rgba(12, 18, 38, 0.95);
	border-left: 3px solid var(--accent-secondary);
	border-radius: var(--radius-sm);

	font-size: 0.85rem;
	line-height: 1.5;
	text-align: center;
}

.debris-container a {
	margin-top: 0.4rem;
	display: inline-block;
	color: var(--accent-secondary);
	text-decoration: none;
}

.debris-container a:hover {
	text-decoration: underline;
}

/* ===============================
   Footer
=============================== */
footer {
	margin-top: 5rem;
	padding-bottom: 2rem;
	text-align: center;
	opacity: 0.6;
	font-size: 0.9rem;
}

/* ===============================
   Mobile optimizations
=============================== */
@media (max-width: 768px) {
	body {
		padding: 1.25rem;
	}

	header h1 {
		font-size: 1.5rem;
	}

	.title-icon {
		height: 2.6em;
		margin-left: 0.3rem;
	}

	header p {
		font-size: 0.9rem;
		line-height: 1.45;
	}

	.satellite {
		padding: 1rem;
		margin-bottom: 1.4rem;
	}

	.satellite strong {
		font-size: 1rem;
	}

	.toggle-btn {
		width: 100%;
		margin: 0.4rem 0 0;
	}

	.orbit-container {
		min-height: 200px;
		max-height: 360px;
	}

	.orbit-resizer {
		display: none;
	}

	.bg-rainbow {
		filter: blur(160px);
		opacity: 0.5;
	}

	.bg-stars {
		opacity: 0.85;
	}

	footer {
		margin-top: 4rem;
		padding-bottom: 2.5rem;
	}
}
