/* Reset styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background-color: #121212;
	color: #fff;
	line-height: 1.6;
}

/* Tambahkan aturan untuk link */
a {
	color: white;
	text-decoration: none;
}

a:visited {
	color: white;
	/* Tetap putih setelah dikunjungi */
}

a:hover {
	color: #ff0000;
	/* Efek hover */
}

a:active {
	color: #ff0000;
	/* Efek saat diklik */
}

.app-container {
	max-width: 480px;
	margin: 0 auto;
	padding: 20px;
	position: relative;
	overflow-x: hidden;
}

/* Header styles */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.user-profile {
	display: flex;
	align-items: center;
	gap: 10px;
}

.user-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}

.user-info h2 {
	font-size: 16px;
	font-weight: 600;
}

.user-info p {
	font-size: 12px;
	color: #aaa;
}

.search-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.search-box {
  position: relative;
  width: 100%;
  max-width: 400px;
}
#searchInput {
  width: 100%;
  padding: 12px 198px 12px 16px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 1rem;
  outline: none;
}
.search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #c1081e;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.search-btn:hover {
  background: #a60014;
}
.search-btn i {
  font-size: 1.1rem;
}

/* Featured movie styles */
.featured-movie {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 30px;
	height: 300px;
}

.featured-poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.overlay-gradient {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 70%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.movie-badge {
	position: absolute;
	top: 20px;
	left: 20px;
	background-color: rgba(255, 0, 0, 0.7);
	color: white;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: bold;
}

.movie-info {
	position: absolute;
	bottom: 20px;
	left: 20px;
	right: 20px;
}

.movie-title {
	font-size: 24px;
	font-weight: 700;
	margin-bottom: 5px;
}

.movie-meta {
	display: flex;
	align-items: center;
	font-size: 12px;
	color: #ccc;
	margin-bottom: 10px;
}

.dot {
	width: 4px;
	height: 4px;
	background-color: #ccc;
	border-radius: 50%;
	margin: 0 8px;
}

.rating {
	margin-bottom: 15px;
	display: flex;
	align-items: center;
}

.rating i {
	color: #ffb800;
	font-size: 14px;
	margin-right: 2px;
}

.rating span {
	font-size: 12px;
	color: #ccc;
	margin-left: 8px;
}

.watch-button {
	background-color: rgb(197 29 49);
	color: white;
	border: none;
	border-radius: 24px;
	padding: 8px 20px;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.watch-button i {
	font-size: 12px;
}

/* Movies section styles */
.movies-section {
	margin-bottom: 30px;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

.section-header h3 {
	font-size: 18px;
	font-weight: 600;
}

.see-all {
	color: #ff0000;
	text-decoration: none;
	font-size: 14px;
}

/* Carousel styles for horizontal scrolling in Popular Movies section */
.movies-carousel {
	position: relative;
	overflow: hidden;
	margin-bottom: 20px;
}

.carousel-container {
	display: flex;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	/* For Firefox */
	-ms-overflow-style: none;
	/* For Internet Explorer and Edge */
	gap: 15px;
	padding: 0 5px 15px 5px;
	margin: 0 -5px;
}

.carousel-container::-webkit-scrollbar {
	display: none;
	/* For Chrome, Safari, and Opera */
}

/* Movie cards for New Movies and grid layouts */
.movie-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 15px;
	margin-bottom: 20px;
}

/* Common movie card styles for both carousel and grid */
.movie-card {
	width: 125px;
	flex-shrink: 0;
}

.card-poster {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	aspect-ratio: 2/3;
	margin-bottom: 8px;
}

.card-poster img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-rating {
	position: absolute;
	top: 8px;
	right: 8px;
	background-color: rgb(0 0 0 / 70%);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 10px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.card-rating i {
	color: #ffb800;
	font-size: 10px;
}

.card-jenis {
	position: absolute;
	bottom: 8px;
	left: 8px;
	background-color: rgb(197 29 49);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 10px;
	display: flex;
	align-items: center;
	gap: 4px;
}

.card-jenis i {
	color: #ffffff;
	font-size: 10px;
}

.movie-card h4 {
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
}

.card-meta {
	font-size: 11px;
	color: #aaa;
	display: flex;
	align-items: center;
}

.card-meta .dot {
	width: 3px;
	height: 3px;
	margin: 0 5px;
}

/* Bottom navigation styles */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	justify-content: space-around;
	background-color: #121212;
	padding: 12px 0 8px;
	max-width: 480px;
	margin: 0 auto;
	border-radius: 20px;
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	color: #fff;
	text-decoration: none;
	font-size: 10px;
}

.nav-item i {
	font-size: 18px;
	margin-bottom: 4px;
}

.nav-item.active {
	color: #ff0000;
}

/* Add some padding to main content to account for the fixed bottom nav */
main {
	padding-bottom: 70px;
}

/* Responsive adjustments */
@media (max-width: 500px) {
	.app-container {
		padding: 15px;
	}

	.featured-movie {
		height: 350px;
	}

	.movie-cards {
		gap: 10px;
	}

	.movie-title {
		font-size: 22px;
	}

	.movie-card {
		width: 115px;
	}
}

/* Responsive adjustments */
@media (max-width: 400px) {
	.app-container {
		padding: 15px;
	}

	.featured-movie {
		height: 350px;
	}

	.movie-cards {
		gap: 10px;
	}

	.movie-title {
		font-size: 22px;
	}

	.movie-card {
		width: 110px;
	}
}

/* Responsive adjustments */
@media (max-width: 300px) {
	.app-container {
		padding: 10px;
	}

	.featured-movie {
		height: 320px;
	}

	.movie-cards {
		gap: 10px;
	}

	.movie-title {
		font-size: 20px;
	}

	.movie-card {
		width: 80px;
	}
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    clear: both;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.pagination a {
    text-decoration: none;
    color: #333;
    background: #f1f1f1;
    padding: 6px 6px 6px 6px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.pagination .page-info {
    color: #ffffff;
    font-weight: bold;
}

.pagination a:hover {
    background: #a90202;
    color: white;
}

.prev-btn, .next-btn {
    min-width: 50px;
    text-align: center;
}

 /* Container utama */
        .category-container {
            width: 100%;
            overflow-x: auto;
            white-space: nowrap;
            padding: 5px 0;
            margin: 10px 0;
            scrollbar-width: none; /* Untuk Firefox */
        }
        
        /* Untuk menyembunyikan scrollbar di Chrome/Safari */
        .category-container::-webkit-scrollbar {
            display: none;
        }
        
        /* Container kategori */
        .categories {
            display: inline-block;
            padding: 0 10px;
        }
        
        /* Style tombol kategori */
        .category-button {
            display: inline-block;
            padding: 5px 10px;
            margin: 0 5px;
            border: 1px solid rgb(197 29 49);
            border-radius: 10px;
            background-color: transparent;
            color: white;
            font-size: 12px;
            font-weight: bold;
            text-decoration: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .category-button:hover {
            background-color: rgb(197 29 49);
            color: white;
        }
        
        /* Style untuk aktif/terpilih */
        .category-button.active {
            background-color: rgb(197 29 49);
            color: white;
        }