:root { --primary-color: #e50914; --dark-color: #141414; --light-color: #f4f4f4; --grey-color: #333; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; -webkit-font-smoothing: antialiased; background: var(--dark-color); color: var(--light-color); }
a { color: var(--light-color); text-decoration: none; }
header { position: fixed; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 15px 50px; z-index: 1000; background-color: var(--dark-color); box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); text-transform: uppercase; }
.nav-wrapper { display: flex; align-items: center; gap: 20px; }
#search-form { display: flex; align-items: center; background: rgba(0,0,0,0.5); border: 1px solid var(--grey-color); border-radius: 5px; }
#search-input { background: transparent; border: none; outline: none; color: var(--light-color); padding: 8px 15px; font-size: 1rem; }
#search-form button { background: transparent; border: none; color: var(--light-color); padding: 8px 15px; cursor: pointer; font-size: 1.1rem; }
.nav-btn { background: transparent; border: 1px solid var(--grey-color); color: #ccc; padding: 8px 15px; border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background-color 0.2s; }
.nav-btn:hover { background-color: var(--grey-color); }
.nav-btn i { color: var(--primary-color); }
.hamburger-menu { display: none; font-size: 1.5rem; background: none; border: none; color: white; cursor: pointer; z-index: 1001; }
#main-content { padding: 120px 50px 0 50px; }
.search-helper-message { background-color: #222; color: #ccc; text-align: center; padding: 10px; border-radius: 8px; margin-bottom: 30px; }
.search-helper-message i { margin-right: 8px; color: var(--primary-color); }
.movies-category { margin-bottom: 40px; }
.movies-category h2 { font-size: 1.8rem; margin-bottom: 20px; }
.swiper-container { width: 100%; padding: 10px 0; position: relative; }
.swiper-slide { width: 180px; }
a.movie-card { display: block; width: 100%; aspect-ratio: 2 / 3; position: relative; border-radius: 8px; overflow: hidden; background-color: var(--grey-color); transition: transform 0.3s ease, z-index 0s 0.15s; }
a.movie-card:hover { transform: scale(1.1); z-index: 10; }
a.movie-card img { width: 100%; height: 100%; object-fit: cover; }
.movie-info { position: absolute; bottom: 0; left: 0; width: 100%; padding: 10px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); opacity: 0; transition: opacity 0.3s ease; }
a.movie-card:hover .movie-info { opacity: 1; }
.movie-info h3 { font-size: 0.9rem; white-space: normal; text-align: center; line-height: 1.3; max-height: 2.6em; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px; }
.movie-info span { font-size: 0.8rem; display: block; text-align: center; }
.swiper-button-next, .swiper-button-prev { background-color: rgba(20, 20, 20, 0.7); color: white; width: 40px; height: 100%; top: 0; margin-top: 0; transition: opacity 0.3s; opacity: 0; }
.swiper-container:hover .swiper-button-next, .swiper-container:hover .swiper-button-prev { opacity: 1; }
.swiper-button-next { right: 0; }
.swiper-button-prev { left: 0; }
.swiper-button-next::after, .swiper-button-prev::after { font-size: 20px; font-weight: bold; }
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.movie-detail-container { width: 100%; }
.back-button { position: absolute; top: 30px; left: 50px; z-index: 110; background: rgba(0,0,0,0.5); color: white; padding: 10px 15px; border-radius: 50px; font-weight: 500; transition: background 0.3s; }
#movie-detail-hero { height: 100vh; padding: 0 50px; display: flex; align-items: center; gap: 40px; position: relative; background-size: cover; background-position: center; }
#movie-detail-hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(20,20,20,0.3) 0%, rgba(20,20,20,0.9) 100%), linear-gradient(to top, var(--dark-color) 10%, transparent 50%); z-index: 1; }
.poster-box { width: 280px; flex-shrink: 0; z-index: 2; }
.poster-box img { width: 100%; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.detail-box { z-index: 2; max-width: 60%; }
.title-logo { margin-bottom: 25px; }
.title-logo img { max-height: 120px; max-width: 100%; width: auto; filter: drop-shadow(2px 4px 6px black); }
.detail-box h1.fallback-title { font-size: 4rem; font-weight: 700; text-transform: uppercase; margin-bottom: 25px; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); }
.meta-info { display: flex; align-items: center; gap: 20px; font-size: 1rem; color: #ccc; margin-bottom: 15px; }
.meta-info span { display: flex; align-items: center; gap: 8px; }
.meta-info .fa-star { color: #f5c518; }
.genres { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.genres .genre-tag { background-color: var(--primary-color); color: white; padding: 6px 15px; border-radius: 5px; font-size: 0.9rem; font-weight: 500; border: none; }
.overview { font-size: 1rem; line-height: 1.7; color: #ddd; margin-bottom: 30px; max-width: 80%; }
.action-buttons { display: flex; align-items: center; gap: 15px; }
.action-btn { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; border-radius: 50px; }
.play-btn { background: transparent; border: 2px solid white; color: white; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; padding: 0; }
.play-btn:hover { background-color: rgba(255,255,255,0.2); transform: scale(1.1); }
.watchlist-btn { background: transparent; border: 2px solid rgba(255,255,255,0.5); color: white; padding: 12px 25px; }
.watchlist-btn:hover { background-color: rgba(255,255,255,0.1); border-color: white; }
.watchlist-btn.active { background-color: var(--primary-color); border-color: var(--primary-color); }
.download-btn { background-color: white; color: black; width: 50px; height: 50px; border-radius: 50%; font-size: 1.5rem; border: none; padding: 0; }
.download-btn:hover { transform: scale(1.1); }
.detail-main-content { padding: 50px; background-color: var(--dark-color); }
.content-section { margin-bottom: 50px; }
.content-section h2 { font-size: 1.8rem; margin-bottom: 20px; padding-left: 15px; border-left: 4px solid var(--primary-color); }
#trailer-container { position: relative; overflow: hidden; width: 100%; padding-top: 56.25%; border-radius: 12px; background-color: #000; cursor: pointer; }
#trailer-container img.trailer-thumbnail { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
#trailer-container:hover img.trailer-thumbnail { transform: scale(1.05); }
#trailer-container .play-icon-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 5rem; color: white; background-color: rgba(0,0,0,0.5); border-radius: 50%; width: 100px; height: 100px; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s ease; pointer-events: none; }
#trailer-container:hover .play-icon-overlay { background-color: rgba(229, 9, 20, 0.8); }
#trailer-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
#trailer-container .trailer-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 1.2rem; }
.actors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 25px; }
.actor-card { text-align: center; }
.actor-card img { width: 130px; height: 130px; object-fit: cover; object-position: center top; border-radius: 50%; margin-bottom: 10px; border: 2px solid var(--grey-color); }
.actor-card h3 { font-size: 1rem; font-weight: 500; }
.actor-card p { font-size: 0.8rem; color: #aaa; }
.modal-container { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.player-wrapper { display: flex; flex-direction: column; width: 100%; height: 100%; max-width: 1400px; max-height: 90vh; }
.modal-content { position: relative; width: 100%; height: 100%; background: #000; }
.close-modal { position: absolute; top: -15px; right: -15px; font-size: 3rem; font-weight: bold; color: white; background: #141414; border-radius: 50%; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; line-height: 1; cursor: pointer; transition: transform 0.2s; z-index: 2010; }
.iframe-wrapper { position: relative; width: 100%; height: 100%; }
.iframe-wrapper iframe { width: 100%; height: 100%; border: none; }
.subtitle-notice { width: 100%; padding: 10px 20px; background-color: rgba(34, 34, 34, 0.9); border-bottom: 1px solid var(--grey-color); text-align: center; }
.subtitle-notice p { font-size: 0.9rem; color: #ccc; }
.subtitle-notice i { color: var(--primary-color); margin: 0 5px; }
.form-modal-content { background-color: var(--grey-color); padding: 25px; border-radius: 12px; max-width: 500px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.5); position: relative; }
.form-modal-content h3 { font-size: 1.8rem; margin-bottom: 10px; }
.form-modal-content p { color: #ccc; margin-bottom: 20px; }
#request-form { display: flex; flex-direction: column; gap: 15px; }
#request-form input, #request-form textarea { background-color: #222; border: 1px solid #555; border-radius: 5px; padding: 12px; font-size: 1rem; color: white; font-family: 'Poppins', sans-serif; }
#request-form button { background-color: var(--primary-color); color: white; border: none; padding: 12px; border-radius: 5px; font-size: 1.1rem; font-weight: 600; cursor: pointer; }
#form-status { margin-top: 10px; font-weight: 500; min-height: 1.2em; }
#form-status.success { color: #4CAF50; }
#form-status.error { color: #f44336; }
.ad-timer-content { background-color: var(--grey-color); padding: 40px; border-radius: 12px; text-align: center; max-width: 400px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,0.5); border: 1px solid #444; }
.ad-timer-icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 20px; }
.ad-timer-content h3 { font-size: 1.8rem; margin-bottom: 10px; }
.ad-timer-content p { color: #ccc; margin-bottom: 25px; }
.ad-timer-countdown { font-size: 1.1rem; font-weight: 500; margin-top: 20px; }
.ad-timer-countdown span { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); }
.ad-timer-button { display: inline-block; background-color: var(--primary-color); color: white; border: none; padding: 12px 40px; border-radius: 8px; font-size: 1.1rem; font-weight: 600; cursor: pointer; margin-top: 20px; }
.download-page-body { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.download-container { width: 100%; max-width: 700px; margin: auto; }
.download-card { background-color: var(--grey-color); border-radius: 12px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: center; }
.download-header { display: flex; gap: 30px; text-align: left; margin-bottom: 30px; }
.download-poster img { width: 150px; border-radius: 8px; }
.download-info h1 { font-size: 2rem; margin-bottom: 10px; }
.download-info p { font-size: 0.9rem; color: #ccc; line-height: 1.6; }
.download-buttons a { display: block; background-color: var(--primary-color); color: white; padding: 15px 20px; border-radius: 8px; font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.download-buttons a i { margin-right: 10px; }
.download-page-body footer { border-top: none; margin-top: 20px; }
footer { text-align: center; padding: 30px 50px; margin-top: 50px; border-top: 1px solid var(--grey-color); }
footer p { margin-bottom: 10px; }
.tmdb-logo { display: flex; justify-content: center; align-items: center; gap: 10px; color: #888; }
.tmdb-logo img { height: 20px; }
@media (max-width: 768px) {
    header { padding: 15px 20px; }
    .hamburger-menu { display: block; }
    .nav-wrapper { display: none; position: absolute; top: 68px; right: 20px; background-color: var(--grey-color); flex-direction: column; padding: 20px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); gap: 15px; align-items: stretch; }
    .nav-wrapper.active { display: flex; }
    #search-form { width: 100%; }
    .nav-btn { justify-content: center; }
    #main-content { padding: 100px 20px 0 20px; }
    .swiper-slide { width: 130px !important; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .back-button { top: 20px; left: 20px; }
    #movie-detail-hero { height: 100vh; flex-direction: column; padding: 0; justify-content: flex-end; text-align: center; }
    #movie-detail-hero::before { background: linear-gradient(to top, var(--dark-color) 30%, transparent 100%); }
    .poster-box { display: none; }
    .detail-box { max-width: 100%; padding: 0 20px 40px 20px; display: flex; flex-direction: column; align-items: center; }
    .detail-box h1.fallback-title { font-size: 2.5rem; }
    .title-logo img { max-height: 80px; }
    .meta-info { justify-content: center; }
    .genres { justify-content: center; }
    .overview { max-width: 100%; font-size: 0.9rem; }
    .action-buttons { justify-content: center; }
    .detail-main-content { padding: 40px 20px; }
    .content-section h2 { font-size: 1.5rem; }
    .actors-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .actor-card img { width: 100px; height: 100px; }
    .player-wrapper { width: 100%; height: auto; max-height: none; }
    .modal-content { height: auto; }
    .iframe-wrapper { padding-bottom: 56.25%; height: 0; }
    .iframe-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
    .subtitle-notice p { font-size: 0.7rem; }
    .download-header { flex-direction: column; align-items: center; text-align: center; }
}
