/* VideoLib Complete CSS - All Styles Merged */

/* ========== BASE & RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #1a0f2e 0%, #2d1b4e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

body.popup-open {
    overflow: hidden;
}

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, rgba(209, 50, 229, 0.15) 0%, rgba(217, 70, 239, 0.1) 100%);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(217, 70, 239, 0.2);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 45px;
    width: auto;
}

/* Home Button */
.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    background: rgba(45, 27, 78, 0.8);
    border: 2px solid rgba(217, 70, 166, 0.3);
    border-radius: 25px;
    color: #cfc6dd;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
    margin-right: 10px;
}

.home-btn:hover {
    background: rgba(217, 70, 166, 0.2);
    border-color: #d946a6;
    color: #fff;
    transform: scale(1.05);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-item {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(217, 70, 239, 0.1);
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid rgba(217, 70, 239, 0.3);
    transition: all 0.3s;
    display: inline-block;
}

.nav-item:hover {
    background: rgba(217, 70, 239, 0.3);
    border-color: #d946a6;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #d946a6;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.95), rgba(30, 15, 55, 0.95));
    padding: 20px;
    gap: 10px;
    z-index: 99;
    border-bottom: 1px solid rgba(217, 70, 239, 0.2);
    flex-direction: column;
}

.mobile-menu.active {
    display: flex;
}

/* Search Box */
.search-container {
    max-width: 400px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 45px 0 20px;
    border: 2px solid rgba(217, 70, 166, 0.3);
    border-radius: 25px;
    background: rgba(45, 27, 78, 0.8);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

.search-input:focus {
    border-color: #d946a6;
    background: rgba(45, 27, 78, 0.95);
}

.search-input::placeholder {
    color: #9d8ba7;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #d946a6, #ec4899);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: white;
}

/* Mobile Search */
.mobile-search-trigger {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #d946a6;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-search-trigger:hover {
    background: rgba(217, 70, 166, 0.1);
}

.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    padding: 20px;
}

.mobile-search-overlay.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
}

.mobile-search-box {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.mobile-search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== HERO SECTION ========== */
.hero {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.3), rgba(217, 70, 166, 0.3));
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(217, 70, 239, 0.2), transparent);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    background: linear-gradient(135deg, #d946a6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: clamp(14px, 2vw, 18px);
    color: #cfc6dd;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.search-bar {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid rgba(217, 70, 239, 0.3);
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.search-bar:focus {
    outline: none;
    border-color: #d946a6;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
}

.search-bar::placeholder {
    color: rgba(224, 224, 224, 0.5);
}

/* Categories Bubble */
.categories-bubble {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.bubble-btn {
    padding: 8px 20px;
    border: 2px solid rgba(217, 70, 239, 0.4);
    border-radius: 25px;
    background: transparent;
    color: #d946a6;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
}

.bubble-btn:hover,
.bubble-btn.active {
    background: linear-gradient(135deg, #d946a6, #ec4899);
    border-color: #d946a6;
    color: white;
    transform: scale(1.05);
}

/* ========== MAIN CONTAINER ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* Main Layout with Sidebar */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Video Section */
.videos-section {
    width: 100%;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #d946a6;
}

.category-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
}

.category-icon {
    font-size: 32px;
}

/* ========== VIDEO GRID ========== */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.video-card-wrapper {
    display: flex;
    flex-direction: column;
}

.video-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    position: relative;
    display: block;
    text-decoration: none;
}

.video-card:hover {
    transform: translateY(-8px);
}

.video-card:hover .video-thumbnail {
    border-color: #d946a6;
    box-shadow: 0 15px 40px rgba(217, 70, 239, 0.2);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
    background-image: linear-gradient(135deg, #2d1b4e, #1a0f2e);
    flex-shrink: 0;
    border-radius: 12px;
    border: 1px solid rgba(217, 70, 239, 0.2);
    transition: all 0.3s;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    filter: brightness(0.9);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.08);
    filter: brightness(1);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(217, 70, 239, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
    z-index: 2;
    opacity: 0;
}

.video-card:hover .play-icon {
    color: #fff;
    background: #d946a6;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 3;
    color: #fff;
}

.hot-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 4;
    animation: ribbon-blink 1.5s ease-in-out infinite;
}

@keyframes ribbon-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    margin-bottom: 6px;
    word-break: break-word;
}

/* ========== CATEGORY SIDEBAR ========== */
.category-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.category-widget {
    background: rgba(30, 15, 55, 0.8);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(217, 70, 166, 0.2);
}

.category-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d946a6;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.category-item {
    display: inline-block;
    padding: 10px 16px;
    background: rgba(45, 27, 78, 0.6);
    border: 1px solid rgba(217, 70, 166, 0.3);
    border-radius: 20px;
    color: #cfc6dd;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
}

.category-item:hover {
    background: linear-gradient(135deg, rgba(217, 70, 166, 0.2), rgba(236, 72, 153, 0.2));
    border-color: #d946a6;
    color: #fff;
    transform: scale(1.05);
}

