/* SpassCore v1.1 — TubeGalore-inspired dark theme */
:root {
    --bg: #000000;
    --bg-elevated: #141414;
    --bg-header: #1a1a1a;
    --bg-card: #111111;
    --bg-hover: #222222;
    --border: rgba(255,255,255,.1);
    --text: #ffffff;
    --text-muted: #999999;
    --accent: #f5c518;
    --accent-hover: #ffd740;
    --radius: 6px;
    --radius-sm: 4px;
    --header-h: 52px;
    --container: 1540px;
    --shadow: 0 4px 20px rgba(0,0,0,.5);
    --transition: .18s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    overflow-x: hidden;
    max-width: 100%;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

/* Header — TubeGalore style */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: var(--header-h);
}

.site-logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.02em;
    flex-shrink: 0;
    color: var(--text);
}

.site-logo span { color: var(--accent); }

.main-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex-shrink: 0;
}

.main-nav > a,
.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.main-nav > a:hover,
.main-nav > a.is-active,
.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
    color: var(--text);
}

.nav-dropdown-toggle svg { opacity: .7; transition: transform var(--transition); }
.nav-dropdown.is-open .nav-dropdown-toggle svg { transform: rotate(180deg); }

.nav-dropdown { position: relative; }

.nav-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 300;
    padding: .35rem 0;
}

.nav-dropdown.is-open .nav-dropdown-panel { display: block; }

.nav-dropdown-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 1rem;
    font-size: .88rem;
    color: var(--text);
    transition: var(--transition);
}

.nav-dropdown-panel a:hover { background: var(--bg-hover); color: var(--accent); }

.nav-dropdown-panel .cat-count {
    font-size: .78rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.nav-dropdown-all {
    border-top: 1px solid var(--border);
    margin-top: .25rem;
    padding-top: .65rem !important;
    color: var(--accent) !important;
    font-weight: 600;
}

.nav-mobile-only { display: none; }

.header-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 480px;
    margin-left: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.header-search input {
    flex: 1;
    min-width: 0;
    padding: .5rem .85rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: .88rem;
    font-family: inherit;
}

.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { outline: none; }

.header-search button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.header-search button:hover { color: var(--accent); }

.header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.icon-btn {
    width: 38px;
    height: 38px;
    display: none;
    place-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,.2); }

body.nav-open { overflow: hidden; }

@media (max-width: 900px) {
    .menu-toggle,
    .search-toggle { display: grid; }

    .header-search {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        max-width: none;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        z-index: 199;
    }

    .header-search.is-open { display: flex; }

    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem 0;
        background: var(--bg-header);
        border-top: 1px solid var(--border);
        overflow-y: auto;
        z-index: 198;
    }

    .main-nav.is-open { display: flex; }

    .main-nav > a,
    .nav-dropdown-toggle {
        width: 100%;
        padding: .85rem 1.25rem;
        border-radius: 0;
        justify-content: flex-start;
        font-size: .95rem;
    }

    .nav-dropdown { width: 100%; }

    .nav-dropdown-panel {
        position: static;
        display: none;
        max-height: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: var(--bg);
        padding: 0;
    }

    .nav-dropdown.is-open .nav-dropdown-panel { display: block; }

    .nav-dropdown-panel a { padding: .65rem 1.25rem .65rem 2rem; }

    .nav-mobile-only {
        display: flex;
        padding: .85rem 1.25rem;
        color: var(--accent);
        font-weight: 600;
    }

    .site-header .header-inner { position: relative; }
}

#main {
    overflow-x: hidden;
    max-width: 100%;
}

/* Hero */
.hero {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(244,63,94,.06) 0%, transparent 100%);
}

.hero h1 {
    margin: 0 0 .5rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -.03em;
}

.hero p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
}

/* Category pills — wrap to multiple rows */
.category-bar {
    padding: .85rem 0 1rem;
    border-bottom: 1px solid var(--border);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: .45rem 1rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    transition: var(--transition);
}

.pill:hover,
.pill.is-active {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(245,197,24,.1);
}

/* Page sections */
.page-home,
.page-archive {
    padding: 1.25rem 0 2.5rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.section-count {
    font-size: .85rem;
    color: var(--text-muted);
}

.archive-desc {
    margin: -.5rem 0 1rem;
    font-size: .88rem;
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.5;
}

.section-head-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sort-links {
    display: flex;
    gap: .35rem;
    font-size: .82rem;
}

.sort-links a {
    color: var(--text-muted);
    padding: .3rem .65rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.sort-links a.is-active,
.sort-links a:hover {
    color: var(--accent);
    border-color: var(--border);
}

/* Video grid — 6 columns desktop like TubeGalore */
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    padding-bottom: 2rem;
}

/* Video card */
.video-card {
    min-width: 0;
}

.card-link {
    display: block;
    color: inherit;
}

.card-link:hover .card-title { color: var(--accent); }

.card-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-hover);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.card-link:hover .card-thumb img { transform: scale(1.04); }

