/* Root variables loaded from variables.css */

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-family);
    margin: 0;
    padding-top: var(--header-height);
}

/* Font family alias */
:root {
    --font-family: var(--font-main);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    border: 0;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 100vw;
    overflow-x: hidden;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.header-inner {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--color-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo span {
    background: var(--color-primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 2px;
}

.search-bar-container {
    flex: 1;
    max-width: 600px;
    margin: 0 24px;
}

.search-input {
    width: 100%;
    background: #121212;
    border: 1px solid var(--color-border);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    /* iOS Safari auto-zooms the whole page on focus for any input under 16px —
       jarring on a search bar users tap constantly. 1rem = 16px keeps it off. */
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: var(--color-primary);
}

.header-actions {
    display: flex;
    gap: 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

.header-link {
    color: var(--color-text-secondary);
}

.header-link:hover {
    color: var(--color-primary);
}

/* Category Bar */
.category-bar {
    height: 45px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 20px;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.category-bar::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome */
}

.cat-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
    text-transform: capitalize;
    transition: color 0.2s;
    flex-shrink: 0;
    /* Text itself is ~20px tall — stretch the actual tappable <a> to the full
       bar height instead of leaving a hairline touch target (was measured at
       ~20px tall on real devices, well under the ~44px iOS/Android minimum). */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    /* Short category names (e.g. "Cum") would otherwise get a tap target as
       narrow as their text — keep every pill at least 40px wide too. */
    min-width: 40px;
}

.cat-link:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Main Content */
.page-content {
    padding-top: 24px;
    min-height: 80vh;
}

/* Category Section on Home */
.category-section {
    margin-bottom: 40px;
    padding: 0 24px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--color-primary);
    padding-left: 12px;
    color: var(--color-text-primary);
}

.view-all-link {
    margin-left: auto;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    font-weight: 600;
}

.view-all-link:hover {
    color: var(--color-primary);
}

/* Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px 16px;
}

.video-card {
    display: block;
    cursor: pointer;
    border: 1px solid transparent;
    /* Prepare for border transition */
    border-radius: 8px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    /* For scale containment */
}

.video-card:hover {
    transform: scale(1.02);
    border-color: var(--color-border);
    z-index: 5;
}

.video-card:hover .video-title {
    color: var(--color-primary);
}

.video-card:hover .video-thumbnail img {
    opacity: 0.9;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, var(--color-bg-secondary) 4%, var(--color-bg-tertiary) 25%, var(--color-bg-secondary) 36%);
    background-size: 1000px 100%;
}

.hd-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--color-primary);
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid var(--color-primary);
    font-weight: 800;
    z-index: 2;
}

.duration-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 2;
}

.video-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* Video Page */
.video-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* VAST ad player (pre-roll fills the slot; overlay sits on top of the live iframe) */
.vast-ad-slot,
.vast-overlay-slot {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: #000;
}

.vast-ad-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.vast-ad-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.vast-ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #ccc;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    pointer-events: none;
}

.vast-ad-unmute {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}

