/* FapFire.com - Theme System */

:root {
    /* Light Mode (Default) */
    --primary: #ff4081;
    --primary-dark: #e91e63;
    --primary-light: #ff80ab;
    --accent: #ff4081;
    --bg: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f8f8f8;
    --bg-header: #ffffff;
    --bg-secondary: #f5f5f5;
    --text: #1a1a1a;
    --text-muted: #666666;
    --text-meta: #888888;
    --border: #e8e8e8;
    --border-light: #f0f0f0;
    --success: #4caf50;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-pill: 50px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* Dark Mode */
[data-theme="dark"] {
    --primary: #ff4081;
    --primary-dark: #f50057;
    --primary-light: #ff80ab;
    --accent: #ff4081;
    --bg: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-hover: #252525;
    --bg-header: #1a1a1a;
    --bg-secondary: #141414;
    --text: #ffffff;
    --text-muted: #aaaaaa;
    --text-meta: #888888;
    --border: #2a2a2a;
    --border-light: #333333;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
}

.logo-fap {
    color: var(--primary);
}

.logo-fire {
    color: var(--accent);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 6px;
}

.main-nav a {
    color: var(--text);
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.main-nav a:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.main-nav a.active {
    background: var(--primary);
    color: #fff;
}

/* Search */
.search-wrapper {
    flex: 1;
    max-width: 500px;
    position: relative;
    margin: 0 auto;
}

.search-form {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px 4px 4px 16px;
    transition: all 0.2s;
}

.search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

/* Remove pink focus border on all devices */
@media (max-width: 1024px) {
    .search-form,
    .search-form:focus,
    .search-form:focus-within,
    .search-form:active {
        border-color: #ddd !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    .search-form input,
    .search-form input:focus,
    .search-form input:active {
        outline: none !important;
        box-shadow: none !important;
    }
}

.search-form .search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-form input {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    color: var(--text);
    outline: none;
    min-width: 0;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    white-space: nowrap;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.search-suggestions.active {
    display: block;
}

.search-suggestions-section {
    padding: 8px 0;
}

.search-suggestions-section:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.search-suggestions-title {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--bg-hover);
}

.suggestion-thumb {
    width: 60px;
    height: 45px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-hover);
    flex-shrink: 0;
}

.suggestion-thumb.model {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

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

.suggestion-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.search-all-link {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    transition: background 0.15s;
}

.search-all-link:hover {
    background: var(--bg-hover);
}

.search-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}

.theme-toggle:hover {
    background: var(--border);
    border-color: var(--primary);
    color: var(--primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Light mode: show sun, hide moon */
.theme-toggle .icon-moon {
    display: none;
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
}

/* Main Content */
.site-main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-all {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

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

.view-all svg {
    width: 16px;
    height: 16px;
}

/* Page Header (old style - keep for compatibility) */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text);
}

.page-header p {
    color: var(--text-muted);
    margin-top: 4px;
    font-size: 0.9rem;
}

/* Sort Bar */
/* Page Toolbar (title + count + sort) */
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-left .section-title {
    margin: 0;
    font-size: 1.3rem;
}

.toolbar-left .video-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-hover);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

.toolbar-right {
    display: flex;
    align-items: center;
}

.sort-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 24px;
}

.sort-options {
    display: flex;
    gap: 6px;
}

.sort-options a {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sort-options a:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.sort-options a.active {
    background: var(--primary);
    color: #fff;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

/* Featured Models Section */
.featured-models-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.featured-models-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 16px;
}

.featured-model-card {
    display: block;
    text-align: center;
    transition: transform 0.2s;
}

.featured-model-card:hover {
    transform: translateY(-4px);
}

.featured-model-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 3px solid transparent;
    transition: border-color 0.2s;
}

.featured-model-card:hover img {
    border-color: var(--primary);
}

.featured-model-card h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    margin-top: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-model-card:hover h4 {
    color: var(--primary);
}

.featured-model-card span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Inline Models Section (between videos on homepage) */
.models-inline-section {
    margin: 30px 0;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.models-inline-section .section-header {
    margin-bottom: 20px;
}

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

.models-inline-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.model-inline-card {
    display: block;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.model-inline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.model-inline-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    display: block;
    background: var(--bg-hover);
}

.model-inline-card:hover img {
    opacity: 0.95;
}

.model-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.model-inline-info {
    padding: 12px;
    text-align: center;
}

.model-inline-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-inline-card:hover .model-inline-info h4 {
    color: var(--primary);
}

.model-inline-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Video Card */
.video-card {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

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

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s;
}

.video-thumb .preview-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
    background: #000;
}

.video-thumb.preview-active img {
    opacity: 0;
}

.video-thumb.preview-active .preview-video {
    opacity: 1;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

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

.video-info {
    padding: 12px 4px;
}

.video-title {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}

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

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

.video-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-meta .separator {
    color: var(--text-muted);
}

.video-rating {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-rating svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.video-model {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Lazy loading */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded,
img:not([data-src]) {
    opacity: 1;
}

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

/* Model Grid */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.category-card,
.model-card {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}

.category-card:hover,
.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.category-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--bg-hover);
}

.model-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-lg);
    background: var(--bg-hover);
}

.category-card .info,
.model-card .info {
    padding: 12px 4px;
}

.category-card h3,
.model-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.category-card:hover h3,
.model-card:hover h3 {
    color: var(--primary);
}

.category-card span,
.model-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Video Player Page */
.video-player-container {
    margin-bottom: 24px;
}

.video-details {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.video-details h1 {
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--text);
}

.video-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.video-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag {
    background: var(--bg-hover);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    color: #fff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a {
    background: var(--bg-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

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

/* Similar Videos */
.similar-videos {
    margin-top: 40px;
}

.similar-videos h2 {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--text);
}

/* Video Models link */
.video-models {
    margin-bottom: 12px;
}

.video-models strong {
    color: var(--text-muted);
    margin-right: 8px;
}

.video-models a {
    color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--bg-header);
    color: var(--text);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
    margin-bottom: 8px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.disclaimer {
    margin-top: 8px;
    font-size: 0.75rem;
}

/* Legal Pages (DMCA, Privacy, Terms) */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.legal-page .last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.legal-section {
    margin-bottom: 36px;
}

.legal-section h2 {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.legal-section h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin: 20px 0 12px;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-section ul,
.legal-section ol {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 12px 0 12px 24px;
}

.legal-section li {
    margin-bottom: 8px;
}

.legal-section a {
    color: var(--primary);
    text-decoration: underline;
}

.legal-section a:hover {
    color: var(--primary-hover);
}

.contact-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 16px 0;
}

.contact-box p {
    margin-bottom: 8px;
}

.contact-box p:last-child {
    margin-bottom: 0;
}

/* Model Hero Section */
.model-hero {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.model-hero-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.model-hero-image {
    flex-shrink: 0;
    width: 200px;
    height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-hover);
}

.model-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.model-hero-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-hero-image.no-image svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
}

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

.model-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.model-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 600px;
}

.model-stats {
    display: flex;
    gap: 32px;
}

.model-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.model-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.model-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-videos-section {
    margin-bottom: 24px;
}

.model-videos-section .section-title {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .model-hero {
        padding: 20px;
    }
    
    .model-hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .model-hero-image {
        width: 160px;
        height: 200px;
    }
    
    .model-name {
        font-size: 1.5rem;
    }
    
    .model-stats {
        justify-content: center;
        gap: 24px;
    }
    
    .model-stat .stat-value {
        font-size: 1.2rem;
    }
}

/* 404 Error Page */
.error-page {
    text-align: center;
    padding: 40px 20px;
}

.error-content {
    max-width: 500px;
    margin: 0 auto 60px;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 4px 4px 0 var(--border);
}

.error-title {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 16px;
}