.card-views,
.card-duration {
    position: absolute;
    bottom: 6px;
    padding: .15rem .45rem;
    border-radius: 3px;
    background: rgba(0,0,0,.75);
    font-size: .72rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.card-views { left: 6px; }
.card-duration { right: 6px; }

.card-title {
    margin: .5rem 0 0;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.thumb-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* Pagination — WordPress outputs .navigation.pagination > .nav-links */
.navigation.pagination,
nav.pagination {
    margin: 1.5rem 0 3rem;
    clear: both;
}

.navigation.pagination .nav-links,
.pagination-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.navigation.pagination .page-numbers,
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: .9rem;
    line-height: 1;
    color: var(--text-muted);
    background: var(--bg-card);
}

.navigation.pagination a.page-numbers:hover,
.pagination a:hover {
    color: var(--text);
    border-color: rgba(255,255,255,.2);
    background: var(--bg-hover);
}

.navigation.pagination span.page-numbers.current,
.navigation.pagination .page-numbers.current,
.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.navigation.pagination .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* Single video */
.page-video { padding-top: calc(var(--header-h) + 1.5rem); padding-bottom: 3rem; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a:hover { color: var(--accent); }

.video-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 960px) {
    .video-layout { grid-template-columns: 1fr; }
}

.video-player {
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
}

.video-player video,
.video-player iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.video-player .video-wrapper { width: 100%; height: 100%; }
.video-player .video-wrapper iframe { min-height: 100%; }

.video-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 280px;
    color: var(--text-muted);
    gap: .5rem;
}

.single-title {
    margin: 1rem 0 .75rem;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
}

.video-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: .85rem;
    color: var(--text-muted);
}

.video-actions { display: flex; gap: .5rem; margin-left: auto; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover { background: var(--bg-hover); border-color: rgba(255,255,255,.15); }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #000; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }

.tag {
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.tag:hover { color: var(--accent); border-color: rgba(244,63,94,.3); }

.video-desc {
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: .9rem;
    color: var(--text-muted);
}

.video-desc h3 { margin: 0 0 .5rem; font-size: .95rem; color: var(--text); }

.sidebar-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.sidebar-box h3 {
    margin: 0 0 1rem;
    font-size: .95rem;
    font-weight: 600;
}

.related-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: .65rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
}

.related-item:last-child { border-bottom: 0; }

.related-item img {
    border-radius: var(--radius-sm);
    aspect-ratio: 16/9;
    object-fit: cover;
}

.related-item h4 {
    margin: 0;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-item span { font-size: .72rem; color: var(--text-muted); }

/* Static pages */
.page-content {
    padding: calc(var(--header-h) + 2rem) 0 3rem;
    max-width: 820px;
}

.page-content h1 {
    margin: 0 0 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.page-content h2 {
    margin: 2rem 0 .75rem;
    font-size: 1.2rem;
}

.page-content p,
.page-content li {
    color: var(--text-muted);
    font-size: .95rem;
}

.page-content ul { padding-left: 1.25rem; }

/* Contact form */
.contact-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
}

.contact-form .hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.contact-form label {
    display: block;
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .35rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.alert {
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-bottom: 1rem;
}

.alert-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: #86efac; }
.alert-error { background: rgba(244,63,94,.12); border: 1px solid rgba(244,63,94,.3); color: #fda4af; }

/* Categories page */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    padding: 1rem 0 3rem;
}

.cat-card {
    padding: 1.25rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.cat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.cat-card strong { display: block; margin-bottom: .25rem; }
.cat-card span { font-size: .8rem; color: var(--text-muted); }

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-header);
    padding: 2.5rem 0 1.25rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-logo { font-size: 1.25rem; }

.footer-brand p {
    color: var(--text-muted);
    font-size: .88rem;
    max-width: 360px;
    margin: .65rem 0 0;
    line-height: 1.5;
}

.rta-box {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 380px;
}

.rta-box strong {
    display: block;
    font-size: .85rem;
    margin-bottom: .4rem;
    color: var(--accent);
}

.rta-box p {
    margin: 0;
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.footer-links h4 {
    margin: 0 0 .75rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li { margin-bottom: .4rem; }

.footer-links a {
    font-size: .88rem;
    color: var(--text-muted);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: .8rem;
    color: var(--text-muted);
}

.age-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .6rem;
    border-radius: 4px;
    background: rgba(245,197,24,.15);
    color: var(--accent);
    font-weight: 600;
    font-size: .75rem;
}

/* Age gate */
.age-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(8px);
}

.age-gate.hidden { display: none; }

.age-gate-box {
    max-width: 420px;
    width: calc(100% - 2rem);
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow);
}

.age-gate-box h2 { margin: 0 0 .75rem; font-size: 1.35rem; }
.age-gate-box p { color: var(--text-muted); font-size: .9rem; margin: 0 0 1.5rem; }
.age-gate-actions { display: flex; gap: .75rem; justify-content: center; }

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.empty-state h2 { color: var(--text); margin-bottom: .5rem; }

/* ── Responsive grid ─────────────────────────────────────── */
@media (max-width: 1400px) {
    .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root { --header-h: 50px; }

    .container {
        width: min(100% - 1rem, var(--container));
    }

    .page-home,
    .page-archive {
        padding: .85rem 0 2rem;
    }

    .section-title { font-size: 1rem; }

    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .card-title {
        font-size: .78rem;
        margin-top: .4rem;
    }

    .card-views,
    .card-duration { font-size: .65rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .75rem;
    }

    .video-layout { grid-template-columns: 1fr; }

    .age-gate-actions { flex-direction: column; }
    .age-gate-actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
    .card-title { font-size: .75rem; -webkit-line-clamp: 2; }
}
