/* ============================================ */
/* GLOBAL STYLES */
/* ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b00;
    --primary-hover: #ff8534;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================ */
/* HEADER */
/* ============================================ */

.header {
    background: rgba(13, 13, 13, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.search-bar {
    display: flex;
    gap: 8px;
}

.search-bar input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 9px 15px;
    border-radius: 6px;
    font-size: 14px;
    width: 220px;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.search-bar button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 9px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: var(--primary-hover);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 26px;
    cursor: pointer;
}

/* ============================================ */
/* CATEGORIES */
/* ============================================ */

.categories {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.category-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.category-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ============================================ */
/* PORNSTARS SECTION */
/* ============================================ */

.pornstars-section {
    margin: 30px 0;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.pornstar-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pornstar-btn {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8534 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.pornstar-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.5);
}

/* ============================================ */
/* VIDEO GRID */
/* ============================================ */

.page {
    display: none;
}

.page.active {
    display: block;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

/* ============================================ */
/* VIDEO CARD - OPTIMIZED RENDERING */
/* ============================================ */

.video-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
    
    /* FORCE GPU RENDERING FOR SHARPNESS */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    
    /* PREVENT BLUR DURING ANIMATION */
    -webkit-font-smoothing: subpixel-antialiased;
}

.video-card:hover {
    transform: translateY(-8px) translate3d(0, 0, 0);
    -webkit-transform: translateY(-8px) translate3d(0, 0, 0);
    box-shadow: 0 12px 40px rgba(255, 107, 0, 0.3);
    border-color: rgba(255, 107, 0, 0.3);
}

.video-card:active {
    transform: translateY(-4px) translate3d(0, 0, 0);
    -webkit-transform: translateY(-4px) translate3d(0, 0, 0);
}

/* ============================================ */
/* THUMBNAIL WRAPPER - SHARP CONTAINER */
/* ============================================ */

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
    background: #000;
    border-radius: 0;
    cursor: pointer;
    
    /* FORCE SHARP EDGES */
    -webkit-perspective: 1000;
    perspective: 1000;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    
    /* PREVENT SUBPIXEL RENDERING BLUR */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

/* PREVENT BLUR ON TRANSFORM */
.video-thumbnail-wrapper * {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* ============================================ */
/* THUMBNAIL OPTIMIZATION - MAXIMUM SHARPNESS */
/* ============================================ */

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    
    /* OPTIMIZED FOR PHOTO/VIDEO THUMBNAILS - NOT PIXEL ART! */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: optimize-contrast;
    -ms-interpolation-mode: bicubic;
    
    /* PREVENT BLUR DURING ANIMATIONS */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    
    /* GPU ACCELERATION FOR SHARP RENDERING */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    
    /* SMOOTH SCALING */
    image-orientation: from-image;
    
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* HOVER - KEEP SHARP DURING SCALE */
.video-card:hover .video-thumbnail {
    transform: scale(1.1) translate3d(0, 0, 0);
    -webkit-transform: scale(1.1) translate3d(0, 0, 0);
}

/* FORCE SHARP RENDERING ON LOAD */
.video-thumbnail[loading="lazy"] {
    image-rendering: -webkit-optimize-contrast;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* ENSURE SHARP AFTER LOAD */
.video-thumbnail[src] {
    image-rendering: -webkit-optimize-contrast;
    animation: sharpen 0.3s ease-in;
}

@keyframes sharpen {
    0% {
        filter: blur(2px);
        opacity: 0.8;
    }
    100% {
        filter: blur(0);
        opacity: 1;
    }
}

/* PREVENT LAYOUT SHIFT */
.video-thumbnail-wrapper img {
    display: block;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* GRADIENT OVERLAY - Premium Look */
.video-thumbnail-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-card:hover .video-thumbnail-wrapper::before {
    opacity: 1;
    background: linear-gradient(
        to bottom,
        rgba(255, 107, 0, 0.1) 0%,
        rgba(255, 107, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

/* SHINE EFFECT on hover */
.video-thumbnail-wrapper::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 70%
    );
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: all 0.6s;
}

.video-card:hover .video-thumbnail-wrapper::after {
    opacity: 1;
    top: -50%;
    left: -50%;
}

/* Duration Badge */
.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    z-index: 3;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/* VIDEO INFO */
/* ============================================ */

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
}

.video-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
}

/* ============================================ */
/* PLAYER PAGE - LARGE THUMBNAIL OPTIMIZATION */
/* ============================================ */

.player-page {
    background: var(--bg-dark);
    min-height: 100vh;
    padding-top: 80px;
}

.player-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.video-player-section {
    position: relative;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.video-thumbnail-large {
    width: 100%;
    height: auto;
    max-height: 700px;
    display: block;
    cursor: pointer;
    border-radius: 0;
    
    /* MAXIMUM QUALITY FOR LARGE IMAGES */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: optimize-contrast;
    image-rendering: optimizeQuality;
    -ms-interpolation-mode: bicubic;
    
    /* ANTI-BLUR OPTIMIZATION */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* FORCE HIGH QUALITY SCALING */
    transform: translate3d(0, 0, 0) translateZ(0);
    -webkit-transform: translate3d(0, 0, 0) translateZ(0);
    
    /* PERFECT OBJECT FIT */
    object-fit: cover;
    object-position: center;
    
    transition: transform 0.3s ease;
}

.video-thumbnail-large:hover {
    transform: scale(1.02) translate3d(0, 0, 0);
    -webkit-transform: scale(1.02) translate3d(0, 0, 0);
}

/* Gradient overlay on player page */
.video-player-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 107, 0, 0.05) 0%,
        rgba(0, 0, 0, 0) 30%,
        rgba(0, 0, 0, 0.95) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.video-details {
    position: relative;
    z-index: 2;
    padding: 25px;
}

.video-title-large {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.video-stats {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 15px;
}

.stat-item strong {
    color: var(--primary);
    font-weight: 600;
}

.video-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.tag {
    background: #2a2a2a;
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #3a3a3a;
}

.watch-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b00, #ff8534);
    color: white;
    padding: 18px 60px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(255,107,0,0.4);
    transition: all 0.3s;
}

.watch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255,107,0,0.6);
}

/* ============================================ */
/* RELATED SECTION */
/* ============================================ */

.related-section {
    margin-top: 40px;
}

.section-header {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================ */
/* LOADING STATES */
/* ============================================ */

.loading-spinner {
    text-align: center;
    padding: 50px;
    display: none;
}

.spinner {
    width: 45px;
    height: 45px;
    margin: 0 auto 15px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-player {
    text-align: center;
    padding: 100px 20px;
    color: #aaa;
}

.spinner-player {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #222;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Shimmer effect while loading */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================ */
/* LOAD MORE BUTTON */
/* ============================================ */

.load-more-btn {
    display: none;
    margin: 40px auto;
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 50px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.load-more-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

/* ============================================ */
/* FOOTER */
/* ============================================ */

.footer {
    background: #111;
    border-top: 1px solid #222;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.footer-col a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-col a:hover { 
    color: var(--primary); 
}

.footer-divider {
    border-top: 1px solid #222;
    margin: 25px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p { 
    color: #555; 
    font-size: 13px; 
}

.footer-legal-links {
    display: flex;
    gap: 20px;
}

.footer-legal-links a {
    color: #555;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-legal-links a:hover { 
    color: var(--primary); 
}

.footer-disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: #0d0d0d;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
}

.footer-disclaimer p {
    color: #444;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.footer-disclaimer a { 
    color: var(--primary); 
    text-decoration: none; 
}

/* ============================================ */
/* HIGH-DPI DISPLAY OPTIMIZATION (2x, 3x screens) */
/* ============================================ */

@media 
  (-webkit-min-device-pixel-ratio: 2), 
  (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  
  .video-thumbnail,
  .video-thumbnail-large {
    /* FORCE MAXIMUM QUALITY ON RETINA */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* SHARPER TEXT RENDERING */
    text-rendering: optimizeLegibility;
  }
}

/* 3x DISPLAYS (iPhone Plus, etc) */
@media 
  (-webkit-min-device-pixel-ratio: 3),
  (min-resolution: 288dpi) {
  
  .video-thumbnail,
  .video-thumbnail-large {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
    image-rendering: high-quality;
  }
}

/* ============================================ */
/* MOBILE RESPONSIVE */
/* ============================================ */

@media (max-width: 767px) {
    .header-content { 
        flex-wrap: wrap; 
    }
    
    .logo {
        font-size: 22px;
    }
    
    .nav-links { 
        display: none; 
        width: 100%; 
        flex-direction: column; 
        gap: 12px; 
        padding: 15px 0;
    }
    
    .nav-links.active { 
        display: flex; 
    }
    
    .mobile-menu-toggle { 
        display: block; 
    }
    
    .search-bar { 
        width: 100%; 
        order: 3; 
    }
    
    .search-bar input { 
        flex: 1; 
        width: 100%;
    }
    
    .video-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
    }
    
    .category-btn, .pornstar-btn { 
        padding: 8px 14px; 
        font-size: 12px; 
    }
    
    .video-info {
        padding: 10px;
    }
    
    .video-title {
        font-size: 13px;
        min-height: 36px;
    }
    
    .video-meta {
        font-size: 11px;
    }
    
    /* MOBILE DEVICES - MAXIMUM SHARPNESS */
    .video-thumbnail,
    .video-thumbnail-large {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimizeQuality;
        -webkit-backface-visibility: hidden;
        
        /* PREVENT MOBILE SAFARI BLUR */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    .video-thumbnail-large {
        max-height: 400px;
    }
    
    .video-title-large {
        font-size: 20px;
    }
    
    .watch-btn {
        width: 100%;
        text-align: center;
        padding: 16px 30px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .video-thumbnail-large {
        max-height: 300px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1400px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}
/* ============================================ */
/* EXTRA THUMBNAIL SHARPNESS BOOST */
/* ============================================ */

.video-thumbnail {
    /* FORCE HIGHEST QUALITY */
    image-rendering: optimizeQuality !important;
    image-rendering: -webkit-optimize-contrast !important;
    
    /* DISABLE BROWSER SMOOTHING */
    -ms-interpolation-mode: nearest-neighbor;
    
    /* SHARPER SCALING ALGORITHM */
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    
    /* PREVENT ANY BLUR */
    filter: contrast(1.02) brightness(1.01);
    
    /* FORCE PIXEL-PERFECT RENDERING */
    image-orientation: from-image;
    -webkit-transform: translateZ(0) scale(1.0001);
    transform: translateZ(0) scale(1.0001);
}

/* LARGE THUMBNAILS - PLAYER PAGE */
.video-thumbnail-large {
    /* MAXIMUM QUALITY */
    image-rendering: optimizeQuality !important;
    image-rendering: high-quality !important;
    
    /* SLIGHT SHARPENING FILTER */
    filter: contrast(1.03) brightness(1.01) saturate(1.05);
    
    /* PERFECT SCALING */
    -webkit-transform: translateZ(0) scale(1.0001);
    transform: translateZ(0) scale(1.0001);
}

/* REMOVE BLUR ON ALL DEVICES */
@media screen {
    .video-thumbnail,
    .video-thumbnail-large {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
        -webkit-transform: translate3d(0,0,0) scale(1.0001);
        transform: translate3d(0,0,0) scale(1.0001);
    }
}
