/* --- GLOBAL CSS --- */
:root {
    --primary-color: #ff9000;
    --secondary-color: #222;
    --bg-color: #0f0f0f;
    --card-bg: #1a1a1a;
    --text-color: #fff;
    --text-muted: #aaa;
    --primary: #e50914;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
    height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input,
select {
    font-family: inherit;
}

/* --- AGE VERIFICATION MODAL --- */
#ageModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #1a1a1a;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(255, 144, 0, 0.2);
    animation: modalPop 0.4s ease-out;
}

@keyframes modalPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    font-size: 24px;
    margin-bottom: 15px;
}

.modal-content p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 15px;
    line-height: 1.4;
}

.modal-btn {
    background-color: var(--primary-color);
    color: #000;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    text-transform: uppercase;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.modal-btn:hover {
    background-color: #fff;
    transform: scale(1.02);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--secondary-color);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;
    max-width: 1600px;
    margin: 0 auto;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Sidebar Toggle (Visible on Mobile) */
.sidebar-toggle {
    background: var(--secondary-color);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    /* Visible by default, hidden on desktop via media query */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-right: 10px;
    flex-shrink: 0;
}

/* Search Bar (Header) */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
    display: block;
    /* Visible by default */
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 4px;
    color: #fff;
}

/* Nav Links */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    font-size: 14px;
    color: #ccc;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    font-size: 18px;
    background: transparent;
    color: #fff;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background-color: #161616;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 900;
    border-right: 1px solid #333;
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    margin: 20px 0 10px 0;
    color: var(--primary-color);
}

.sidebar-list {
    list-style: none;
    margin-bottom: 20px;
}

.sidebar-list li {
    margin-bottom: 12px;
}

.sidebar-list a {
    font-size: 15px;
    color: #ccc;
    display: block;
    padding: 8px 0;
}

.sidebar-list a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Mobile Search in Sidebar */
.sidebar-search {
    display: none;
    /* Hidden by default, shown on mobile */
    margin-bottom: 20px;
    position: relative;
}

.sidebar-search input {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
}

.sidebar-search-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    border-radius: 4px;
    margin-top: 10px;
}

/* Main Content Wrapper */
main {
    margin-top: var(--header-height);
    margin-left: 0;
    padding: 20px 15px;
    /* Mobile padding */
    transition: margin-left 0.3s;
    min-height: 80vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Views Logic */
.page-view {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.page-view.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Hero Section */
.hero-modern {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: url('https://i.ibb.co/ynXq2VRr/photo-2021-09-06-12-13-01.jpg') no-repeat center center/cover;
    margin-bottom: 30px;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(20, 20, 20, 0.7) 100%);
    z-index: 1;
}

.hero-content-modern {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-content-modern h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    /* Responsive base */
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content-modern p {
    font-size: 1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-search-modern {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-modern input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    outline: none;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-search-modern button {
    padding: 12px 25px;
    border-radius: 30px;
    border: none;
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.hero-search-modern button:hover {
    background-color: #ff1e2d;
}

/* Category Pills */
.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 30px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.category-pill {
    padding: 8px 16px;
    background-color: #222;
    border-radius: 20px;
    white-space: nowrap;
    font-size: 13px;
    border: 1px solid #333;
    color: #ccc;
}

.category-pill:hover,
.category-pill.active {
    background-color: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

/* Grids */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 50px;
}

.category-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background: #222;
}

.category-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.category-card:hover .category-thumbnail img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    transition: background 0.3s;
}

.category-card:hover .category-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.category-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
}

.category-count {
    font-size: 11px;
    color: #ddd;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.video-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
}

.video-hd {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary-color);
    color: #000;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 2px;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.watch-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
}

.watch-btn:hover {
    background: var(--primary-color);
    color: #000;
}

/* Live Page */
.page-header {
    margin-bottom: 30px;
    text-align: center;
}

.page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.watch-featured-btn {
    background-color: var(--primary);
    color: white;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, background 0.3s;
}

.live-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 60px;
}

.live-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    aspect-ratio: 3/4;
}

.live-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.live-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #d00;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.viewer-count {
    position: absolute;
    bottom: 80px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.model-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px 10px 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.model-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    margin-bottom: 4px;
}

.model-details {
    font-size: 12px;
    color: #ddd;
    margin-bottom: 8px;
}

.chat-btn {
    width: 100%;
    padding: 8px;
    background-color: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    display: block;
}

/* Player Styles */
.player-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.custom-player-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding-top: 56.25%;
}

.custom-player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon-big {
    font-size: 60px;
    color: #fff;
    opacity: 0.8;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 20;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.9;
}

.progress-container {
    flex-grow: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
    border-radius: 2px;
}

.progress-filled {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    border-radius: 2px;
    position: relative;
}

.volume-container {
    display: none;
}

.time-display {
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    min-width: 70px;
    text-align: center;
}

.video-info-section {
    margin-top: 20px;
    max-width: 1200px;
}

.video-player-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.video-player-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid #333;
    background: #222;
    color: #ccc;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: 0.3s;
}

.action-btn.primary {
    background: var(--primary-color);
    color: #000;
    border: none;
}

.related-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.related-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.related-info {
    padding: 10px;
}

.related-title {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Footer */
.footer-modern {
    background-color: #111;
    color: #aaa;
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid #222;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 40px;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 35px;
    height: 35px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background 0.3s;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #222;
    font-size: 13px;
}

/* --- MEDIA QUERIES --- */

/* Hide Mobile Toggle on Desktop */
@media (min-width: 992px) {
    .sidebar-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .logo {
        font-size: 24px;
    }

    .volume-container {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 80px;
        overflow: hidden;
        transition: width 0.3s;
    }

    .volume-slider {
        -webkit-appearance: none;
        width: 100%;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        outline: none;
    }

    .volume-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #fff;
        cursor: pointer;
    }

    .controls {
        opacity: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    }

    .custom-player-container:hover .controls {
        opacity: 1;
    }

    .play-icon-big {
        font-size: 80px;
    }

    .hero-content-modern h1 {
        font-size: 3rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .live-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Tablets (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .search-bar {
        display: none;
        /* Hide header search on Tablet */
    }

    .nav-links {
        display: none;
        /* Hide links, rely on sidebar */
    }

    .sidebar-toggle {
        display: flex;
    }
}

/* Mobile Specific (max 767px) */
@media (max-width: 767px) {
    body {
        background-color: var(--bg-color);
    }

    main {
        padding: 15px;
    }

    .sidebar-search {
        display: block;
        /* Show search inside sidebar on mobile */
    }

    /* Hide Header Search & Nav on Mobile */
    .search-bar {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .sidebar-toggle {
        display: flex;
        /* Always show on mobile */
    }

    .hero-modern {
        min-height: 350px;
        margin: 0 -15px 30px;
        width: calc(100% + 30px);
    }

    .hero-content-modern h1 {
        font-size: 1.5rem;
        padding: 0 10px;
    }

    .hero-content-modern p {
        display: none;
    }

    .hero-search-modern {
        flex-direction: column;
        padding: 0 20px;
    }

    .hero-search-modern button {
        width: 100%;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .live-grid {
        grid-template-columns: 1fr 1fr;
    }

    .action-buttons {
        justify-content: flex-start;
    }

    .video-player-title {
        font-size: 18px;
    }
}