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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a25;
    --purple: #8B5CF6;
    --purple-dark: #7C3AED;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border: #2a2a35;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background-color: var(--bg-secondary);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
    padding: 0 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 12px;
    font-weight: 600;
    color: var(--purple);
    letter-spacing: 1px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--purple);
    color: var(--text-primary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-greeting {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.user-plan {
    font-size: 12px;
    color: var(--purple);
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 40px;
    position: relative;
    overflow: hidden;
}

/* Top Bar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.search {
    width: auto;
    min-width: 280px;
    height: 44px;
    border-radius: 24px;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search:hover {
    background-color: var(--border);
}

.search svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    min-width: 0;
}

.search input::placeholder {
    color: var(--text-secondary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: var(--border);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.time-value {
    font-size: 18px;
    font-weight: 600;
}

.time-date {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    position: relative;
}

.hero-content {
    max-width: 400px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-title .highlight {
    color: var(--purple);
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.btn-primary svg {
    width: 16px;
    height: 16px;
}

.hero-decoration {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 300px;
}

.chevron {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%, 40% 50%);
    opacity: 0.3;
}

/* Categories */
.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: auto;
}

.category-card {
    background-color: var(--bg-card);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:hover {
    background-color: var(--border);
    transform: translateY(-4px);
}

.category-card.active {
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
}

.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon svg {
    width: 40px;
    height: 40px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.category-card.active .category-desc {
    color: rgba(255, 255, 255, 0.8);
}

.category-indicator {
    width: 40px;
    height: 3px;
    background-color: var(--purple);
    margin: 0 auto;
    border-radius: 2px;
}

.category-card.active .category-indicator {
    background-color: var(--text-primary);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.premium-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-badge svg {
    width: 24px;
    height: 24px;
    color: var(--purple);
}

.premium-text {
    display: flex;
    flex-direction: column;
}

.premium-title {
    font-size: 14px;
    font-weight: 600;
}

.premium-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border-radius: 24px;
    border: none;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: var(--border);
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--purple);
    color: var(--text-primary);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.content-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.content-card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
}

.card-img-wrap {
    width: 100%;
    height: 270px;
    overflow: hidden;
    background-color: var(--bg-card);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Result count */
.result-count {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

.section-header .result-count {
    margin-bottom: 0;
    margin-left: auto;
}

/* Load more */
.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.btn-load-more {
    padding: 12px 40px;
    border-radius: 24px;
    border: 1px solid var(--purple);
    background: transparent;
    color: var(--purple);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background-color: var(--purple);
    color: var(--text-primary);
}

/* Player */
.player-section {
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
}

.player-section video {
    width: 100%;
    max-height: 560px;
    display: block;
    background: #000;
}

.content-info {
    padding: 16px;
}

.content-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--purple);
}

.rating svg {
    width: 14px;
    height: 14px;
}

/* Content Sections */
.content-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
}

.see-all {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--purple);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.see-all svg {
    width: 16px;
    height: 16px;
}

/* Detail Page */
.detail-page {
    padding: 0;
    overflow-y: auto;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 24px 40px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--purple);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.detail-hero {
    position: relative;
    height: 500px;
    margin: 0 40px;
    border-radius: 16px;
    overflow: hidden;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 15, 1) 0%, rgba(10, 10, 15, 0.4) 50%, rgba(10, 10, 15, 0.2) 100%);
}

.detail-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
}

.detail-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-meta .rating {
    font-size: 16px;
}

.detail-meta .rating svg {
    width: 18px;
    height: 18px;
}

.seasons-count {
    font-size: 14px;
    color: var(--purple);
    margin-bottom: 16px;
}

.description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 24px;
}

.action-buttons {
    display: flex;
    gap: 16px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: var(--border);
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
}

.btn-secondary.active {
    background-color: var(--purple);
    border-color: var(--purple);
    color: var(--text-primary);
}

/* Seasons Section */
.seasons-section {
    padding: 32px 40px;
}

.seasons-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.seasons-tabs {
    display: flex;
    gap: 12px;
}

.season-tab {
    min-width: 48px;
    height: 48px;
    padding: 0 18px;
    border-radius: 24px;
    border: 2px solid var(--border);
    background-color: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.season-tab:hover {
    border-color: var(--purple);
}

.season-tab.active {
    background-color: var(--purple);
    border-color: var(--purple);
}

/* Episodes Section */
.episodes-section {
    padding: 0 40px 40px;
}

.episodes-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.episode-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background-color: var(--bg-card);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.episode-card:hover {
    background-color: var(--border);
}

.episode-card img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
}

.episode-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background-color: var(--bg-card);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
}

.episode-item:hover {
    background-color: var(--border);
}

.episode-thumb {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.episode-thumb svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.episode-info {
    flex: 1;
}

.episode-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.episode-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.episode-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.episode-info .duration {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}

.episode-info p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.download-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.download-btn:hover {
    background-color: var(--purple);
    color: var(--text-primary);
}

.download-btn svg {
    width: 18px;
    height: 18px;
}

/* Movie Info Section */
.movie-info-section {
    padding: 32px 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-item {
    padding: 16px;
    background-color: var(--bg-card);
    border-radius: 8px;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
}

/* Related Section */
.related-section {
    padding: 32px 40px;
}

.related-section h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Settings Page */
.settings-container {
    max-width: 800px;
}

.settings-container h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
}

.settings-section {
    margin-bottom: 32px;
}

.settings-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 24px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar svg {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
}

.profile-details h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-details p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--purple);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.btn-outline {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background-color: var(--border);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.setting-select {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--bg-primary);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--purple);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background-color: var(--text-primary);
}

.storage-bar {
    width: 200px;
    height: 8px;
    background-color: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

.storage-progress {
    height: 100%;
    background-color: var(--purple);
    border-radius: 4px;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.btn-danger {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background-color: #ef4444;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Responsive */
@media (max-width: 1200px) {
    .categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 16px 8px;
    }
    
    .logo-text, .nav-item span, .user-details {
        display: none;
    }

    .search {
        min-width: 0;
        flex: 1;
    }
    
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .main {
        padding: 16px 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .detail-hero {
        height: 400px;
        margin: 0 20px;
    }
    
    .detail-content h1 {
        font-size: 32px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}