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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #0f0f0f;
    color: #fff;
    min-height: 100vh;
    padding-bottom: 70px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    border-bottom: 1px solid #303030;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.logo img {
    height: 32px;
}

/* Search Box */
.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
    margin-left: auto;
}

.search-box input {
    flex: 1;
    height: 40px;
    background: #121212;
    border: 1px solid #303030;
    border-radius: 20px 0 0 20px;
    padding: 0 16px;
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-box input:focus {
    border-color: #3ea6ff;
}

.search-box button {
    width: 64px;
    height: 40px;
    background: #222;
    border: 1px solid #303030;
    border-left: none;
    border-radius: 0 20px 20px 0;
    color: #fff;
    cursor: pointer;
}

.search-box button:hover {
    background: #333;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    width: 240px;
    height: calc(100vh - 56px);
    background: #0f0f0f;
    padding: 12px 0;
    overflow-y: auto;
    z-index: 90;
    border-right: 1px solid #303030;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 24px;
    color: #f1f1f1;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: #272727;
}

.sidebar-item i {
    width: 24px;
    font-size: 18px;
}

.sidebar-divider {
    height: 1px;
    background: #303030;
    margin: 12px 0;
}

.sidebar-title {
    padding: 8px 24px;
    font-size: 14px;
    color: #aaa;
    font-weight: 500;
}

.sidebar-genres {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Main Content */
.main-content {
    margin-left: 240px;
    margin-top: 56px;
    padding: 24px;
    min-height: calc(100vh - 56px);
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.video-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: scale(1.02);
}

.thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.thumbnail .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.thumbnail .play-overlay img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: transparent;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.thumbnail .duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.thumbnail .quality {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ff0000;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

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

.video-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.video-meta {
    font-size: 12px;
    color: #aaa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding-bottom: 20px;
}

.page-btn {
    padding: 10px 20px;
    background: #272727;
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s;
}

.page-btn:hover {
    background: #3ea6ff;
}

.page-info {
    padding: 10px 20px;
    color: #aaa;
}

.no-results {
    text-align: center;
    padding: 60px;
    color: #aaa;
}

/* Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #181818;
    border-top: 1px solid #303030;
    z-index: 100;
}

.bottom-nav-items {
    display: flex;
    height: 100%;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-decoration: none;
    font-size: 10px;
    gap: 4px;
    transition: color 0.2s;
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: #fff;
}

.bottom-nav-item.active i {
    color: #ff0000;
}

/* Mobile Menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    background: #181818;
    border-radius: 20px 20px 0 0;
    z-index: 210;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #303030;
    position: sticky;
    top: 0;
    background: #181818;
}

.mobile-menu-header h3 {
    font-size: 16px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px;
}

.mobile-genre-item {
    padding: 12px 8px;
    background: #272727;
    border-radius: 8px;
    text-align: center;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.2s;
}

.mobile-genre-item:hover,
.mobile-genre-item.active {
    background: #ff0000;
}

/* View Page Styles */
.page-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    margin-top: 56px;
    padding: 24px;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.player-section {
    margin-bottom: 24px;
}

.player-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.player-tab {
    padding: 10px 20px;
    background: #272727;
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.player-tab:hover {
    background: #444;
}

.player-tab.active {
    background: #3ea6ff;
}

.movie-header {
    margin-bottom: 24px;
}

.movie-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.meta-tag {
    padding: 6px 14px;
    background: #272727;
    border-radius: 20px;
    font-size: 13px;
}

.meta-tag.quality {
    background: #ff0000;
}

.movie-details {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    background: #181818;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.movie-poster {
    width: 100%;
    border-radius: 8px;
    object-fit: contain;
    background: #000;
}

.movie-info h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #aaa;
}

.movie-info p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 14px;
}

.movie-info strong {
    color: #fff;
}

.genre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.genre-tag {
    padding: 5px 10px;
    background: #272727;
    border-radius: 12px;
    font-size: 11px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.genre-tag:hover {
    background: #3ea6ff;
}

.download-section {
    background: #181818;
    border-radius: 12px;
    padding: 20px;
}

.download-section h3 {
    font-size: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #272727;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #3ea6ff;
}

.download-btn i {
    font-size: 16px;
}

/* Sidebar (View Page) */
.view-sidebar {
    background: #181818;
    border-radius: 12px;
    padding: 16px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-title-view {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title-view i {
    color: #ff0000;
}

.sidebar-movie {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #303030;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.sidebar-movie:last-child {
    border-bottom: none;
}

.sidebar-movie:hover {
    background: #272727;
    margin: 0 -16px;
    padding: 10px 16px;
}

.sidebar-thumb {
    width: 120px;
    min-width: 120px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.sidebar-info h4 {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.sidebar-info span {
    font-size: 11px;
    color: #aaa;
}

.no-video {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.error-page {
    text-align: center;
    padding: 100px;
}

.error-page h2 {
    margin-bottom: 16px;
}

.error-page a {
    color: #3ea6ff;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #272727;
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.back-btn:hover {
    background: #333;
}

/* Responsive */
@media (max-width: 1200px) {
    .page-container {
        grid-template-columns: 1fr 300px;
    }

    .sidebar-thumb {
        width: 100px;
        min-width: 100px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 72px;
    }

    .sidebar-item span {
        display: none;
    }

    .sidebar-item {
        justify-content: center;
        padding: 12px;
    }

    .sidebar-title,
    .sidebar-genres {
        display: none;
    }

    .main-content {
        margin-left: 72px;
    }
}

@media (max-width: 992px) {
    .page-container {
        grid-template-columns: 1fr;
    }

    .view-sidebar {
        position: static;
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 80px;
    }

    .search-box {
        margin: 0 12px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }

    .page-container {
        padding: 16px;
    }

    .movie-details {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .movie-poster {
        max-width: 180px;
        margin: 0 auto;
    }

    .movie-title {
        font-size: 18px;
    }

    .download-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sidebar-thumb {
        width: 100px;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none;
    }

    .search-box input {
        font-size: 14px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .video-title {
        font-size: 12px;
    }

    .video-info {
        padding: 8px 0;
    }

    .mobile-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-tabs {
        justify-content: center;
    }

    .player-tab {
        padding: 8px 14px;
        font-size: 12px;
    }

    .download-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-movie {
        gap: 10px;
    }

    .sidebar-thumb {
        width: 80px;
        min-width: 80px;
    }

    .sidebar-info h4 {
        font-size: 12px;
    }
}