/* ============================================
   AI MODELS GUIDE — "Neural Observatory"
   Dark-first, glassy, luminous accents
   ============================================ */

/* --- Shell & Ambient Layers --- */
.guide-shell {
	--guide-bg: #07070e;
	--guide-surface: rgba(255, 255, 255, 0.025);
	--guide-surface-hover: rgba(255, 255, 255, 0.045);
	--guide-border: rgba(255, 255, 255, 0.07);
	--guide-border-hover: rgba(255, 255, 255, 0.14);
	--guide-text: #ededf0;
	--guide-text-dim: #a8a8bc;
	--guide-text-faint: #727286;

	min-height: 100vh;
	background: transparent;
	color: var(--guide-text);
	position: relative;
	overflow-x: hidden;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.bg-glow {
	position: fixed;
	pointer-events: none;
	z-index: 0;
	border-radius: 50%;
	filter: blur(100px);
}

.bg-glow--hero {
	width: 800px;
	height: 600px;
	top: -200px;
	left: 50%;
	transform: translateX(-50%);
	background: radial-gradient(ellipse, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 50%, transparent 70%);
}

.bg-glow--mid {
	width: 600px;
	height: 400px;
	top: 60%;
	right: -200px;
	background: radial-gradient(ellipse, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
}

.guide-shell > *:not(.bg-glow) {
	position: relative;
	z-index: 1;
}


/* --- Main --- */
.guide-main {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 2rem 4rem;
}

/* --- Hero --- */
.hero {
	padding: 5rem 0 3rem;
	text-align: center;
}

.hero-title {
	font-family: 'Fira Code', monospace;
	font-size: clamp(2.4rem, 5.5vw, 4rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: var(--guide-text);
	margin: 0 0 1.5rem;
}

.hero-title-accent {
	background: linear-gradient(135deg, #c084fc 0%, #60a5fa 40%, #06b6d4 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.hero-subtitle {
	font-size: 1.1rem;
	line-height: 1.65;
	color: var(--guide-text-dim);
	max-width: 520px;
	margin: 0 auto 1.75rem;
}

.hero-badge {
	display: inline-block;
	font-family: 'Fira Code', monospace;
	font-size: 0.75rem;
	font-weight: 500;
	color: #60a5fa;
	border: 1px solid rgba(96, 165, 250, 0.3);
	background: rgba(96, 165, 250, 0.08);
	border-radius: 100px;
	padding: 0.35rem 1rem;
	letter-spacing: 0.04em;
}

/* --- Section Labels --- */
.section {
	margin-top: 4rem;
}

.section-label {
	font-family: 'Fira Code', monospace;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--guide-text-dim);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1.75rem;
}

.section-label-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #60a5fa;
	box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

/* --- Quick Reference Table --- */
.ref-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--guide-border);
	border-radius: 12px;
	background: var(--guide-bg);
}

.ref-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.ref-table thead th {
	font-family: 'Fira Code', monospace;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--guide-text-dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 1rem 1.25rem;
	text-align: left;
	border-bottom: 1px solid var(--guide-border);
	white-space: nowrap;
}

.ref-table tbody tr {
	transition: background 0.15s;
}

.ref-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.025);
}

.ref-table tbody td {
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.03);
	vertical-align: middle;
}

.ref-table tbody tr:last-child td {
	border-bottom: none;
}

.ref-table tbody td:first-child {
	white-space: nowrap;
}

.ref-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dot-color);
	box-shadow: 0 0 6px color-mix(in srgb, var(--dot-color) 50%, transparent);
	margin-right: 0.6rem;
	vertical-align: middle;
}

.ref-model {
	font-weight: 600;
	color: var(--guide-text);
}

.ref-company {
	color: var(--guide-text-dim);
}

.ref-badge {
	display: inline-block;
	font-family: 'Fira Code', monospace;
	font-size: 0.72rem;
	font-weight: 500;
	padding: 0.25rem 0.65rem;
	border-radius: 100px;
	background: color-mix(in srgb, var(--badge-color) 12%, transparent);
	color: var(--badge-color);
	white-space: nowrap;
}

.ref-diff {
	color: var(--guide-text-dim);
	font-size: 0.84rem;
}

