* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', sans-serif; background-color: #0c0c0c; color: white; line-height: 1.6; }

/* HEADER */
header { background-color: #000; padding: 15px 5%; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #222; position: sticky; top: 0; z-index: 100; }
.logo img { height: 45px; }
nav ul { display: flex; list-style: none; }
nav ul li a { color: #ccc; text-decoration: none; margin-left: 20px; font-size: 14px; font-weight: bold; transition: 0.3s; }
nav ul li a:hover { color: #a6d5bf; }

/* HERO */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.hero { text-align: center; padding: 50px 0; }
.hero h1 { font-size: 36px; font-weight: 900; margin-bottom: 15px; }
#search-form { display: flex; justify-content: center; max-width: 600px; margin: 0 auto; }
#search-input { width: 100%; padding: 12px 20px; border-radius: 5px 0 0 5px; border: 1px solid #333; background: #1a1a1a; color: white; outline: none; }
#search-form button { padding: 12px 30px; border-radius: 0 5px 5px 0; border: none; background: #616358; color: white; font-weight: bold; cursor: pointer; }

/* SECTIONS */
.movie-section { margin-bottom: 40px; }
.section-title { font-size: 20px; margin-left: 5%; margin-bottom: 15px; color: #a6d5bf; border-left: 5px solid #a6d5bf; padding-left: 10px; }

/* CARD ROW (Mobile Scroll) */
.card-row { display: flex; overflow-x: auto; padding: 10px 5%; gap: 15px; padding-bottom: 20px; }
.card-row::-webkit-scrollbar { height: 6px; }
.card-row::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }

/* GRID (Search Results) */
.card-row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; padding: 0 5%; }

/* --- BOGGE STYLE CARD DESIGN --- */
.movie-card { flex: 0 0 auto; width: 170px; background: transparent; cursor: pointer; transition: 0.3s; }
.movie-card:hover { transform: scale(1.05); }
.movie-card:hover img { box-shadow: 0 0 20px rgba(166, 213, 191, 0.3); }

.movie-card img { width: 100%; height: 250px; object-fit: cover; display: block; border-radius: 8px; margin-bottom: 8px; }

.movie-info { padding: 0 5px; }
.movie-info h3 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; font-weight: 700; margin-bottom: 4px; }

/* Info Row: Year/Duration (Left) - Box (Right) */
.meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999; }
.meta-left { display: flex; align-items: center; gap: 5px; }
.type-badge { 
    border: 1px solid #444; 
    padding: 1px 6px; 
    border-radius: 4px; 
    font-size: 10px; 
    text-transform: uppercase; 
    color: #ccc; 
    background: rgba(0,0,0,0.3);
}

/* DETAILS PAGE */
.backdrop { width: 100%; height: 450px; background-size: cover; background-position: center; position: relative; }
.backdrop-overlay { width: 100%; height: 100%; background: linear-gradient(to top, #0c0c0c, rgba(0,0,0,0.3)); display: flex; align-items: flex-end; padding-bottom: 40px; }
.main-info { display: flex; gap: 30px; align-items: flex-start; }
#details-poster { width: 180px; border-radius: 8px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.text-info h2 { font-size: 38px; margin-bottom: 10px; font-weight: 900; }
.text-info p { color: #ccc; font-size: 14px; margin-bottom: 20px; max-width: 800px; }
.watch-now-btn { padding: 15px 40px; background: #a6d5bf; color: #000; font-weight: 900; border: none; border-radius: 5px; cursor: pointer; }
.back-btn { background: rgba(255,255,255,0.1); border: 1px solid #444; color: white; padding: 5px 15px; margin-bottom: 20px; cursor: pointer; border-radius: 5px; font-weight: bold; }

/* PLAYER & CONTROLS */
.watch-section { margin-top: 40px; padding: 20px 5%; border-top: 1px solid #222; padding-bottom: 100px; }
.player-wrapper { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 30px; }
.player-wrapper iframe { width: 100%; height: 100%; }

.server-switcher { text-align: center; margin-bottom: 30px; }
.server-list { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.srv-btn { background: #1a1a1a; color: #ccc; border: 1px solid #333; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: bold; }
.srv-btn.active { background: #a6d5bf; color: #000; }

.season-tabs { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.season-tab { padding: 10px 18px; background: #1a1a1a; border-radius: 5px; cursor: pointer; border: 1px solid #333; white-space: nowrap; font-weight: bold; font-size: 13px; }
.season-tab.active { background: #a6d5bf; color: #000; }
.episode-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.episode-item { background: #1a1a1a; padding: 15px; border-radius: 5px; cursor: pointer; font-size: 13px; border-left: 4px solid transparent; }
.episode-item:hover { background: #222; border-left-color: #a6d5bf; }

footer { text-align: center; padding: 60px; color: #444; font-size: 12px; border-top: 1px solid #111; }

/* MOBILE FIX */
@media (max-width: 768px) {
    header { padding: 10px 5%; }
    nav { display: none; }
    .movie-card { width: 140px; }
    .movie-card img { height: 210px; }
    .hero h1 { font-size: 28px; }
    .backdrop { height: 350px; }
    .main-info { flex-direction: column; align-items: center; text-align: center; }
    #details-poster { width: 150px; margin-bottom: 20px; }
    .watch-now-btn { width: 100%; }
}