.error-message {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.error-suggestions {
    max-width: 1000px;
    margin: 0 auto;
}

.error-suggestions h3 {
    font-size: 1.2rem;
    margin-bottom: 24px;
    color: var(--text);
}

.video-grid-small {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 900px) {
    .video-grid-small {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .error-code {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .video-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .error-code {
        font-size: 4rem;
    }
}

/* Responsive */
@media (max-width: 1600px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .featured-models-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .featured-models-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .model-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .featured-models-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }
    
    .models-inline-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .main-nav {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        padding-top: 15px;
        gap: 4px;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        text-align: center;
    }
    
    .search-wrapper {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 0;
    }
    
    .search-form {
        padding: 2px 2px 2px 12px;
    }
    
    .search-form input {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .search-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 2;
        margin-left: auto;
    }
    
    .suggestion-thumb {
        width: 50px;
        height: 38px;
    }
    
    .suggestion-thumb.model {
        width: 36px;
        height: 36px;
    }
    
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-header h1 {
        font-size: 1.2rem;
    }
    
    .sort-bar {
        justify-content: center;
    }
    
    .page-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .toolbar-left {
        flex-wrap: wrap;
    }
    
    .toolbar-right {
        width: 100%;
    }
    
    .toolbar-right .sort-options {
        width: 100%;
        justify-content: flex-start;
    }
    
    .models-inline-section {
        padding: 16px;
    }
    
    .models-inline-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .model-inline-info {
        padding: 10px;
    }
    
    .model-inline-info h4 {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sort-options {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Search bar on mobile */
    .search-wrapper {
        order: 3;
    }
    
    .search-form {
        padding: 2px 2px 2px 10px;
    }
    
    .search-form .search-icon {
        width: 18px;
        height: 18px;
    }
    
    .search-form input {
        padding: 8px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .models-inline-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Video card smaller on mobile */
    .video-card {
        border-radius: var(--radius);
    }
    
    .video-info {
        padding: 8px;
    }
    
    .video-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }
    
    .video-meta {
        font-size: 0.7rem;
    }
}

/* ============ FILTER BAR ============ */

.filter-bar {
    display: flex;
    gap: 10px;
    margin-right: 16px;
}

.filter-group select {
    padding: 8px 32px 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 120px;
}

.filter-group select:hover {
    border-color: var(--primary);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.1);
}

[data-theme="dark"] .filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {
    .filter-bar {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .filter-group select {
        flex: 1;
        min-width: 0;
    }
}

/* ============ TAGS SYSTEM ============ */

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tag-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.tag-item .tag-count {
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tag sizes */
.tag-item.tag-xl {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 18px;
}

.tag-item.tag-lg {
    font-size: 1rem;
    font-weight: 500;
}

.tag-item.tag-md {
    font-size: 0.9rem;
}

.tag-item.tag-sm {
    font-size: 0.85rem;
}

.tag-item.tag-xs {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* Related tags inline */
.related-tags-section {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.related-tags-section h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--primary);
    color: #fff;
}

/* ============ SOCIAL SHARING ============ */

.share-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.share-section span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.reddit {
    background: #FF4500;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.copy {
    background: var(--bg-secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.share-btn.copy:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* ============ BREADCRUMB ============ */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span:last-child {
    color: var(--text);
}

/* ============ NO RESULTS ============ */

.no-results {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive tags */
@media (max-width: 768px) {
    .tags-cloud {
        gap: 8px;
    }
    
    .tag-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .tag-item.tag-xl,
    .tag-item.tag-lg {
        font-size: 0.9rem;
        padding: 8px 14px;
    }
    
    .share-section {
        flex-wrap: wrap;
    }
}

/* ============ INFINITE SCROLL ============ */

.infinite-scroll-container {
    position: relative;
}

.infinite-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.infinite-loading.visible {
    opacity: 1;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.scroll-sentinel {
    height: 1px;
    width: 100%;
}

.infinite-end {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.infinite-end span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}

/* ============ COLLECTIONS ============ */

.collections-section {
    margin-bottom: 40px;
}

.collections-section .section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.collection-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color, var(--primary));
}

.collection-preview {
    position: relative;
    aspect-ratio: 16/9;
    display: flex;
    overflow: hidden;
}

.collection-preview .preview-thumb {
    flex: 1;
    position: relative;
}

.collection-preview .preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collection-preview .preview-thumb:not(:first-child) {
    margin-left: -20px;
    clip-path: polygon(20px 0, 100% 0, 100% 100%, 20px 100%);
}

.collection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), var(--accent-color, var(--primary)));
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.collection-card:hover .collection-overlay {
    opacity: 0.5;
}

.collection-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.collection-info {
    padding: 16px;
}

.collection-info h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 4px;
}

.collection-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.collection-count {
    font-size: 0.8rem;
    color: var(--accent-color, var(--primary));
    font-weight: 600;
}

/* Collection List (categories/tags) */
.collections-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.collection-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s;
}

.collection-list-item:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.collection-list-item .item-title {
    color: var(--text);
    font-weight: 500;
}

.collection-list-item .item-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.view-all-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Collection Header */
.collection-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 30px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.collection-header-icon {
    font-size: 4rem;
    padding: 20px;
    background: var(--accent-color, var(--primary));
    border-radius: var(--radius-lg);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.collection-header-info h1 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 8px;
}

.collection-header-info p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 12px;
}

.collection-video-count {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-color, var(--primary));
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive Collections */
@media (max-width: 1200px) {
    .collections-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .collections-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .collections-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .collection-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .collection-header-icon {
        font-size: 3rem;
        padding: 16px;
    }
    
    .collection-header-info h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .collections-grid {
        grid-template-columns: 1fr;
    }
    
    .collections-list {
        grid-template-columns: 1fr;
    }
}

/* ============ IMPROVED CATEGORIES PAGE ============ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.category-card-new {
    display: block;
    text-decoration: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.category-card-new:hover {
    transform: translateY(-4px);
}

.category-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-card-new:hover .category-thumb img {
    transform: scale(1.1);
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-secondary));
}

.category-placeholder svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
}

.category-count {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

/* Tags Section on Categories Page */
.tags-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tags-section h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
}

.tags-cloud-home {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag-cloud-item {
    display: inline-block;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-pill);
    color: var(--text);
    font-size: calc(var(--size, 1) * 1rem);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-cloud-item:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}

/* Homepage Tags Section */
.homepage-tags-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.homepage-tags-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.homepage-tags-section h2 {
    font-size: 1.3rem;
    color: var(--text);
    margin: 0;
}

.homepage-tags-section .view-all {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.homepage-tags-section .view-all:hover {
    text-decoration: underline;
}

/* Responsive Categories */
@media (max-width: 1400px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-title {
        font-size: 0.85rem;
    }
    
    .category-count {
        font-size: 0.75rem;
    }
    
    .tags-section {
        padding: 20px;
    }
}

/* ===========================================
   ENHANCED MOBILE & UI IMPROVEMENTS v2.0
   =========================================== */

/* Better transitions globally */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Improved header for mobile */
@media (max-width: 768px) {
    .site-header {
        padding: 8px 0;
        box-shadow: 0 1px 8px rgba(0,0,0,0.1);
    }
    
    .site-header .container {
        padding: 0 12px;
        gap: 8px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0;
        order: 1;
    }
    
    .mobile-menu-toggle {
        order: 2;
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .search-wrapper {
        order: 3;
        width: 100%;
        margin-top: 4px;
    }
    
    .search-form {
        border-radius: 24px;
        border-width: 1px !important;
        border-color: #e0e0e0 !important;
        background: var(--bg-secondary);
    }
    
    /* Remove pink focus border on mobile */
    .search-form:focus-within {
        border-color: #e0e0e0 !important;
        box-shadow: none !important;
    }
    
    .search-form input {
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .search-btn {
        padding: 10px 18px;
        font-size: 14px;
        border-radius: 20px;
    }
    
    .search-icon {
        display: none;
    }
}

/* Compact toolbar on mobile */
@media (max-width: 768px) {
    .page-toolbar {
        padding: 12px 0;
        gap: 12px;
    }
    
    .section-title {
        font-size: 1.1rem !important;
    }
    
    .video-count {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
    
    /* Horizontal scrolling filters */
    .toolbar-right {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 4px;
    }
    
    .toolbar-right::-webkit-scrollbar {
        display: none;
    }
    
    .filter-bar {
        flex-shrink: 0;
    }
    
    .filter-group select {
        min-width: 100px;
        padding: 10px 28px 10px 12px;
        font-size: 0.85rem;
    }
    
    .sort-options {
        flex-wrap: nowrap;
        gap: 4px;
    }
    
    .sort-options a {
        padding: 8px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
        border-radius: 16px;
    }
}

/* Improved video cards for mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .video-grid {
        gap: 8px;
    }
    
    .video-card {
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
    
    .video-thumb {
        border-radius: 10px 10px 0 0;
    }
    
    .video-duration {
        font-size: 0.7rem;
        padding: 3px 6px;
        border-radius: 4px;
        bottom: 6px;
        right: 6px;
    }
    
    .video-info {
        padding: 10px 8px;
    }
    
    .video-title {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 6px;
        font-weight: 600;
    }
    
    .video-meta {
        font-size: 0.72rem;
        gap: 4px;
    }
    
    .video-meta .separator {
        display: none;
    }
    
    .video-views {
        display: inline;
    }
    
    .video-rating {
        display: none;
    }
    
    .video-date {
        display: block;
        width: 100%;
        margin-top: 2px;
    }
}

/* Better models section on mobile */
@media (max-width: 768px) {
    .featured-models-section {
        padding: 16px 0;
    }
    
    .featured-models-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .featured-models-grid::-webkit-scrollbar {
        display: none;
    }
    
    .featured-model-card {
        flex: 0 0 72px;
        min-width: 72px;
    }
    
    .featured-model-card img {
        width: 64px;
        height: 64px;
        border-width: 2px;
    }
    
    .featured-model-card h4 {
        font-size: 0.75rem;
        margin-top: 6px;
    }
    
    .featured-model-card span {
        font-size: 0.65rem;
    }
}

/* Inline models section mobile */
@media (max-width: 480px) {
    .models-inline-section {
        padding: 14px;
        margin: 20px -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .models-inline-grid {
        gap: 8px;
    }
    
    .model-inline-card img {
        aspect-ratio: 1;
    }
    
    .model-inline-info {
        padding: 8px;
    }
    
    .model-inline-info h4 {
        font-size: 0.8rem;
    }
    
    .model-inline-info span {
        font-size: 0.7rem;
    }
}

/* Tags cloud mobile */
@media (max-width: 768px) {
    .homepage-tags-section {
        padding: 16px 0;
    }
    
    .tags-cloud {
        gap: 6px;
        padding: 12px 0;
    }
    
    .tag-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .tag-item .tag-count {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
}

/* Footer mobile improvements */
@media (max-width: 480px) {
    .site-footer {
        padding: 24px 0 16px;
    }
    
    .footer-brand {
        font-size: 1.2rem;
    }
    
    .footer-brand p {
        font-size: 0.8rem;
    }
    
    .footer-links {
        gap: 12px 16px;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding-top: 16px;
        font-size: 0.75rem;
    }
    
    .disclaimer {
        font-size: 0.7rem;
    }
}

/* Better mobile menu */
@media (max-width: 768px) {
    .main-nav {
        background: var(--bg-card);
        margin: 8px -12px 0;
        padding: 12px;
        border-radius: 0;
        border-top: 1px solid var(--border);
    }
    
    .main-nav a {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 0.95rem;
        text-transform: none;
        letter-spacing: 0;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background: var(--primary);
        color: #fff;
    }
}

/* Desktop UI improvements */
@media (min-width: 769px) {
    /* Ensure navigation is visible on desktop */
    .main-nav {
        display: flex !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .video-card {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }
    
    .video-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    }
    
    .main-nav a {
        position: relative;
        transition: all 0.2s ease;
    }
    
    .main-nav a::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--primary);
        transition: all 0.2s ease;
        transform: translateX(-50%);
    }
    
    .main-nav a:hover::after {
        width: calc(100% - 40px);
    }
    
    .main-nav a.active::after {
        display: none;
    }
}

/* Improved dark mode */
[data-theme="dark"] .video-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

[data-theme="dark"] .video-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .search-form {
    background: #1a1a1a;
    border-color: #333;
}

/* Dark mode: remove pink focus border */
@media (max-width: 1024px) {
    [data-theme="dark"] .search-form,
    [data-theme="dark"] .search-form:focus,
    [data-theme="dark"] .search-form:focus-within,
    [data-theme="dark"] .search-form:active {
        border-color: #444 !important;
        box-shadow: none !important;
        outline: none !important;
    }
    
    [data-theme="dark"] .search-form input,
    [data-theme="dark"] .search-form input:focus,
    [data-theme="dark"] .search-form input:active {
        outline: none !important;
        box-shadow: none !important;
    }
}

[data-theme="dark"] .tag-item {
    background: #1a1a1a;
    border-color: #333;
}

[data-theme="dark"] .filter-group select {
    background-color: #1a1a1a;
    border-color: #333;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Hide scrollbars but keep functionality */
.hide-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-secondary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Pull to refresh indicator style */
.ptr-indicator {
    display: none;
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .site-header {
        padding-top: max(8px, env(safe-area-inset-top));
    }
    
    .site-footer {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    
    @media (max-width: 768px) {
        .container {
            padding-left: max(10px, env(safe-area-inset-left));
            padding-right: max(10px, env(safe-area-inset-right));
        }
    }
}