.category-item.active {
    background: linear-gradient(135deg, #d946a6, #ec4899);
    border-color: #d946a6;
    color: white;
    font-weight: 700;
}

.category-item.active:hover {
    transform: scale(1.05);
}

/* ========== ADS BANNERS ========== */
.ads-banner {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    min-height: 100px;
    max-height: 150px;
}

.ads-banner a {
    display: flex;
    width: 100%;
    max-width: 1200px;
}

.ads-banner img {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
    object-fit: contain;
}

.ads-banner:hover img {
    transform: scale(1.02);
}

.ads-banner-top,
.ads-banner-bottom {
    width: 100%;
    height: 88px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(30, 15, 55, 0.5);
}

.ads-banner-top a,
.ads-banner-bottom a {
    display: block;
    width: 100%;
    height: 100%;
}

.ads-banner-top img,
.ads-banner-bottom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ads-banner-top {
    margin-bottom: 30px;
}

.ads-banner-bottom {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    background: rgba(45, 27, 78, 0.7);
    border: 2px solid rgba(217, 70, 166, 0.4);
    border-radius: 8px;
    color: #cfc6dd;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    min-width: 40px;
    cursor: pointer;
}

.pagination-btn:hover:not(.active) {
    background: rgba(217, 70, 166, 0.2);
    border-color: #d946a6;
    color: #fff;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #d946a6, #ec4899);
    border-color: #d946a6;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== SEARCH PAGE ========== */
.search-header {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.2), rgba(217, 70, 166, 0.2));
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 10px;
    border-radius: 12px;
}

.search-header h1 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.search-header p {
    font-size: 16px;
    color: #cfc6dd;
}

/* 404 Error Style (Search No Results) */
.container-404 {
    text-align: center;
    padding: 64px 20px;
    max-width: 800px;
    margin: 40px auto;
}

.error-code {
    font-size: clamp(80px, 15vw, 150px);
    font-weight: 900;
    background: linear-gradient(135deg, #d946a6, #ec4899, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(217, 70, 166, 0.3);
}

.error-title {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
}

.error-description {
    font-size: 16px;
    color: #cfc6dd;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-description strong {
    color: #d946a6;
    font-weight: 600;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    background: rgba(45, 27, 78, 0.7);
    border: 2px solid rgba(217, 70, 166, 0.4);
    border-radius: 8px;
    color: #cfc6dd;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
}

.btn:hover {
    background: rgba(217, 70, 166, 0.2);
    border-color: #d946a6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(217, 70, 166, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #d946a6, #ec4899);
    border-color: #d946a6;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(217, 70, 166, 0.4);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: rgba(30, 15, 55, 0.4);
    border-radius: 12px;
    margin: 40px auto;
    max-width: 700px;
}

.no-results-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 10px;
}

.no-results p {
    color: #cfc6dd;
    font-size: 16px;
    margin-bottom: 30px;
}

.no-results-suggestions {
    text-align: left;
    max-width: 500px;
    margin: 20px auto 30px;
    padding: 20px;
    background: rgba(45, 27, 78, 0.3);
    border-radius: 8px;
    border-left: 4px solid #d946a6;
}

.no-results-suggestions h3 {
    font-size: 16px;
    color: #d946a6;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.no-results-suggestions li {
    padding: 8px 0;
    color: #cfc6dd;
    font-size: 14px;
    line-height: 1.6;
}

.no-results-suggestions li::before {
    content: "→ ";
    color: #d946a6;
    margin-right: 8px;
    font-weight: bold;
}

.back-home-btn {
    display: inline-block;
    padding: 12px 30px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
    background: linear-gradient(135deg, #d946a6, #ec4899);
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(217, 70, 166, 0.4);
}

/* ========== TONTON (VIDEO WATCH PAGE) ========== */
.watch-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.watch-layout {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 30px;
}

.main-video-section {
    width: 100%;
}

/* Rotating Banners */
.rotating-banners {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.banner-slot {
    position: relative;
    height: 100px;
    background: rgba(30, 15, 55, 0.5);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(217, 70, 166, 0.2);
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner-item.active {
    opacity: 1;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-item a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Video Player */
.video-player {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Video Info */
.video-info-section {
    background: rgba(30, 15, 55, 0.8);
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
}

.video-title-main {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    padding-right: 60px;
}

.video-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #cfc6dd;
}

.stat-icon {
    color: #d946a6;
}

.video-category-badge {
    display: inline-block;
    background: rgba(217, 70, 166, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    color: #d946ef;
    font-weight: 600;
    font-size: 13px;
}

.share-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d946a6, #ec4899);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(217, 70, 166, 0.3);
    z-index: 10;
}

.share-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(217, 70, 166, 0.5);
}

.video-description {
    color: #cfc6dd;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
}

/* Top/Bottom Ads */
.top-ad-banner,
.bottom-ad-banner {
    width: 100%;
    height: 90px;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(217, 70, 166, 0.2);
}

.top-ad-banner img,
.bottom-ad-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Related Videos */
.related-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d946a6;
}

.related-videos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Up Next Sidebar */
.up-next-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.up-next-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d946a6;
}

.up-next-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.up-next-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(30, 15, 55, 0.6);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(217, 70, 166, 0.2);
}

