:root {
	--bg: #0b0f17;
	--panel: #0f1117;
	--panel-elev: #151923;
	--text: #e5e7eb;
	--muted: #9ba3ae;
	--primary: #e50914; /* Netflix red */
	--accent: #f43f5e;
	--danger: #ef4444;
	--ring: #232a37;
	--card-hover: #1a2030;
 	--space-1: 6px;
 	--space-2: 10px;
 	--space-3: 14px;
 	--space-4: 18px;
 	--space-5: 24px;
 	--radius: 10px;
}

* { box-sizing: border-box; }

html, body {
	height: 100%;
}

	body {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
	background: radial-gradient(1200px 600px at 10% -10%, #0e1220 0%, transparent 60%),
		radial-gradient(900px 500px at 85% -5%, #0b0f1a 0%, transparent 60%),
		radial-gradient(700px 400px at -10% 60%, #101426 0%, transparent 60%),
		var(--bg);
	color: var(--text);
	display: flex;
	flex-direction: column;
}

.container {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 var(--space-3);
}

.app-header {
	position: sticky;
	top: 0;
	background: linear-gradient(180deg, rgba(10, 12, 18, .95), rgba(10, 12, 18, .75));
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--ring);
	z-index: 10;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
}

.logo { font-size: 18px; margin: 0; letter-spacing: .2px; }

.hamburger { display: none; position: relative; width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid var(--ring); background: linear-gradient(180deg, #0f1422, #0b101c); cursor: pointer; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.03); }
.hamburger:after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 8px 20px rgba(0,0,0,.25); pointer-events: none; }
.hamburger span { display: block; width: 20px; height: 2px; background: linear-gradient(90deg, #fff, #cbd5e1); margin: 3px 0; border-radius: 2px; transition: transform .22s ease, opacity .18s ease, background .2s ease; }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav { display: flex; gap: 12px; }
.nav-link {
	color: var(--text);
	text-decoration: none;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius);
	transition: background 0.2s ease;
}
.nav-link:hover { background: #0f172a; }
.nav-link.active { color: #fff; background: rgba(229, 9, 20, 0.12); border: 1px solid rgba(229, 9, 20, .35); }

/* Responsive header/nav */
@media (max-width: 840px) {
	.header-inner { gap: 10px; }
	.hamburger { display: inline-flex; }
	.nav { position: absolute; left: 0; right: 0; top: 64px; background: rgba(10, 12, 18, .98); border-bottom: 1px solid var(--ring); display: grid; gap: var(--space-2); padding: var(--space-2) var(--space-3); transform-origin: top; transform: scaleY(0); opacity: 0; pointer-events: none; transition: transform .18s ease, opacity .18s ease; }
	.nav.open { transform: scaleY(1); opacity: 1; pointer-events: auto; }
}

.main { flex: 1; padding: var(--space-4) 0 var(--space-5); }

.controls {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: var(--space-2);
	margin-bottom: var(--space-3);
}
@media (max-width: 840px) {
	.controls { grid-template-columns: 1fr; }
	.api-key { justify-content: flex-start; }
}

.search input {
	width: 100%;
	background: var(--panel-elev);
	color: var(--text);
	border: 1px solid var(--ring);
	border-radius: var(--radius);
	outline: none;
	padding: var(--space-2) var(--space-3);
	box-shadow: 0 0 0 2px transparent;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(229,9,20,.25); }

.api-key { display: flex; gap: var(--space-2); }
.api-key input {
	width: 220px;
	background: var(--panel-elev);
	color: var(--text);
	border: 1px solid var(--ring);
	border-radius: var(--radius);
	padding: var(--space-2) var(--space-3);
}

.btn {
	background: linear-gradient(135deg, var(--primary), #b20710);
	color: #ffffff;
	font-weight: 700;
	border: none;
	border-radius: var(--radius);
	padding: var(--space-2) var(--space-3);
	cursor: pointer;
	transition: transform 0.08s ease, filter 0.2s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }

.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-3);
}

@media (min-width: 640px) {
	.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
	.grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
	.grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1536px) {
	.grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* Hero */
#hero { margin-bottom: var(--space-4); }
.hero {
	position: relative;
	border: 1px solid var(--ring);
	border-radius: calc(var(--radius) + 6px);
	overflow: hidden;
	background: #0e121d;
}
.hero-backdrop { position: relative; width: 100%; aspect-ratio: 16/7; background: #0f172a; }
.hero-backdrop img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.75) saturate(1.1); }
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(80% 70% at 20% 30%, rgba(10,12,18,.0), rgba(10,12,18,.7) 55%, rgba(10,12,18,.9)); }
.hero-content {
	position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-4); display: grid; gap: var(--space-2);
}
.hero-title { font-size: 22px; margin: 0; }
.hero-meta { color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; gap: var(--space-2); }
.hero-actions .btn-secondary { background: rgba(0,0,0,.35); }
@media (min-width: 900px) {
	.hero-title { font-size: 28px; }
	.hero-content { padding: var(--space-5); }
}

.card {
	background: linear-gradient(180deg, rgba(20, 24, 37, .7), rgba(20, 24, 37, .5));
	border: 1px solid var(--ring);
	border-radius: calc(var(--radius) + 4px);
	overflow: hidden;
	transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #2b3547; box-shadow: 0 10px 24px rgba(0,0,0,.35); }

.poster-wrap { position: relative; aspect-ratio: 2/3; background: #0f172a; }
.poster {
	width: 100%; height: 100%; object-fit: cover; display: block;
}

.card-body { padding: var(--space-2); display: grid; gap: var(--space-2); }
.title {
	font-size: 14px; line-height: 1.2; margin: 0;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meta { font-size: 12px; color: var(--muted); }

.card-actions { display: flex; gap: var(--space-2); }
.btn-secondary {
	background: #131a2a;
	color: var(--text);
	border: 1px solid var(--ring);
	border-radius: var(--radius);
	padding: calc(var(--space-2) - 2px) var(--space-3);
	cursor: pointer;
}
.btn-remove { border-color: rgba(239, 68, 68, .35); color: #fecaca; }
.btn-remove:hover { background: rgba(239, 68, 68, .1); }

.empty { text-align: center; color: var(--muted); padding: var(--space-5) 0; }

.footer { border-top: 1px solid var(--ring); background: #0b0f17; }
.footer .container { padding: var(--space-3); }
.footer a { color: var(--primary); }

/* Contact CTA */
.contact-cta {
	padding: var(--space-5) 0;
	background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.contact-card {
	background: #ffffff;
	border-radius: calc(var(--radius) + 8px);
	padding: var(--space-5);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	max-width: 500px;
	margin: 0 auto;
	text-align: center;
}

.contact-card h2 {
	color: #1e293b;
	font-size: 28px;
	font-weight: 700;
	margin: 0 0 var(--space-3) 0;
}

.contact-card p {
	color: #64748b;
	font-size: 16px;
	margin: 0 0 var(--space-4) 0;
	line-height: 1.5;
}

.contact-links {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

.contact-link {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-3);
	background: #f8fafc;
	border-radius: var(--radius);
	text-decoration: none;
	color: #334155;
	font-weight: 500;
	transition: all 0.2s ease;
	border: 1px solid #e2e8f0;
}

.contact-link:hover {
	background: #e2e8f0;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-icon {
	font-size: 18px;
}

@media (min-width: 640px) {
	.contact-links {
		flex-direction: row;
		justify-content: center;
		flex-wrap: wrap;
	}
	
	.contact-link {
		flex: 1;
		min-width: 200px;
		justify-content: center;
	}
}

/* Skeletons */
.skeleton-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (min-width: 640px) { .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .skeleton-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.skeleton-card { background: var(--panel-elev); border: 1px solid var(--ring); border-radius: calc(var(--radius) + 4px); overflow: hidden; }
.skeleton-poster { aspect-ratio: 2/3; background: linear-gradient(90deg, #131826, #0f1422, #131826); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.skeleton-meta { padding: var(--space-2); height: 48px; background: linear-gradient(90deg, #121725, #0f1422, #121725); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }

/* Missing key banner */
.banner {
	margin: 8px 0 16px;
	background: rgba(229, 9, 20, .1);
	border: 1px dashed rgba(229, 9, 20, .45);
	color: #ffd1d6;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius);
}

/* First-time guide */
.guide-box {
	margin: 10px 0 18px;
	background: linear-gradient(180deg, rgba(20,24,37,.5), rgba(20,24,37,.35));
	border: 1px solid var(--ring);
	border-radius: var(--radius);
	padding: var(--space-3);
}
.guide-box h3 { margin: 0 0 8px 0; font-size: 16px; }
.guide-box ol { margin: 0 0 8px 18px; color: var(--muted); }
.guide-box code { background: #0f172a; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--ring); }
.guide-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }


