/*
Theme Name: VideoTube
Theme URI: https://moneyplatform.biz
Author: FetishBox TV
Author URI: https://moneyplatform.biz
Description: A clean, fast, dark-first video theme for FetishBox TV. Mobile-first layout, light and dark modes, schema.org markup.
Version: 2.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: videotube
Tags: video, responsive, mobile-first, seo, schema-markup, dark-mode
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
    /* Light */
    --bg-primary: #fafafa;
    --bg-secondary: #f0f0f2;
    --bg-tertiary: #e4e4e8;
    --text-primary: #16161a;
    --text-secondary: #55555f;
    --text-muted: #85858f;
    --border-color: #e2e2e7;
    --accent-color: #c4283c;
    --accent-hover: #d93a4e;
    --card-bg: #ffffff;
    --card-shadow: none;
    --header-bg: rgba(255, 255, 255, 0.92);
    --footer-bg: #ffffff;
    --footer-text: #16161a;
    --overlay-bg: rgba(10, 10, 12, 0.6);
    --duration-bg: rgba(0, 0, 0, 0.78);
    --mobile-nav-bg: #ffffff;

    --radius: 6px;
    --radius-lg: 10px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --header-height: 64px;
}

[data-theme="dark"] {
    --bg-primary: #0c0c0e;
    --bg-secondary: #161619;
    --bg-tertiary: #212126;
    --text-primary: #f2f2f4;
    --text-secondary: #a6a6b0;
    --text-muted: #70707a;
    --border-color: #24242a;
    --card-bg: #121215;
    --header-bg: rgba(12, 12, 14, 0.92);
    --footer-bg: #09090b;
    --footer-text: #f2f2f4;
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --mobile-nav-bg: #0f0f12;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
    height: -webkit-fill-available;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover { color: var(--accent-color); }

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.site-content {
    flex: 1;
    padding: 1.25rem 1rem 2rem;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(150%) blur(12px);
    backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: var(--header-height);
    padding: 0 1rem;
    max-width: 1440px;
    margin: 0 auto;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: -0.5rem;
    color: var(--text-primary);
    border-radius: var(--radius);
    transition: background-color 0.15s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible { background-color: var(--bg-secondary); }

.menu-toggle-icon { width: 22px; height: 22px; }

.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Logo / wordmark */
.site-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1;
}

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

.logo-accent {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    margin-right: 0.25rem;
}

.site-tagline {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Mobile header tags */
.mobile-header-tags {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
    margin-left: 0.25rem;
}

.mobile-header-tags-list {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.mobile-header-tags-list a {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: var(--bg-secondary);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-header-tags-list a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mobile-header-tags-more,
.header-tags-more {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 999px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-header-tags-more { width: 24px; height: 24px; }
.header-tags-more { width: 28px; height: 28px; }

.mobile-header-tags-more:hover,
.header-tags-more:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Desktop navigation */
.main-navigation {
    display: none;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.nav-top-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    margin-left: 1rem;
}

.nav-menu li { display: block; }

.nav-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-spacer { flex: 1; }

/* Search */
.nav-search { margin-left: 0.5rem; }

.nav-search .search-form,
.mobile-search-overlay .search-form {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.nav-search .search-form:focus-within,
.mobile-search-overlay .search-form:focus-within {
    border-color: var(--border-color);
    background: var(--bg-primary);
}

.nav-search .search-field {
    width: 240px;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;
}

.search-field::placeholder { color: var(--text-muted); }
.search-field:focus { outline: none; }

.nav-search .search-submit {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease;
}

.nav-search .search-submit:hover { color: var(--text-primary); }

/* Tag row */
.header-tags-row {
    display: none;
    border-top: 1px solid var(--border-color);
}

.header-tags-container {
    display: flex;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
}

.header-tags-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    overflow: hidden;
    max-height: 2rem;
}

.header-tags-list a {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.header-tags-list a:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 1002;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1rem 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mobile-search-overlay.is-open { opacity: 1; visibility: visible; }

.mobile-search-container {
    width: 100%;
    max-width: 520px;
    position: relative;
}

.mobile-search-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.mobile-search-overlay .search-field {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.mobile-search-overlay .search-submit {
    padding: 0.875rem 1rem;
    background: var(--accent-color);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.mobile-search-overlay .search-submit:hover { background: var(--accent-hover); }

/* Mobile off-canvas menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    z-index: 1001;
    overflow-y: auto;
    transition: left 0.25s ease;
}

.mobile-menu.is-open { left: 0; }

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    margin-right: -0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.mobile-menu-nav { padding: 0.5rem 0; }

.mobile-menu-nav a {
    display: block;
    padding: 0.8125rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.mobile-menu-nav a:hover { background-color: var(--bg-secondary); }

.mobile-menu-tags {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.mobile-menu-tags-title {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.mobile-menu-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    max-height: 300px;
    overflow-y: auto;
}

.mobile-menu-tags a {
    display: inline-block;
    padding: 0.3125rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-menu-tags a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.menu-overlay.is-visible { opacity: 1; visibility: visible; }

/* ==========================================================================
   Video grid & cards
   ========================================================================== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 0.75rem;
    margin-bottom: 2rem;
}

.video-card {
    background: transparent;
    min-width: 0;
}

.video-thumbnail {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-tertiary);
}

@media (hover: hover) {
    .video-card:hover .video-thumbnail img { transform: scale(1.03); }
}

/* Thumbnail badges */
.thumbnail-play,
.thumbnail-views,
.thumbnail-rating,
.video-duration {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.4375rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    z-index: 2;
    color: #fff;
    background: var(--duration-bg);
}

.thumbnail-play {
    inset: 0;
    margin: auto;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.thumbnail-play svg { width: 16px; height: 16px; margin-left: 2px; }

.video-card:hover .thumbnail-play,
.video-thumbnail:focus-visible .thumbnail-play { opacity: 1; }

.thumbnail-views { top: 0.5rem; left: 0.5rem; }
.thumbnail-rating { top: 0.5rem; right: 0.5rem; }
.thumbnail-views svg,
.thumbnail-rating svg { width: 11px; height: 11px; }
.thumbnail-rating { color: #fff; }
.thumbnail-rating svg { color: #e6b422; }

.video-duration { bottom: 0.5rem; right: 0.5rem; }

.video-info { padding: 0.625rem 0.125rem 0; }

.video-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.4;
    letter-spacing: 0;
}

.video-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.video-title a:hover { color: var(--accent-color); }

.video-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.video-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.video-meta-icon { width: 14px; height: 14px; }

.video-rating { display: flex; align-items: center; gap: 0.125rem; }
.video-rating .star { color: #e6b422; }

/* ==========================================================================
   Featured
   ========================================================================== */

.featured-section { margin-bottom: 2rem; }

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.featured-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.featured-card .video-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.featured-card .video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
    z-index: 3;
}

.featured-card .video-title { font-size: 1rem; }
.featured-card .video-title a,
.featured-card .video-title a:hover { color: #fff; }

/* ==========================================================================
   Page headers & breadcrumbs
   ========================================================================== */

.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--text-primary); }
.breadcrumbs-separator { color: var(--text-muted); }
.breadcrumbs-current { color: var(--text-primary); }

.no-content {
    padding: 4rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.btn-home {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-home:hover { background: var(--accent-hover); color: #fff; }

/* ==========================================================================
   Single video
   ========================================================================== */

.single-video {
    max-width: 1200px;
    margin: 0 auto;
}

.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-player-container > iframe,
.video-player-container > video,
.video-player-container > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.video-content-wrapper .video-description { margin-bottom: 0; }

.video-download-section {
    display: flex;
    justify-content: stretch;
    flex-shrink: 0;
}

.video-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6875rem 1.25rem;
    background: var(--accent-color);
    color: #fff;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.video-download-btn:hover {
    background: var(--accent-hover);
    color: #fff;
}

.video-download-icon { width: 18px; height: 18px; }

.video-header { margin-bottom: 1.25rem; }

.video-page-title {
    font-size: 1.25rem;
    margin-bottom: 0.875rem;
}

.video-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.video-page-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.video-page-meta-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.video-taxonomies { margin-bottom: 1.5rem; }
.video-taxonomy { margin-bottom: 1rem; }

.video-taxonomy-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.video-taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.video-taxonomy-list a {
    display: inline-block;
    padding: 0.3125rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.video-taxonomy-list a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.video-description { margin-bottom: 2rem; }

.video-description-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

.video-description-content.is-collapsed {
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.video-description-content.is-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

.video-description-toggle {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.video-description-toggle:hover { color: var(--accent-color); }

.related-videos {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-videos-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) and (max-width: 1023px) {
    .related-videos .video-card:nth-child(n+10) { display: none; }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .related-videos .video-card:nth-child(n+9) { display: none; }
}

/* ==========================================================================
   Tags, categories, stars
   ========================================================================== */

.tags-list {
    column-count: 1;
    column-gap: 2rem;
}

.tag-item {
    break-inside: avoid;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-color);
}

.tag-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.tag-item a:hover { color: var(--accent-color); }

.tag-count {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.stars-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.star-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s ease;
}

.star-card:hover { border-color: var(--text-muted); }

.star-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    overflow: hidden;
}

.star-avatar img { width: 100%; height: 100%; object-fit: cover; }

.star-info { flex: 1; min-width: 0; }

.star-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.star-name a { color: inherit; }
.star-name a:hover { color: var(--accent-color); }

.star-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.star-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.star-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    overflow: hidden;
    flex-shrink: 0;
}

.star-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.star-profile-info { flex: 1; }

.star-profile-name {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
}

.star-profile-bio {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pagination a {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.pagination a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.pagination .current {
    background: var(--accent-color);
    color: #fff;
}

.pagination .dots {
    background: none;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--footer-bg);
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0 1.5rem;
    margin-top: auto;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-description {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-description p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.7;
    max-width: 780px;
}

.footer-nav { margin-bottom: 1.25rem; }

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    justify-content: flex-start;
}

.footer-menu a {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.footer-menu a:hover { color: var(--text-primary); }

.footer-copyright {
    text-align: left;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Mobile bottom navigation
   ========================================================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--mobile-nav-bg);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    display: flex;
    justify-content: space-around;
    padding: 0.375rem 0;
    padding-bottom: calc(0.375rem + env(safe-area-inset-bottom));
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 44px;
    padding: 0.25rem;
    color: var(--text-muted);
    font-size: 0.625rem;
    font-weight: 500;
    transition: color 0.15s ease;
}

.mobile-bottom-nav-item:hover,
.mobile-bottom-nav-item.active { color: var(--text-primary); }

.mobile-bottom-nav-item.active { color: var(--accent-color); }

.mobile-bottom-nav-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 0.125rem;
}

body.has-mobile-nav { padding-bottom: 70px; }

/* ==========================================================================
   Utilities
   ========================================================================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 640px) {
    .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 1rem; }
}

@media (min-width: 768px) {
    h1 { font-size: 1.75rem; }

    .site-content { padding: 1.5rem 1.5rem 3rem; }

    .featured-grid { grid-template-columns: repeat(2, 1fr); }
    .tags-list { column-count: 2; }
    .stars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .video-page-title { font-size: 1.5rem; }

    .mobile-bottom-nav { display: none; }
    body.has-mobile-nav { padding-bottom: 0; }

    .video-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }

    .video-content-wrapper .video-description { flex: 1; min-width: 0; }
    .video-download-section { justify-content: flex-start; }
    .video-download-btn { width: auto; white-space: nowrap; }

    .footer-inner, .header-inner, .header-tags-container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
    .menu-toggle,
    .mobile-header-tags { display: none; }

    .main-navigation { display: flex; align-items: stretch; }
    .header-tags-row { display: block; }

    .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .featured-grid { grid-template-columns: repeat(3, 1fr); }
    .stars-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .nav-search .search-field { width: 170px; }
}

@media (min-width: 1280px) {
    .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.75rem 1.125rem; }
    .related-videos .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media print {
    .site-header,
    .mobile-bottom-nav,
    .pagination,
    .related-videos { display: none; }

    .site-content { padding: 0; }
    .video-player-container { display: none; }
}

/* ==========================================================================
   Video Preview Player (k2s, tezfiles, fboom)
   ========================================================================== */

.video-embed-container {
    width: 100%;
    background: #000;
}

.videotube-preview.wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.videotube-preview .sub-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

.videotube-preview .poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: contain;
}

.videotube-preview .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.videotube-preview .play-btn:hover {
    background: var(--accent-color);
}

.videotube-preview .play-btn .play-icon {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid #fff;
    margin-left: 5px;
}

.videotube-preview .download-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    color: #fff;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.videotube-preview .download-btn:hover {
    background: var(--accent-color);
}

.videotube-preview .download-btn svg {
    width: 20px;
    height: 20px;
}

.videotube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading Spinner */
.videotube-loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    z-index: 5;
}

.videotube-loading-spinner.active {
    display: block;
}

.videotube-loading-spinner::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: videotube-spin 1s linear infinite;
}

@keyframes videotube-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Banner */
.error-wrap {
    width: 100%;
    padding-bottom: 56.25%;
    position: relative;
    background: #1a1a1a;
}

.error-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .videotube-preview .play-btn {
        width: 60px;
        height: 60px;
    }

    .videotube-preview .play-btn .play-icon {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 18px solid #fff;
        margin-left: 3px;
    }

    .videotube-preview .download-btn {
        width: 35px;
        height: 35px;
        bottom: 10px;
        right: 10px;
    }

    .videotube-preview .download-btn svg {
        width: 16px;
        height: 16px;
    }
}