.up-next-item:hover {
    background: rgba(45, 27, 78, 0.8);
    border-color: #d946a6;
    transform: translateX(5px);
}

.up-next-thumb {
    width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.up-next-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.up-next-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.up-next-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.up-next-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.up-next-info-category {
    font-size: 12px;
    color: #d946ef;
}

/* ========== AGE GATE ========== */
.agegate-scrim {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agegate-scrim.active {
    display: flex;
}

.agegate-card {
    background: linear-gradient(135deg, rgba(30, 15, 55, 0.95), rgba(45, 27, 78, 0.95));
    border: 2px solid #d946a6;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(217, 70, 166, 0.3);
}

.agegate-logo {
    max-width: 200px;
    margin-bottom: 30px;
}

.agegate-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #d946a6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.agegate-text {
    font-size: 16px;
    color: #cfc6dd;
    line-height: 1.6;
    margin-bottom: 30px;
}

.agegate-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agegate-btn {
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid rgba(217, 70, 166, 0.4);
    display: block;
    cursor: pointer;
}

.agegate-btn.primary {
    background: linear-gradient(135deg, #d946a6, #ec4899);
    color: white;
    border-color: #d946a6;
}

.agegate-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(217, 70, 166, 0.5);
}

.agegate-btn:not(.primary) {
    background: rgba(45, 27, 78, 0.6);
    color: #cfc6dd;
}

.agegate-btn:not(.primary):hover {
    background: rgba(45, 27, 78, 0.8);
    color: #fff;
}

/* ========== POPUP MODAL ========== */
.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.popup-modal.active {
    display: flex;
    overflow: hidden;
}

.popup-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.popup-content img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #d946a6;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.popup-close:hover {
    background: #ff006e;
    transform: rotate(90deg);
}

/* ========== FOOTER ========== */
footer {
    background: linear-gradient(135deg, rgba(20, 10, 40, 0.9), rgba(10, 5, 30, 0.95));
    border-top: 1px solid rgba(217, 70, 239, 0.2);
    padding: 30px 20px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-article {
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.5), rgba(30, 15, 55, 0.5));
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(217, 70, 239, 0.2);
    margin-bottom: 30px;
}

.footer-article h4 {
    color: #d946a6;
    margin-bottom: 12px;
    font-size: 16px;
}

.footer-article p {
    color: #a89bb8;
    line-height: 1.7;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(217, 70, 239, 0.2);
    color: #6b5b7a;
    font-size: 13px;
}

/* ========== LOADING & ERROR ========== */
.loading {
    text-align: center;
    padding: 40px;
    color: #a89bb8;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(217, 70, 239, 0.3);
    border-top-color: #d946a6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid #d946a6;
    padding: 20px;
    border-radius: 8px;
    color: #ff77b8;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    
    .category-sidebar {
        position: static;
        order: -1;
        margin-bottom: 20px;
        margin-top: 0;
    }
    
    .videos-section {
        order: 0;
    }

    .watch-layout {
        grid-template-columns: 1fr;
    }

    .up-next-sidebar {
        position: static;
        margin-top: 30px;
        order: 2;
    }

    .related-videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rotating-banners {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-slot[data-slot="2"] {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .video-title {
        font-size: 12px;
    }

    .ads-banner {
        min-height: 80px;
        max-height: 120px;
    }

    .main-layout {
        padding: 0 15px;
    }

    .ads-banner-top,
    .ads-banner-bottom {
        height: 88px;
    }

    .category-list {
        gap: 6px;
    }

    .category-item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .video-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .up-next-thumb {
        width: 100px;
        height: 56px;
    }

    .share-button {
        width: 36px;
        height: 36px;
        font-size: 16px;
        top: 15px;
        right: 15px;
    }

    .video-title-main {
        font-size: 20px;
        padding-right: 50px;
    }

    .related-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .rotating-banners {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .banner-slot[data-slot="1"],
    .banner-slot[data-slot="2"] {
        display: none;
    }

    .banner-slot[data-slot="0"] {
        height: 100px;
    }

    .search-container {
        display: none;
    }

    .mobile-search-trigger {
        display: flex;
        margin-left: 10px;
    }

    .home-btn {
        height: 40px;
        padding: 0 16px;
        margin-right: 0;
        font-size: 14px;
    }

    .agegate-card {
        padding: 30px 20px;
    }

    .agegate-title {
        font-size: 24px;
    }

    .agegate-text {
        font-size: 14px;
    }

    .search-header {
        padding: 30px 15px;
    }

    .no-results {
        padding: 40px 15px;
    }

    .no-results h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero p {
        font-size: 14px;
    }

    .categories-bubble {
        gap: 8px;
    }

    .bubble-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    .category-list {
        gap: 5px;
    }

    .category-item {
        padding: 7px 12px;
        font-size: 11px;
    }

    .no-results-icon {
        font-size: 48px;
    }
}
    .p-fixed {
        position: fixed;
        left: 15px;
        bottom: 15px;
        z-index: 4;
    }
    .img-tele {
        width: 50px;
    }