/* --- Restricted Note --- */
.restricted-note {
	font-size: 0.88rem;
	color: var(--guide-text-dim);
	line-height: 1.6;
	padding: 0.85rem 1.25rem;
	background: var(--guide-bg);
	border-radius: 10px;
	border-left: 3px solid #ef4444;
	margin-bottom: 1.5rem;
}

[data-theme="light"] .restricted-note {
	background: #ffffff;
}

/* --- Model Cards --- */
.model-grid {
	display: grid;
	gap: 1.25rem;
}

.model-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

.model-card {
	background: var(--guide-bg);
	border: 1px solid var(--guide-border);
	border-radius: 14px;
	padding: 1.75rem;
	transition: all 0.3s ease;
	position: relative;
}

.model-card::before {
	content: '';
	position: absolute;
	inset: -1px;
	border-radius: 15px;
	padding: 1px;
	background: linear-gradient(135deg, transparent 40%, var(--card-accent) 100%);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.model-card:hover {
	background: var(--guide-surface-hover);
	border-color: transparent;
	box-shadow: 0 0 40px color-mix(in srgb, var(--card-accent) 10%, transparent);
	transform: translateY(-2px);
}

.model-card:hover::before {
	opacity: 1;
}

.model-card-head {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	margin-bottom: 1rem;
}

.model-card-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--card-accent);
	box-shadow: 0 0 10px color-mix(in srgb, var(--card-accent) 50%, transparent);
	flex-shrink: 0;
	margin-top: 0.35rem;
}

.model-card-name {
	font-family: 'Fira Code', monospace;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--guide-text);
	margin: 0 0 0.2rem;
	line-height: 1.2;
}

.model-card-meta {
	font-size: 0.78rem;
	color: var(--guide-text-faint);
	letter-spacing: 0.01em;
}

.model-card-tagline {
	font-size: 0.92rem;
	color: var(--guide-text-dim);
	line-height: 1.55;
	margin: 0 0 1.15rem;
	font-style: italic;
}

.model-card-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.model-card-list li {
	font-size: 0.84rem;
	color: var(--guide-text-dim);
	line-height: 1.5;
	padding-left: 1.1rem;
	position: relative;
}

.model-card-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--card-accent);
	opacity: 0.6;
}

.model-card-footer {
	padding-top: 1rem;
	border-top: 1px solid var(--guide-border);
}

.model-card-best {
	font-family: 'Fira Code', monospace;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--card-accent);
	letter-spacing: 0.01em;
}

/* --- Image/Video Cards --- */
.media-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}

.media-card {
	background: var(--guide-bg);
	border: 1px solid var(--guide-border);
	border-radius: 12px;
	padding: 1.5rem;
	transition: all 0.25s;
}

.media-card:hover {
	background: var(--guide-surface-hover);
	border-color: var(--guide-border-hover);
	transform: translateY(-2px);
}

.media-card-name {
	font-family: 'Fira Code', monospace;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--guide-text);
	margin: 0 0 0.3rem;
}

.media-card-company {
	font-size: 0.75rem;
	color: var(--guide-text-faint);
	display: block;
	margin-bottom: 0.75rem;
}

.media-card-desc {
	font-size: 0.82rem;
	color: var(--guide-text-dim);
	line-height: 1.5;
	margin: 0;
}

.media-note {
	margin-top: 1.25rem;
	font-size: 0.85rem;
	color: var(--guide-text-dim);
	line-height: 1.6;
	padding: 1rem 1.25rem;
	background: var(--guide-bg);
	border-radius: 10px;
	border-left: 3px solid #818cf8;
}

.media-note strong {
	color: var(--guide-text);
}

/* --- Scenario Cards --- */
.scenario-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.scenario-card {
	background: var(--guide-bg);
	border: 1px solid var(--guide-border);
	border-radius: 14px;
	padding: 1.5rem;
	transition: all 0.25s;
	position: relative;
	overflow: hidden;
}

.scenario-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--scenario-accent);
	opacity: 0.6;
	transition: opacity 0.25s;
}

.scenario-card:hover {
	border-color: var(--guide-border-hover);
	transform: translateY(-2px);
	box-shadow: 0 0 30px color-mix(in srgb, var(--scenario-accent) 6%, transparent);
}

