/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Color Palette - Premium Dark Theme */
    --primary: #ffcc00;
    --primary-hover: #e6b800;
    --bg-body: #0f0f0f;
    --bg-surface: #1f1f1f;
    --bg-header: #121212;
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --border-color: #333;
    
    /* Spacing & Sizing */
    --header-height: 70px;
    --container-width: 1200px;
    --radius: 8px;
    --transition: all 0.2s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button, input, textarea {
    font-family: inherit;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 14px;
    width: 160px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 220px;
    background: #000;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 0;
    cursor: pointer;
}

/* Desktop Nav */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-menu li a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary);
    background: rgba(255, 204, 0, 0.1);
}

/* =========================================
   3. MAIN LAYOUT & HORIZONTAL CATEGORIES
   ========================================= */
main {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Scrollable Category Strip (App-Like Feel) */
.category-filter {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 5px 20px 5px;
    margin-bottom: 10px;
    justify-content: flex-start;
    width: 100%;
    -webkit-overflow-scrolling: touch; 
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(to right, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 95%, transparent 100%);
}

.category-filter::-webkit-scrollbar {
    display: none;
}

.category-filter .filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.category-filter .filter-btn:hover {
    background: #333;
    border-color: #555;
    color: #fff;
    transform: translateY(-2px);
}

.category-filter .filter-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

/* =========================================
   4. VIDEO GRID & CARDS
   ========================================= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    width: 100%;
}

.video-card {
    display: block;
    background: var(--bg-surface);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--border-color);
}

.thumb-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: #111;
}

.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover img {
    transform: scale(1.08);
}

.video-info {
    padding: 12px 15px;
}

.video-card h3 {
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    color: #eee;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    height: 40px;
}

#load-more {
    display: block;
    margin: 40px auto 0;
    padding: 14px 40px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#load-more:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

/* =========================================
   5. CONTENT PAGES & FORMS
   ========================================= */
.content-page {
    max-width: 800px;
    margin: 40px auto;
    background: var(--bg-surface);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.content-page h1 {
    color: var(--primary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.content-page p, .content-page li {
    color: #ccc;
    font-size: 16px;
}

.content-page form {
    background: #151515;
    padding: 30px;
    border-radius: 8px;
    margin-top: 25px;
}

.content-page label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.content-page input[type="text"],
.content-page input[type="email"],
.content-page textarea {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}

.content-page input:focus, 
.content-page textarea:focus {
    border-color: var(--primary);
    outline: none;
    background: #333;
}

.form-buttons {
    display: flex;
    gap: 15px;
}

.content-page input[type="submit"],
.content-page input[type="reset"] {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.content-page input[type="submit"] { background: var(--primary); color: #000; }
.content-page input[type="submit"]:hover { background: var(--primary-hover); }
.content-page input[type="reset"] { background: #333; color: #fff; }
.content-page input[type="reset"]:hover { background: #444; }

/* =========================================
   6. AGE GATE & FOOTER
   ========================================= */
footer {
    background: #000;
    padding: 20px 20px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

footer .footer-links a {
    color: var(--text-muted);
    font-size: 13px;
}
footer .footer-links a:hover { color: var(--primary); }

footer .footer-copy {
    color: #666;
    font-size: 12px;
}

/* AGE GATE - FIXED BLUR VERSION */
/* =========================================
   AGE GATE (REAL BLUR MODE)
   ========================================= */
.agegate-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999; /* Must be highest */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* 1. GLASS EFFECT */
    /* Dark semi-transparent layer */
    background-color: rgba(0, 0, 0, 0.6); 
    
    /* The Blur Magic (Blurs the video grid behind it) */
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    
    animation: fadeIn 0.3s ease-out;
}

.agegate-container {
    background: #1f1f1f;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(255, 204, 0, 0.4);
    box-shadow: 0 50px 100px rgba(0,0,0,0.9);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.agegate-container h1 { color: var(--primary); margin-top: 0; }
.agegate-container .btn-group { display: flex; flex-direction: column; gap: 15px; margin-top: 20px;}

.agegate-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

#yes-btn { background: var(--primary); color: #000; }
#no-btn { background: #333; color: #fff; }
/* =========================================
   7. RESPONSIVE UTILITIES (Perfect Mobile Fit)
   ========================================= */

/* Helper Classes for Ads */
@media (min-width: 901px) {
    .mobile-only { display: none !important; }
}
@media (max-width: 900px) {
    .desktop-only { display: none !important; }
    
    /* Tablet/Mobile Header Adjustments */
    .menu-toggle { display: block; }

    nav {
        position: absolute;
        top: var(--header-height);
        right: 0;
        width: 260px;
        background: #1a1a1a;
        padding: 20px;
        border-radius: 0 0 0 12px;
        border-bottom: 1px solid #333;
        border-left: 1px solid #333;
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 10px 20px rgba(0,0,0,0.5);
    }

    nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu { flex-direction: column; gap: 10px; }
    .nav-menu li a { display: block; padding: 12px; background: #111; }
}

/* SMARTPHONES (Optimized View) */
@media (max-width: 480px) {
    /* 1. Maximize Width */
    header { padding: 0 12px; }
    main { padding: 15px 10px; } /* Less padding = Bigger videos */
    
    /* 2. Header Elements */
    .logo img { height: 32px; } /* Slightly smaller logo to fit search */
    .search-box input { width: 130px; font-size: 13px; }
    .search-box input:focus { width: 160px; }
    
    /* 3. The Video Grid (Perfect 2-Column) */
    .video-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns */
        gap: 10px; /* Tighter gap */
    }
    
    /* 4. Readable Cards */
    .video-info { padding: 10px; }
    .video-card h3 { 
        font-size: 13px; /* Bigger text */
        line-height: 1.3; 
        height: 34px;    /* Allow 2 lines comfortably */
    }
    
    /* 5. Category Strip (Touch Friendly) */
    .category-filter { 
        gap: 8px; 
        padding-bottom: 12px;
        margin-bottom: 15px; 
    }
    .category-filter .filter-btn { 
        padding: 8px 18px; 
        font-size: 13px; 
    }
    
    /* 6. Big Thumb Buttons */
    #load-more {
        width: 100%;       /* Full width button */
        padding: 15px 0;   /* Taller for easy tapping */
        border-radius: 8px; /* Soft square looks better full width */
        margin-top: 30px;
    }
    
    /* 7. Content Pages */
    .content-page { padding: 20px 15px; }
    .form-buttons { flex-direction: column; }
    
    /* 8. Age Gate Adjustment */
    .agegate-container {
        width: 90%;
        padding: 30px 20px;
    }
    .agegate-container h1 { font-size: 22px; }
}