/* style.css - The Pro Version */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
    --bg-color: #0a0a0a;
    --card-bg: #161616;
    --text-main: #ffffff;
    --text-sec: #a0a0a0;
    --accent: #3ea6ff; /* YouTube Blue */
    --accent-hover: #60b6ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body { background-color: var(--bg-color); color: var(--text-main); }

/* --- Navbar --- */
.navbar {
    background: rgba(22, 22, 22, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 700; letter-spacing: -1px; }
.logo span { color: var(--accent); }

/* --- Search --- */
.search-container input {
    background: #2a2a2a;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 50px;
    color: #fff;
    width: 350px;
    transition: 0.3s;
    outline: none;
}
.search-container input:focus { border-color: var(--accent); width: 370px; }

/* --- Filters --- */
/* --- Filters --- */
.filter-container {
    padding: 20px 5%;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none; 
    
    /* --- NEW STICKY CODE --- */
    position: sticky;
    top: 73px; /* Adjust this number if it overlaps your navbar */
    z-index: 900; /* Stays above the cards, but below Navbar (which is 1000) */
    background-color: var(--bg-color); /* Necessary so cards don't show through buttons */
    border-bottom: 1px solid #222; /* Optional: Adds a clean separation line when scrolling */
}
.filter-container::-webkit-scrollbar { display: none; }

.filter-btn {
    background: #222;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: 0.3s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
}

/* --- Grid & Cards --- */
.container { padding: 20px 5%; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: #333;
}

.thumbnail-wrapper { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.thumbnail { width: 100%; height: 100%; object-fit: cover; }

.playlist-badge {
    position: absolute;
    bottom: 8px; right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.card-content { padding: 15px; }
.card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-author { color: var(--text-sec); font-size: 0.85rem; margin-bottom: 5px; }
.card-tag { 
    font-size: 0.75rem; 
    color: var(--accent); 
    background: rgba(62, 166, 255, 0.1); 
    padding: 3px 8px; 
    border-radius: 4px; 
    display: inline-block;
}

/* --- Player Page Specifics --- */
.player-container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.video-wrapper {
    box-shadow: 0 0 50px rgba(62, 166, 255, 0.1); /* Subtle glow */
}

/* --- MOBILE NAVBAR FIX (Specific for your HTML) --- */
@media screen and (max-width: 768px) {
    
    /* 1. Setup the main row */
    .navbar {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap !important; /* Forces single line */
        padding: 10px;
        gap: 10px; /* Space between logo and search */
    }

    /* 2. Style the Logo Link (Image + Text) */
    .navbar > a {
        display: flex;
        align-items: center;
        flex-shrink: 0; /* Don't let the logo get squished */
        gap: 5px;
    }

    /* Resize the logo image for mobile */
    .navbar > a img {
        width: 30px; 
        height: 30px;
    }

    /* Resize the "Learnerstube" text inside the link */
    .navbar > a > span {
        font-size: 1.1rem !important; /* Make text slightly smaller */
        display: block; /* Ensure it stays visible */
    }

    /* 3. HIDE the extra duplicate logo text */
    /* You have a <div class="logo"> separate from the link. We hide it on mobile. */
    .navbar .logo {
        display: none !important;
    }

    /* 4. Make the search bar fill the rest of the line */
    .search-container {
        flex-grow: 1; /* Take up all remaining space */
        margin: 0;    /* Remove extra margins */
        min-width: 0; /* Allow it to shrink if needed */
    }

    .search-container input {
        width: 100%; /* Fill the container */
        padding: 8px;
        font-size: 14px; /* readable font size */
    }
    /* Fix the sticky position for the thinner Mobile Navbar */
    .filter-container {
        top: 55px; /* Mobile navbar is shorter, so we lower the "stick" point */
    }
}

/* --- INTRO SPLASH SCREEN --- */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a; /* Matches your site bg */
    z-index: 9999; /* Sits on top of EVERYTHING */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out; /* Smooth fade out */
}

.intro-content {
    text-align: center;
    animation: floatUp 0.8s ease-out forwards; /* Slide up animation */
}

.intro-logo {
    width: 80px; /* Adjust size */
    margin-bottom: 15px;
}

.intro-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 5px;
}

.intro-tagline {
    font-size: 1.2rem;
    color: #3ea6ff; /* Your blue accent color */
    letter-spacing: 1px;
    opacity: 0; /* Start hidden */
    animation: fadeIn 0.5s ease-out 0.5s forwards; /* Fade in after 0.5s */
}

/* Animations */
@keyframes floatUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Class to hide the intro completely */
.intro-hidden {
    opacity: 0;
    pointer-events: none; /* Allows you to click "through" it */
}