.scenario-card:hover::before {
	opacity: 1;
}

.scenario-title {
	font-family: 'Fira Code', monospace;
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--guide-text);
	margin: 0 0 1.15rem;
}

.scenario-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.scenario-task {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.scenario-task:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.scenario-task-label {
	font-size: 0.82rem;
	color: var(--guide-text-dim);
	line-height: 1.45;
}

.scenario-task-model {
	font-family: 'Fira Code', monospace;
	font-size: 0.7rem;
	font-weight: 600;
	color: var(--dm-color);
	background: color-mix(in srgb, var(--dm-color) 10%, transparent);
	padding: 0.2rem 0.6rem;
	border-radius: 100px;
	white-space: nowrap;
	flex-shrink: 0;
	line-height: 1.4;
}

/* --- Closing --- */
.closing {
	text-align: center;
	padding: 3rem 0 0;
}

.closing-text {
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--guide-text-dim);
	max-width: 560px;
	margin: 0 auto;
	font-style: italic;
}

.closing-radar {
	display: inline-flex;
	align-items: center;
	gap: 2rem;
	margin-top: 2.5rem;
	background: var(--guide-bg);
	border: 1px solid var(--guide-border);
	border-radius: 14px;
	padding: 1.5rem 2rem;
}

.radar-scope {
	position: relative;
	width: 110px;
	height: 80px;
	flex-shrink: 0;
	overflow: hidden;
}

/* Arcs — upward-facing semicircles anchored at bottom center */
.radar-arc {
	position: absolute;
	border: 1px dotted rgba(96, 165, 250, 0.3);
	border-radius: 50%;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
}

.radar-arc--1 {
	width: 200px;
	height: 200px;
	bottom: -100px;
}

.radar-arc--2 {
	width: 140px;
	height: 140px;
	bottom: -70px;
}

.radar-arc--3 {
	width: 80px;
	height: 80px;
	bottom: -40px;
}

/* Base circle at bottom */
.radar-base {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1.5px solid rgba(96, 165, 250, 0.5);
	background: rgba(96, 165, 250, 0.1);
	bottom: -5px;
	left: 50%;
	transform: translateX(-50%);
}

/* Sweep beam — wedge projecting upward from base */
.radar-beam {
	position: absolute;
	width: 200px;
	height: 200px;
	bottom: -100px;
	left: 50%;
	transform: translateX(-50%);
	border-radius: 50%;
	background: conic-gradient(
		from 240deg,
		transparent 0deg,
		rgba(96, 165, 250, 0.12) 20deg,
		rgba(96, 165, 250, 0.06) 40deg,
		transparent 60deg
	);
	transform-origin: center;
	animation: beamSweep 4s linear infinite;
}

/* Blips — colored dots scattered in the scan area */
.radar-blip {
	position: absolute;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	animation: blipPulse 3s ease-in-out infinite;
}

.radar-blip--1 {
	background: #c084fc;
	box-shadow: 0 0 6px rgba(192, 132, 252, 0.6);
	top: 28%;
	left: 38%;
	animation-delay: 0s;
}

.radar-blip--2 {
	background: #10b981;
	box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
	top: 12%;
	left: 62%;
	animation-delay: 1s;
}

.radar-blip--3 {
	background: #f97316;
	box-shadow: 0 0 6px rgba(249, 115, 22, 0.6);
	top: 42%;
	left: 70%;
	animation-delay: 2s;
}

.radar-blip--4 {
	background: #60a5fa;
	box-shadow: 0 0 6px rgba(96, 165, 250, 0.6);
	top: 8%;
	left: 30%;
	animation-delay: 0.5s;
}

.radar-text {
	font-size: 0.82rem;
	color: var(--guide-text-dim);
	text-align: left;
	max-width: 320px;
	line-height: 1.6;
	margin: 0;
}

@keyframes beamSweep {
	from { transform: translateX(-50%) rotate(0deg); }
	to { transform: translateX(-50%) rotate(360deg); }
}

@keyframes blipPulse {
	0%, 100% { opacity: 0.4; transform: scale(1); }
	50% { opacity: 1; transform: scale(1.4); }
}

