:root {
    --main-bg: #141414;
    --accent-red: #E50914;
    --text-white: #ffffff;
    --gray-text: #b3b3b3;
}

body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--main-bg);
    color: var(--text-white);
    overflow-x: hidden;
}

/* Navbar Styling */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    align-items: center;
    padding: 20px 4%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, transparent);
    z-index: 1000;
}

.logo {
    color: var(--accent-red);
    font-size: 1.8rem;
    font-weight: bold;
    margin-right: 40px;
}

.nm:link, .nm:visited, .nm:hover, .nm:active {
    color: inherit;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    margin-right: 20px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gray-text);
}

/* Hero Section */
.hero {
    position: relative; /* Added so the absolute elements inside stay contained */
    height: 100vh;
    display: flex;
    align-items: center;
    padding-left: 4%;
    overflow: hidden; /* Added to keep the video from spilling out */
    
    /* Notice we removed the background image and gradient from here */
}

/* New: Styling the background video */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Makes sure the video scales to fit perfectly */
    z-index: 0; /* Puts the video in the very back */
}

/* New: Recreating your dark gradient fade so text is readable */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, transparent 60%),
                linear-gradient(to top, rgba(20,20,20,1) 0%, transparent 30%);
    z-index: 1; /* Puts the fade on top of the video, but behind the text */
}

.hero-content {
    position: relative; /* Added to make z-index work */
    z-index: 2; /* Puts the text on the very top layer */
    max-width: 500px;
}

.category {
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.title {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1;
}

.description {
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Container to make all buttons sit in a perfect horizontal row */
.hero-buttons {
    display: flex;
    align-items: center;
    gap: 15px; 
}

/* The Play Button */
.btn-play {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The List Button (If you still use it anywhere) */
.btn-list {
    padding: 10px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.series-container {
    max-width: 1200px;
    margin: 0 auto;
}

.series-header {
    margin-bottom: 30px;
}

.series-header h1 {
    font-size: 2.5rem;
    color: #E50914; /* A nice Crunchyroll-style orange */
}

.series-header p {
    color: #aaaaaa;
    margin-top: 5px;
}

/* Tabs Styling */
.season-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    color: #aaaaaa;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 15px;
    transition: 0.3s ease;
}

.tab-btn:hover {
    color: #ffffff;
}

.tab-btn.active {
    color: #E50914;
    border-bottom: 3px solid #E50914;
}

/* Episode Grid Styling */
.season-content {
    /* Grid is applied via JS/inline styles when visible */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.episode-card {
    background-color: #202020;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.episode-card:hover {
    transform: translateY(-5px);
    background-color: #2a2a2a;
}

.ep-thumbnail {
    background-color: #333;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #555;
}

.episode-card:hover .ep-thumbnail {
    color: #E50914;
}

.ep-info {
    padding: 15px;
}

.ep-number {
    font-size: 0.8rem;
    color: #aaaaaa;
}

.ep-title {
    font-size: 1rem;
    margin-top: 5px;
}

/* Mute Button Styling */
.mute-btn {
    position: absolute;
    bottom: 40px; /* Positions it near the bottom */
    right: 4%;    /* Aligns it with your right padding */
    z-index: 3;   /* Keeps it above the video and overlay */
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%; /* Makes it a circle */
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.mute-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: white;
}

/* =========================================
   RESPONSIVE DESIGN (All Devices)
   ========================================= */

/* 1. EXTRA LARGE SCREENS & TVs (1400px and up) */
@media (min-width: 1400px) {
    .title {
        font-size: 5.5rem; /* Massive title for big TVs */
    }
    .description {
        font-size: 1.4rem;
    }
    .hero-content {
        max-width: 700px;
    }
}

/* 2. TABLETS & SMALL LAPTOPS (Max width: 992px) */
@media (max-width: 992px) {
    .title {
        font-size: 3rem; /* Shrink title slightly */
    }
    .logo {
        font-size: 1.5rem;
        margin-right: 20px;
    }
    .nav-links a {
        margin-right: 15px;
    }
}

/* 3. MOBILE PHONES (Max width: 768px) */
@media (max-width: 768px) {
    /* Navbar Adjustments */
    .navbar {
        padding: 15px 4%;
        background: linear-gradient(to bottom, rgba(0,0,0,0.9) 30%, transparent); /* Darker top for readability */
    }
    .logo {
        font-size: 1.2rem;
    }
    .nav-links {
        display: none; /* Hides text links on small screens to save space */
    }

    /* Hero Section Adjustments */
    .hero {
        height: 100vh; /* slightly shorter to feel like a mobile app */
    }
    .hero-content {
        max-width: 90%;
        margin-top: 60px; /* Let text use most of the screen width */
    }
    .category {
        font-size: 0.8rem;
    }
    .title {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    .description {
        font-size: 0.95rem;
        margin-bottom: 15px;
        /* Limits description to 4 lines on mobile so it doesn't cover the whole video */
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .hero-buttons button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    /* Mute Button Adjustments */
    .mute-btn {
        bottom: 20px;
        width: 35px;
        height: 35px;
    }
    
    /* In case you add your Episode Grid to this page later */
    .season-content {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}

/* =========================================
   MOVIE CARD BUTTONS (Like & Wishlist)
   ========================================= */
.card-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

/* Show the buttons when you hover over the poster */
.media-card:hover .card-overlay, 
.movie-card:hover .card-overlay {
    opacity: 1;
}

.action-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

/* Hover effect for buttons */
.action-btn:hover {
    background: white;
    color: black;
    border-color: white;
    transform: scale(1.1);
}

/* =========================================
   SVG ICON SIZING & TOGGLING
   ========================================= */
.action-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Hide the active icons by default */
.action-btn .icon-active {
    display: none;
}

/* --- When LIKED --- */
.action-btn.liked {
    color: var(--accent-red, #E50914);
    border-color: var(--accent-red, #E50914);
}
/* Swap the SVGs */
.action-btn.liked .icon-empty { display: none; }
.action-btn.liked .icon-active { display: block; }

/* --- When WISHLISTED --- */
.action-btn.wishlisted {
    background: white;
    color: black;
    border-color: white;
}
/* Swap the SVGs */
.action-btn.wishlisted .icon-empty { display: none; }
.action-btn.wishlisted .icon-active { display: block; }
