/* Netflix-like CSS Variables */
:root {
	--netflix-red: #e50914;
	--netflix-black: #000000;
	--netflix-dark: #141414;
	--netflix-gray: #333333;
	--netflix-light-gray: #666666;
	--netflix-white: #ffffff;
	--netflix-text: #ffffff;
	--netflix-text-secondary: #b3b3b3;
	--netflix-bg: #000000;
	--netflix-card-bg: #181818;
	--netflix-hover-bg: #2a2a2a;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	background: var(--netflix-bg);
	color: var(--netflix-text);
	line-height: 1.4;
	overflow-x: hidden;
}

/* Netflix Header */
.app-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
	padding: 20px 60px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: background-color 0.3s ease;
}

.app-header.scrolled {
	background: var(--netflix-dark);
}

.app-header h1 {
	font-size: 24px;
	font-weight: 700;
	color: var(--netflix-red);
	text-decoration: none;
}

.header-controls {
	display: flex;
	align-items: center;
	gap: 30px;
}

.type-nav {
	display: flex;
	gap: 20px;
}

.type-nav a {
	color: var(--netflix-text-secondary);
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	transition: color 0.3s ease;
	position: relative;
}

.type-nav a:hover,
.type-nav a.active {
	color: var(--netflix-text);
}

.type-nav a.active::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--netflix-red);
}

.search-form {
	display: flex;
	align-items: center;
	gap: 10px;
}

.search-form input {
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 4px;
	padding: 8px 16px;
	color: var(--netflix-text);
	font-size: 14px;
	min-width: 300px;
	backdrop-filter: blur(10px);
}

.search-form input::placeholder {
	color: var(--netflix-text-secondary);
}

.search-form input:focus {
	outline: none;
	border-color: var(--netflix-red);
	background: rgba(255,255,255,0.2);
}

.search-form button {
	background: var(--netflix-red);
	border: none;
	border-radius: 4px;
	padding: 8px 16px;
	color: white;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.search-form button:hover {
	background: #f40612;
}

/* Main Content */
main {
	margin-top: 80px;
	padding: 0 60px;
}

/* Hero Section */
.hero-section {
	position: relative;
	height: 70vh;
	background: linear-gradient(45deg, #000 0%, #333 100%);
	display: flex;
	align-items: center;
	margin-bottom: 40px;
	border-radius: 8px;
	overflow: hidden;
}

.hero-content {
	position: relative;
	z-index: 2;
	max-width: 600px;
	padding: 0 40px;
}

.hero-title {
	font-size: 48px;
	font-weight: 700;
	margin-bottom: 16px;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-description {
	font-size: 18px;
	color: var(--netflix-text-secondary);
	margin-bottom: 24px;
	line-height: 1.5;
}

.hero-buttons {
	display: flex;
	gap: 16px;
}

.btn {
	padding: 12px 24px;
	border-radius: 4px;
	font-weight: 600;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.3s ease;
	cursor: pointer;
	border: none;
	font-size: 16px;
}

.btn-primary {
	background: var(--netflix-white);
	color: var(--netflix-black);
}

.btn-primary:hover {
	background: rgba(255,255,255,0.8);
}

.btn-secondary {
	background: rgba(109,109,110,0.7);
	color: var(--netflix-text);
}

.btn-secondary:hover {
	background: rgba(109,109,110,0.9);
}

/* Content Sections */
.content-section {
	margin-bottom: 50px;
}

.section-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 16px;
	color: var(--netflix-text);
}

/* Netflix-style Grid */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px;
	margin-bottom: 20px;
}

/* Netflix-style horizontal rows */
.row-section {
    position: relative;
}

.row-section .row-controls {
    position: absolute;
    right: 0;
    top: -36px;
    display: flex;
    gap: 8px;
}

.row-section .row-prev,
.row-section .row-next {
    background: rgba(255,255,255,0.1);
    color: var(--netflix-text);
    border: 1px solid rgba(255,255,255,0.2);
    width: 32px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
}

.row-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 200px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-behavior: smooth;
}

.row-cards .card {
    width: 200px;
    min-width: 200px;
}

/* Netflix-style Cards */
.card {
	position: relative;
	background: var(--netflix-card-bg);
	border-radius: 4px;
	overflow: hidden;
	transition: transform 0.3s ease, z-index 0.3s ease;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
}

.card:hover {
	transform: scale(1.1);
	z-index: 10;
}

.thumb {
	aspect-ratio: 16/9;
	position: relative;
	overflow: hidden;
	background: var(--netflix-gray);
}

.thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.card:hover .thumb img {
	transform: scale(1.05);
}

.thumb-fallback {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 48px;
	opacity: 0.7;
	color: var(--netflix-text-secondary);
}

.meta {
	padding: 12px;
	background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.card:hover .meta {
	opacity: 1;
}

.title {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
	color: var(--netflix-text);
}

.info {
	display: flex;
	gap: 8px;
	font-size: 12px;
	color: var(--netflix-text-secondary);
	flex-wrap: wrap;
}

.info span {
	white-space: nowrap;
}

.genres {
	font-size: 11px;
	color: var(--netflix-text-secondary);
	margin-top: 4px;
}

/* Empty State */
.empty {
	text-align: center;
	padding: 60px 20px;
	color: var(--netflix-text-secondary);
	font-size: 18px;
}

.error {
	background: rgba(229,9,20,0.1);
	border: 1px solid var(--netflix-red);
	border-radius: 4px;
	padding: 20px;
	margin: 20px 0;
	color: var(--netflix-red);
}

/* Watch Page */
.watch {
	padding: 0 60px;
	max-width: 1400px;
	margin: 0 auto;
}

.breadcrumbs {
	padding: 20px 0;
	color: var(--netflix-text-secondary);
}

.breadcrumbs a {
	color: var(--netflix-text-secondary);
	text-decoration: none;
	transition: color 0.3s ease;
}

.breadcrumbs a:hover {
	color: var(--netflix-text);
}

.watch-header {
	display: flex;
	gap: 20px;
	align-items: center;
	margin-bottom: 30px;
	flex-wrap: wrap;
}

.watch-header h2 {
	font-size: 32px;
	font-weight: 700;
	margin: 0;
}

.watch-header .year {
	color: var(--netflix-text-secondary);
	font-size: 18px;
}

.watch-header .rating {
	color: #ffd700;
	font-size: 16px;
}

.video {
	width: 100%;
	background: var(--netflix-black);
	border-radius: 8px;
	margin-bottom: 30px;
}

/* Episodes */
.episodes {
	margin-top: 40px;
}

.episodes h3 {
	font-size: 24px;
	font-weight: 600;
	margin-bottom: 20px;
}

.episode-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.episode {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	background: var(--netflix-card-bg);
	border-radius: 8px;
	transition: background-color 0.3s ease;
}

.episode:hover {
	background: var(--netflix-hover-bg);
}

.episode-info {
	flex: 1;
}

.episode h4 {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 8px;
}

.episode-overview {
	color: var(--netflix-text-secondary);
	font-size: 14px;
	margin: 8px 0;
	line-height: 1.4;
}

.episode-runtime {
	color: var(--netflix-text-secondary);
	font-size: 12px;
}

.play-episode {
	background: var(--netflix-red);
	color: white;
	padding: 10px 20px;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	transition: background-color 0.3s ease;
}

.play-episode:hover {
	background: #f40612;
}

/* Overview and Genres */
.overview {
	margin-top: 40px;
}

.overview h3 {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 12px;
}

.overview p {
	color: var(--netflix-text-secondary);
	line-height: 1.6;
	font-size: 16px;
}

.genres {
	margin-top: 30px;
}

.genres h3 {
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 12px;
}

.genre-tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.genre-tag {
	background: var(--netflix-gray);
	color: var(--netflix-text);
	padding: 6px 12px;
	border-radius: 16px;
	font-size: 12px;
	font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in {
	animation: fadeIn 0.6s ease-out forwards;
	opacity: 0;
}

/* Netflix-style loading animation */
@keyframes shimmer {
	0% {
		background-position: -200px 0;
	}
	100% {
		background-position: calc(200px + 100%) 0;
	}
}

.loading {
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200px 100%;
	animation: shimmer 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
	.app-header {
		padding: 15px 20px;
	}
	
	.app-header h1 {
		font-size: 20px;
	}
	
	main {
		padding: 0 20px;
	}
	
	.hero-title {
		font-size: 32px;
	}
	
	.hero-description {
		font-size: 16px;
	}
	
	.grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
	
	.watch {
		padding: 0 20px;
	}
	
	.watch-header h2 {
		font-size: 24px;
	}
	
	.search-form input {
		min-width: 200px;
	}
}

@media (max-width: 480px) {
	.header-controls {
		flex-direction: column;
		gap: 15px;
	}
	
	.type-nav {
		flex-wrap: wrap;
		gap: 10px;
	}
	
	.hero-buttons {
		flex-direction: column;
		align-items: flex-start;
	}
	
	.grid {
		grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	}
}