/* Light mode radar */
[data-theme="light"] .closing-radar {
	background: #ffffff;
}

[data-theme="light"] .radar-arc {
	border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .radar-base {
	border-color: rgba(37, 99, 235, 0.4);
	background: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .radar-beam {
	background: conic-gradient(
		from 240deg,
		transparent 0deg,
		rgba(37, 99, 235, 0.1) 20deg,
		rgba(37, 99, 235, 0.05) 40deg,
		transparent 60deg
	);
}

@media (max-width: 480px) {
	.closing-radar {
		flex-direction: column;
		gap: 1.25rem;
	}

	.radar-text {
		text-align: center;
	}
}


/* ============================
   LIGHT MODE
   ============================ */
[data-theme="light"] .guide-shell {
	--guide-bg: #fafafa;
	--guide-surface: rgba(0, 0, 0, 0.025);
	--guide-surface-hover: rgba(0, 0, 0, 0.04);
	--guide-border: rgba(0, 0, 0, 0.08);
	--guide-border-hover: rgba(0, 0, 0, 0.15);
	--guide-text: #1a1a2e;
	--guide-text-dim: #555566;
	--guide-text-faint: #888899;
}


[data-theme="light"] .bg-glow--hero {
	background: radial-gradient(ellipse, rgba(139, 92, 246, 0.04) 0%, rgba(59, 130, 246, 0.02) 50%, transparent 70%);
}

[data-theme="light"] .bg-glow--mid {
	background: radial-gradient(ellipse, rgba(6, 182, 212, 0.03) 0%, transparent 70%);
}

[data-theme="light"] .hero-badge {
	color: #2563eb;
	border-color: rgba(37, 99, 235, 0.3);
	background: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .hero-title {
	color: var(--guide-text);
}

[data-theme="light"] .hero-title-accent {
	background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 40%, #0891b2 100%);
	-webkit-background-clip: text;
	background-clip: text;
}

[data-theme="light"] .model-card {
	background: #ffffff;
	border-color: var(--guide-border);
}

[data-theme="light"] .model-card:hover {
	background: #ffffff;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08), 0 0 30px color-mix(in srgb, var(--card-accent) 8%, transparent);
}

[data-theme="light"] .ref-table-wrap {
	background: #ffffff;
}

[data-theme="light"] .ref-table tbody tr:hover {
	background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ref-table tbody td {
	border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ref-table thead th {
	border-bottom-color: var(--guide-border);
}

[data-theme="light"] .media-card {
	background: #ffffff;
}

[data-theme="light"] .media-note {
	background: #ffffff;
}

[data-theme="light"] .scenario-card {
	background: #ffffff;
}

[data-theme="light"] .scenario-task {
	border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .model-card-footer {
	border-top-color: rgba(0, 0, 0, 0.06);
}

/* Light mode color accessibility — darken accent colors for contrast */
[data-theme="light"] .ref-badge {
	filter: brightness(0.62) saturate(1.3);
}

[data-theme="light"] .model-card-best {
	filter: brightness(0.62) saturate(1.3);
}

[data-theme="light"] .scenario-task-model {
	filter: brightness(0.62) saturate(1.3);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
	.media-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.scenario-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.guide-main {
		padding: 0 1.25rem 3rem;
	}

	.hero {
		padding: 3.5rem 0 2rem;
	}

	.hero-title {
		font-size: clamp(2rem, 8vw, 2.8rem);
	}

	.hero-subtitle {
		font-size: 1rem;
	}

	.section {
		margin-top: 3rem;
	}

	.model-grid--2 {
		grid-template-columns: 1fr;
	}

	.model-card {
		padding: 1.35rem;
	}

	.media-grid {
		grid-template-columns: 1fr;
	}

	.scenario-grid {
		grid-template-columns: 1fr;
	}

	.ref-table {
		font-size: 0.82rem;
	}

	.ref-table thead th {
		padding: 0.75rem 1rem;
	}

	.ref-table tbody td {
		padding: 0.7rem 1rem;
	}

	.ref-diff {
		font-size: 0.78rem;
		max-width: 200px;
	}
}

@media (max-width: 480px) {
	.hero-title {
		font-size: 1.8rem;
	}
}
