/* Modern Minimal Design - Adult Network */

:root {
    --primary: #1a1a1a;
    --secondary: #2d2d2d;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --text: #ffffff;
    --text-muted: #9ca3af;
    --border: #374151;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --background: #0f0f0f;
    --card: #1f1f1f;
    --card-hover: #2a2a2a;
}


/* Prevent horizontal scroll globally */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    font-size: 14px;
    overflow-x: hidden;
}


/* Ensure all containers don't overflow */

.container,
.main-container,
.main-content,
.content-area,
.sidebar {
    overflow-x: hidden;
    max-width: 100%;
}


/* Mobile specific overflow prevention */

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }
    .main-content,
    .content-area,
    .sidebar,
    .video-grid,
    .gallery-grid,
    .category-grid {
        overflow-x: hidden;
        max-width: 100%;
    }
    /* Ensure images don't cause overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    /* Ensure videos don't cause overflow */
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
    /* Ensure text doesn't overflow */
    .video-title,
    .hero-title,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    /* Additional mobile optimizations */
    .main-content {
        padding: 0.5rem;
        margin: 0;
        width: 100%;
    }
    .video-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        width: 100%;
    }
    /* Ensure buttons don't overflow */
    .btn,
    .nav-menu a {
        max-width: 100%;
        white-space: normal;
        word-wrap: break-word;
    }
}


/* Typography */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}


/* Layout */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* Header */

.header {
    background: var(--primary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover {
    color: var(--text);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    width: 300px;
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text);
    outline: none;
    width: 100%;
    font-size: 14px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}


/* Main Layout */

.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem 0;
}

.content-area {
    min-height: 500px;
}

.sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sidebar {
        position: static;
        order: 2;
    }
    .content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .main-layout {
        padding: 1rem 0;
        gap: 1.5rem;
    }
    .sidebar {
        margin-top: 1rem;
    }
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    .nav-menu {
        display: none;
    }
    .search-bar {
        width: 200px;
    }
    .hero {
        padding: 2rem 1rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .header-content {
        flex-direction: column;
        gap: 1rem;
        height: auto;
        padding: 1rem 0;
        min-height: 64px;
    }
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        order: 2;
        width: 100%;
    }
    .search-bar {
        order: -1;
        width: 100%;
        max-width: 300px;
    }
    /* Fix mobile menu layout */
    .logo {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    .nav-menu a {
        padding: 0.5rem 1rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.05);
        transition: all 0.2s;
    }
    .nav-menu a:hover {
        background: rgba(99, 102, 241, 0.1);
        border-color: var(--accent);
    }
}

@media (max-width: 480px) {
    .main-layout {
        padding: 0.5rem 0;
        overflow-x: hidden;
    }
    .video-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .search-bar {
        display: none;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .nav-menu a {
        text-align: center;
        padding: 0.75rem;
        border: 1px solid var(--border);
        border-radius: 6px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
        width: 100%;
    }
    .container {
        overflow-x: hidden;
        width: 100%;
        padding: 0 0.5rem;
    }
    /* Optimize header for mobile */
    .header {
        position: relative;
        backdrop-filter: none;
    }
    .header-content {
        flex-wrap: wrap;
        padding: 0 0.5rem;
    }
}


/* Cards */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}


/* Video Grid */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.video-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.video-card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .video-play {
    opacity: 1;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 12px;
}

.video-category {
    color: var(--accent);
    font-weight: 500;
}


/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-hover);
    border-color: var(--accent);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 12px;
}


/* Tags */

.tag {
    display: inline-block;
    background: var(--secondary);
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
}


/* Categories */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}


/* Gallery Grid */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.category-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.category-card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.category-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    color: white;
}

.category-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.category-count {
    color: var(--text-muted);
    font-size: 12px;
}


/* Hero Section */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}


/* Ad Zones */

.ad-zone {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 1rem 0;
}


/* Footer */

.footer {
    background: var(--primary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}


/* Responsive */

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sidebar {
        position: static;
        order: -1;
    }
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    .nav-menu {
        display: none;
    }
    .search-bar {
        width: 200px;
    }
    .hero {
        padding: 2rem 1rem;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    .search-bar {
        display: none;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
}


/* Loading States */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--secondary) 25%, var(--border) 50%, var(--secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* Scrollbar */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}


/* Focus States */

button:focus,
input:focus,
a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* Selection */

::selection {
    background: var(--accent);
    color: white;
}


/* Mobile Performance Optimizations */

@media (max-width: 768px) {
    /* Reduce animations for better performance */
    * {
        transition-duration: 0.1s !important;
        animation-duration: 0.1s !important;
    }
    /* Optimize scrolling */
    body {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    /* Reduce box-shadow complexity */
    .video-card:hover,
    .gallery-item:hover,
    .category-card:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    /* Optimize images */
    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    /* Reduce transform complexity */
    .video-card:hover,
    .gallery-item:hover,
    .category-card:hover {
        transform: translateY(-2px);
    }
    /* Optimize grid layouts */
    .video-grid,
    .gallery-grid {
        will-change: transform;
    }
    /* Reduce backdrop-filter usage on mobile */
    .header {
        backdrop-filter: none;
        background: var(--primary);
    }
}

@media (max-width: 480px) {
    /* Further reduce animations */
    * {
        transition-duration: 0.05s !important;
        animation-duration: 0.05s !important;
    }
    /* Optimize touch targets */
    .btn,
    .nav-link,
    .video-card,
    .gallery-item {
        min-height: 44px;
        min-width: 44px;
    }
    /* Reduce padding for more content */
    .card {
        padding: 1rem;
    }
    .video-info {
        padding: 0.75rem;
    }
    /* Optimize text rendering */
    body {
        text-rendering: optimizeSpeed;
        -webkit-font-smoothing: antialiased;
    }
}


/* Touch-friendly hover states */

@media (hover: none) and (pointer: coarse) {
    .video-card:hover,
    .gallery-item:hover,
    .category-card:hover {
        transform: none;
        box-shadow: none;
    }
    .video-card:active,
    .gallery-item:active,
    .category-card:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
}


/* High DPI display optimizations */

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .video-thumbnail img,
    .gallery-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}


/* Mobile Menu Toggle */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        display: block;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .nav-menu.active {
        display: flex;
    }
    /* Ensure header doesn't overlap content */
    .header {
        position: relative;
        z-index: 100;
    }
    .main-layout {
        margin-top: 0;
    }
    /* Prevent any element from causing horizontal scroll */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    /* Ensure proper spacing */
    .main-content {
        margin: 0;
        padding: 0.5rem;
        width: 100%;
    }
    /* Optimize video cards for mobile */
    .video-card {
        width: 100%;
        margin: 0;
    }
    .video-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    /* Ensure text doesn't overflow */
    .video-title,
    .hero-title,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    span,
    div {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    /* Optimize buttons */
    .btn,
    .nav-menu a {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    /* Ensure forms don't overflow */
    form,
    input,
    textarea,
    select {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}