/* Astro APOD — front-end styles */

.astroapod {
	--ap-bg-1: #0b1026;
	--ap-bg-2: #05060f;
	--ap-fg: #eef2ff;
	--ap-muted: #9aa6c9;
	--ap-accent: #cdd7ff;
	--ap-border: rgba(255, 255, 255, 0.1);

	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0 auto;
	border-radius: 16px;
	overflow: hidden;
	background: radial-gradient(120% 120% at 50% 0%, var(--ap-bg-1) 0%, var(--ap-bg-2) 80%);
	color: var(--ap-fg);
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.astroapod * {
	box-sizing: border-box;
}

.astroapod--light {
	--ap-bg-1: #f4f6fc;
	--ap-bg-2: #e7ecf7;
	--ap-fg: #1a2238;
	--ap-muted: #5b6688;
	--ap-accent: #2b3a78;
	--ap-border: rgba(20, 30, 60, 0.12);
	box-shadow: 0 14px 36px rgba(40, 60, 110, 0.16);
}

.astroapod .astroapod__figure {
	margin: 0;
	padding: 0;
}

.astroapod .astroapod__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.astroapod .astroapod__frame {
	position: relative;
	display: block;
	background: #000;
	line-height: 0;
}

.astroapod .astroapod__img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border: 0;
	border-radius: 0;
	max-width: 100%;
}

/* Video play badge */
.astroapod .astroapod__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	font-size: 22px;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	padding-left: 4px;
	transition: background 0.2s ease, transform 0.2s ease;
}

.astroapod .astroapod__play[hidden] {
	display: none;
}

.astroapod .astroapod__link:hover .astroapod__play {
	background: rgba(0, 0, 0, 0.75);
	transform: translate(-50%, -50%) scale(1.06);
}

.astroapod .astroapod__caption {
	padding: 14px 16px 12px;
	text-align: left;
}

.astroapod .astroapod__title {
	font-size: 1.12rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.25;
	color: var(--ap-fg);
	text-wrap: balance;
}

.astroapod .astroapod__date {
	margin-top: 4px;
	font-size: 0.74rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--ap-muted);
}

.astroapod .astroapod__credit {
	margin-top: 8px;
	font-size: 0.78rem;
	line-height: 1.4;
	color: var(--ap-muted);
}

.astroapod .astroapod__credit[hidden] {
	display: none;
}

.astroapod .astroapod__brand {
	padding: 0 16px 14px;
	text-align: left;
}

.astroapod .astroapod__brand a {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ap-accent);
	text-decoration: none;
	opacity: 0.85;
}

.astroapod .astroapod__brand a:hover {
	opacity: 1;
	text-decoration: underline;
}

/* Empty state before the first fetch completes */
.astroapod .astroapod__img[src=""] {
	min-height: 180px;
	background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.03) 12px, transparent 12px, transparent 24px);
}