.vast-ad-skip {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 12px 16px;
    min-height: 40px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.vast-ad-skip:disabled {
    opacity: 0.6;
    cursor: default;
}

.vast-ad-close {
    position: absolute;
    top: 10px;
    right: 58px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player-wrapper iframe {
    width: 100%;
    height: 100%;
}

.video-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.video-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.video-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    background: var(--color-surface);
    color: var(--color-text-secondary);
    padding: 6px 12px;
    min-height: 40px;
    box-sizing: border-box;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 6px;
    margin-bottom: 6px;
    border: 1px solid var(--color-border);
}

.tag-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Sidebar */
/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 1001;
    padding: 80px 20px 20px;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    border-right: 1px solid var(--color-border);
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.related-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 20px;
    align-self: start;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.sidebar-link {
    display: block;
    padding: 12px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    padding-left: 16px;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-card {
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sidebar-card:hover {
    opacity: 0.8;
}

.sidebar-card .thumb {
    width: 140px;
    aspect-ratio: 16/9;
    flex-shrink: 0;
    background: var(--color-bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.sidebar-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-card .info {
    display: flex;
    flex-direction: column;
}

.sidebar-card .title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-card:hover .title {
    color: var(--color-primary);
}

.hd-badge.sm {
    font-size: 0.6rem;
    padding: 1px 3px;
    top: 4px;
    right: 4px;
}

/* Ads */
.ad-slot {
    background: #111;
    border: 1px dashed #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.8rem;
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
}

.ad-300-250 {
    width: 300px;
    height: 250px;
}

/* Mobile */
@media(max-width: 900px) {
    .video-layout {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .video-player-wrapper {
        position: sticky;
        top: var(--header-height);
        z-index: 100;
        margin-bottom: 0;
    }

    .main-column {
        padding: 16px;
    }

    .sidebar {
        padding: 16px;
        border-top: 1px solid var(--color-border);
    }

    .search-bar-container {
        display: none;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .header-inner {
        padding: 0 16px;
    }

    .category-bar {
        padding: 0 16px;
    }
}

/* Age Verification Modal */
#age-verification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 5, 5, 0.98);
    /* Very dark, almost loose background */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#age-verification-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.age-modal {
    background: #111;
    border: 1px solid #333;
    padding: 40px;
    max-width: 650px;
    width: 100%;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    position: relative;
}

.age-modal-title {
    color: var(--color-primary);
    font-size: 4rem;
    font-weight: 900;
    margin: 0 0 10px 0;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.age-modal-subtitle {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
}

.age-modal p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.age-modal .parent-warning {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
    font-size: 0.9rem;
}

.age-modal .parent-warning strong {
    color: #ffd700;
    /* Gold for warning */
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.age-modal ul {
    text-align: left;
    margin-bottom: 25px;
    padding-left: 20px;
}

.age-modal li {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 8px;
    list-style-type: disc;
}

.btn-enter {
    display: inline-block;
    background: #00cc66;
    /* Green */
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    padding: 15px 50px;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: none;
    margin-bottom: 15px;
    text-decoration: none;
}

.btn-enter:hover {
    background: #00e673;
    transform: scale(1.05);
}

.terms-link {
    display: block;
    color: #666;
    font-size: 0.8rem;
    text-decoration: underline;
}

/* Blur Effect for Background & Lock Scroll */
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
}

body.modal-open #main-wrapper,
body.modal-open .main-header,
body.modal-open .category-bar {
    filter: blur(15px);
    pointer-events: none;
    transition: filter 0.3s ease;
}

/* Mobile Footer & Global Tweaks */
.main-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .main-footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .container {
        padding: 16px !important;
    }

    .video-seo-cloud {
        margin: 20px 16px !important;
    }

    /* Force Iframe Size on Mobile */
    .video-player-wrapper iframe {
        width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    padding: 12px 24px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* ------------------------------------------------------------------ */
/* Player expand control                                               */
/*                                                                     */
/* The embedded players are cross-origin third-party iframes (eporner, */
/* xvideos, xgroovy, ...) and their own maximize button calls the      */
/* Fullscreen API. iPhone Safari has no Fullscreen API for an iframe   */
/* or a div — only HTMLVideoElement.webkitEnterFullscreen(), which     */
/* only the frame's own script can call — so on iPhone that button is  */
/* inert and there is nothing we can do from out here to fix it.       */
/*                                                                     */
/* So we provide our own control. Where the real API exists (Android,  */
/* desktop, iPad) it is used; where it does not, .is-expanded below is */
/* a CSS stand-in that fills the viewport. Same button, same result.   */
/* ------------------------------------------------------------------ */
.player-expand-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0.75;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.player-expand-btn:hover,
.player-expand-btn:focus-visible {
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
}

.player-expand-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Touch targets need the room; the third-party players put their own
   controls bottom-right, so ours stays top-right and out of their way. */
@media (max-width: 768px) {
    .player-expand-btn {
        width: 44px;
        height: 44px;
        opacity: 0.9;
    }
}

/* CSS stand-in for fullscreen. z-index sits at the maximum because
   ExoClick's in-page push renders at 2147483647 and would otherwise paint
   over the expanded video; the ad units are also hidden while expanded
   (below), which is what a real fullscreen would do anyway. */
.video-player-wrapper.is-expanded {
    position: fixed;
    inset: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    margin: 0;
    aspect-ratio: auto;
    z-index: 2147483647;
    background: #000;
    box-shadow: none;
}

.video-player-wrapper.is-expanded iframe {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
}

body.player-expanded {
    overflow: hidden;
}

/* Nothing should sit on top of an expanded player. */
body.player-expanded .exo-ipp-container,
body.player-expanded [id^="exo-im-"],
body.player-expanded .main-header {
    display: none !important;
}

/* Native fullscreen path: the wrapper itself is the fullscreen element. */
.video-player-wrapper:fullscreen {
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
    background: #000;
}

.video-player-wrapper:fullscreen iframe {
    width: 100% !important;
    height: 100% !important;
}

.video-player-wrapper:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    background: #000;
}
