
       
       /* NAVBAR */

.navbar{
    position:fixed;
    top:0;
    width:100%;
    height:70px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 40px;

    z-index:999;

    background:linear-gradient(to bottom,
    rgba(0,0,0,0.9),
    rgba(0,0,0,0));
}

.nav-left{
    display:flex;
    align-items:center;
    gap:40px;
}

.logo{
    font-size:2rem;
    font-weight:bold;
}

.logo span{
    color:#4a7c2c;
}

.nav-links{
    display:flex;
    gap:25px;
}

.nav-links a{
    color:rgb(66, 66, 66);
    text-decoration:none;
    transition:0.3s;
    opacity:0.8;
}

.nav-links a:hover{
    opacity:1;
    color:#69ff768a;
}

.nav-right{
    display:flex;
    align-items:center;
    gap:20px;
}

       
       
       :root {
            /* Light Theme (Nature) */
            --leaf-green: #4a7c2c;
            --accent-glow: #a8cf45;
            --glass-white: rgba(255, 255, 255, 0.25);
            --glass-border: rgba(255, 255, 255, 0.4);
            --text-main: #2d3436;
            --bg-gradient: linear-gradient(135deg, #eef5f2 0%, #d9e8e3 100%);
            --radius-lg: 30px;
            --radius-md: 18px;
        }

        .dark-mode {
            --leaf-green: #a8cf45;
            --accent-glow: #ffffff;
            --glass-white: rgba(20, 20, 20, 0.7);
            --glass-border: rgba(255, 255, 255, 0.1);
            --text-main: #f0f0f0;
            --bg-gradient: linear-gradient(135deg, #0f1412 0%, #050505 100%);
        }

        * { box-sizing: border-box; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); }

        body {
            background: var(--bg-gradient);
            background-attachment: fixed;
            color: var(--text-main);
            margin: 0;
            font-family: 'Inter', 'Segoe UI', sans-serif;
            overflow-x: hidden;
        }

        body::before {
            content: "";
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: url('twigstv.jpg') no-repeat center center/cover;
            opacity: 0.12;
            z-index: -1;
        }
        .dark-mode body::before { opacity: 0.05; }

        /* --- Navigation --- */
        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 8%;
            background: var(--glass-white);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--glass-border);
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .logo {
            color: var(--leaf-green);
            font-weight: 800;
            font-size: 1.4rem;
            display: flex;
            align-items: center;
            gap: 12px;
            text-transform: uppercase;
        }

        .logo::before {
            content: "";
            width: 35px; height: 35px;
            background: url('twigstv.jpg') center/cover;
            border-radius: 50%;
            border: 2px solid var(--leaf-green);
        }

        /* --- Search Bar --- */
        .search-container { position: relative; width: 300px; }
        #animeSearch {
            width: 100%;
            padding: 10px 15px 10px 40px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--glass-border);
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-main);
            outline: none;
        }
        #animeSearch:focus { width: 350px; background: rgba(255,255,255,0.3); box-shadow: 0 0 15px var(--leaf-green); }
        .search-icon { position: absolute; left: 12px; top: 10px; width: 18px; fill: var(--leaf-green); }

        /* --- Theme Toggle --- */
        .theme-switch { cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 1.2rem; }
        #checkbox { display: none; }

        /* --- Hero --- */
        .hero {
            height: 60vh;
            display: flex;
            align-items: center;
            padding: 0 10%;
            margin-bottom: 60px;
            background: linear-gradient(to right, var(--bg-gradient), transparent), url('twigstv.jpg') center/cover;
        }
        .hero-content h1 { font-size: 3.5rem; color: var(--leaf-green); margin: 0; }

 .normal-header {
            height: 60px;
            display: flex;
            align-items: center;
            padding: 0 10%;
            margin-bottom: 60px;
        }

        .normal-header h1 { font-size: 2rem; color: var(--leaf-green); margin: 0; }

        /* --- Grid & Cards --- */


        
        .content-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
            gap: 40px;
            padding: 0 10% 100px;
        }

        .anime-card {
            background: var(--glass-white);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-md);
            overflow: hidden;
            cursor: pointer;
            box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        }

        .anime-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(74, 124, 44, 0.2); }

        .media-container { position: relative; width: 100%; aspect-ratio: 2/3; overflow: hidden; }
        .thumbnail { width: 100%; height: 100%; object-fit: cover; z-index: 2; transition: opacity 0.5s; }
        .preview-video { position: absolute; top:0; left:0; width:100%; height:100%; object-fit: cover; opacity: 0; z-index: 1; }

        .anime-card:hover .thumbnail { opacity: 0; }
        .anime-card:hover .preview-video { opacity: 1; }

        .card-info { padding: 20px; }
        .card-info h3 { margin: 0 0 5px; color: var(--leaf-green); font-size: 1.2rem; }

        /* --- Player Overlay --- */
        .video-overlay {
            display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0,0,0,0.95); z-index: 2000; justify-content: center; align-items: center;
        }
        .video-container { width: 80%; position: relative; }
        video#mainVideo { width: 100%; border-radius: var(--radius-md); border: 4px solid var(--glass-white); }
        .close-btn { position: absolute; top: -50px; right: 0; color: white; font-size: 2rem; cursor: pointer; }

        .play-btn {
            background: var(--leaf-green); color: white; border: none; padding: 15px 40px;
            border-radius: var(--radius-lg); font-weight: bold; cursor: pointer;
        }

        .player-wrapper {
    display: flex;
    width: 90%;
    height: 85vh;
    background: var(--glass-white);
    backdrop-filter: blur(30px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
scrollbar-width: none;
-ms-overflow-style: none;
        }


.player-wrapper::-webkit-scrollbar {
  display: none;
}


.main-stage {
    flex: 3; /* Takes up 75% of the space */
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: relative;

}

.episode-sidebar {
    flex: 1; /* Takes up 25% of the space */
    background: rgba(0, 65, 11, 0.37);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.episode-list {
    overflow-y: auto;
    padding: 10px;
}

/* Custom Scrollbar for that "Premium" feel */
.episode-list::-webkit-scrollbar { width: 5px; }
.episode-list::-webkit-scrollbar-thumb { background: var(--leaf-green); border-radius: 10px; }

.ep-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ep-item:hover {
    background: rgba(115, 255, 134, 0.2);
    transform: translateX(5px);
}

.ep-item.active {
    background: var(--leaf-green);
    color: white;
}

.ep-num { font-weight: bold; opacity: 0.6; }

.anime-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}


@media (max-width: 768px) {
    
    /* 1. Fix Body Spacing */
    body {
        padding-top: 80px; /* Prevents fixed navbar from overlapping content */
    }

    /* 2. Fix Navbar Squishing */
    .navbar {
        padding: 10px 15px; /* Shrinks huge side desktop padding */
        height: auto;
        flex-direction: column;
        gap: 12px;
        background: var(--glass-white);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }

    .nav-left {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    /* Make links horizontally scrollable so they stay in one neat row */
    .nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding: 5px 0;
        gap: 20px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-links::-webkit-scrollbar {
        display: none; /* Hide messy scrollbar line */
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
        gap: 15px;
    }

    /* Prevent the expanding focus effect from breaking layout borders */
    .search-container { 
        width: 75%; 
    }
    #animeSearch {
        width: 100%;
    }
    #animeSearch:focus { 
        width: 100%; 
    }

    /* 3. Fix Hero & Text Scaling */
    .hero {
        height: 40vh;
        padding: 0 5%;
        margin-bottom: 30px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .normal-header {
        padding: 0 5%;
        margin-bottom: 30px;
        height: auto;
    }

    .normal-header h1 {
        font-size: 1.6rem;
    }

    /* 4. Fix Video Player Architecture (The major breaking point) */
    .player-wrapper {
        flex-direction: column; /* Stacks player on top of sidebar */
        width: 95%;
        height: auto; /* Drops fixed height constraints */
        margin: 0 auto 40px;
    }

    .main-stage {
        flex: none;
        width: 100%;
        padding: 15px;
    }

    /* Enforce 16:9 Aspect Ratio onto the raw video player frame */
    video#mainVideo, .video-player {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        object-fit: contain;
        background: #000;
        border-radius: var(--radius-md);
    }

    /* Moves structural sidebar below video output */
    .episode-sidebar {
        flex: none;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--glass-border);
        background: rgba(0, 151, 20, 0.37);
    }

    .episode-list {
        max-height: 300px; /* Limits size so page isn't endlessly long */
        overflow-y: auto;
    }

    /* 5. Clean Grid Content Adjustments */
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); /* Balanced card sizing */
        gap: 20px;
        padding: 0 5% 60px;
    }
    
    .card-info {
        padding: 12px;
    }

    .card-info h3 {
        font-size: 1rem;
    }
}


#netflix-skip-btn {
    position: absolute;
    bottom: 80px;      
    right: 30px;
    z-index: 1000;      
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: background 0.2s, transform 0.1s;
}

#netflix-skip-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

#netflix-skip-btn:active {
    transform: scale(0.95);
}


video-container-selector-if-you-have-one {
    position: relative;
}

#skipBtn {
    position: absolute;
    bottom: 120px;      
    right: 30px;
    z-index: 1000;      
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: background 0.2s, transform 0.1s;
}

#skipBtn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

#skipBtn:active {
    transform: scale(0.95);
}