* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E50914;
    --primary-hover: #F40612;
    --bg: #0A0A0A;
    --bg-secondary: #141414;
    --bg-tertiary: #1A1A1A;
    --text: #FFFFFF;
    --text-secondary: #B3B3B3;
    --text-muted: #808080;
    --border: rgba(255, 255, 255, 0.1);
    --hover: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(229, 9, 20, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 215, 0, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(229, 9, 20, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 215, 0, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: var(--bg); */
    z-index: -1;
    backdrop-filter: blur(0px);
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(229, 9, 20, 0.03) 0%, transparent 50%),
        linear-gradient(225deg, rgba(255, 215, 0, 0.02) 0%, transparent 50%),
        linear-gradient(45deg, rgba(229, 9, 20, 0.02) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Glassmorphism effect */
.glass {
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    gap: 8px;
}

.nav-item {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text);
    background: var(--hover);
}

.nav-item.active {
    color: var(--text);
    background: var(--hover);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-search:hover {
    color: var(--text);
    background: var(--hover);
}

.btn-login {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--primary-hover);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: white;
    transition: all 0.2s;
}

.user-avatar:hover {
    opacity: 0.9;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: none;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.user-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.user-email {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.vip-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.vip-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dropdown-menu {
    padding: 8px 0;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: var(--hover);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* Search Overlay */
.search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 999;
}

.search-overlay.active {
    display: block;
}

.search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-container input {
    flex: 1;
    background: rgba(20, 20, 20, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 16px;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-close-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    font-size: 20px;
    line-height: 1;
}

.search-results {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 16px;
    max-height: 400px;
    overflow-y: auto;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    margin-bottom: 48px;
}

.hero-card {
    position: relative;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    font-size: 16px;
    font-weight: 500;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-btn:hover {
    background: var(--primary-hover);
}

/* Section */
.section {
    margin-bottom: 48px;
}

.section-header {
    margin-bottom: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
}

/* Films Row */
.films-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.films-row::-webkit-scrollbar {
    height: 4px;
}

.films-row::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.film-card {
    flex: 0 0 200px;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.film-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.3);
}

.film-thumbnail {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background: var(--bg-tertiary);
}

.film-info {
    padding: 12px;
}

.film-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.film-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Films Grid */
.genres-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.genre-chip {
    padding: 6px 12px;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.genre-chip:hover {
    color: var(--text);
    border-color: var(--primary);
}

.genre-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* Film Detail */
.film-detail {
    padding: 24px 0;
}

.film-detail-header {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    align-items: start;
}

.film-poster-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.film-detail-thumbnail {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.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;
    border-radius: 12px;
}

.film-poster-wrapper:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: var(--primary);
    border: none;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.5);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(229, 9, 20, 0.7);
}

.film-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.film-detail-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.film-detail-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    flex-wrap: wrap;
}

.film-detail-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.film-detail-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 16px;
    max-height: 120px;
    overflow-y: auto;
}

.episodes-section {
    margin-top: 40px;
}

.episodes-section-compact {
    margin-top: 20px;
}

.episodes-title-compact {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.episodes-grid-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.episode-card {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.episode-card-compact {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.episode-card-compact:hover {
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.25);
}

.episode-card-compact.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.episode-card-compact.locked::before {
    content: '🔒';
    margin-right: 4px;
    font-size: 12px;
}

.episode-card-compact.active {
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.25);
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
}

.episode-number-compact {
    font-weight: 600;
    color: var(--text);
}

.episode-free-badge-compact {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #4caf50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.episode-card:hover {
    border-color: var(--primary);
    background: rgba(229, 9, 20, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.3);
}

.episode-card.locked {
    opacity: 0.6;
    position: relative;
    cursor: not-allowed;
}

.episode-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0.8;
}

.episode-free-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #4CAF50;
    text-transform: uppercase;
}

.episode-item-number .episode-free-badge {
    font-size: 9px;
    padding: 1px 6px;
}

.episode-number {
    font-weight: 600;
    margin-bottom: 4px;
}

.episode-title {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Video Player */
.video-player-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-player-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-controls-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    z-index: 10;
    display: flex;
    justify-content: flex-end;
}

.video-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-controls-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.video-controls-left,
.video-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
}

.video-time {
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.video-episodes-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-left: 1px solid var(--glass-border);
    z-index: 20;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    z-index: 1;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.episodes-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.episode-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.episode-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.episode-item.active {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--primary);
}

.episode-item.locked {
    opacity: 0.5;
}

.episode-item-number {
    font-weight: 600;
    margin-bottom: 4px;
}

.episode-item-title {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Comments Section */
.comments-section {
    margin-top: 48px;
}

.comments-container {
    padding: 24px;
    border-radius: 12px;
    margin-top: 20px;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
}

.comment-form {
    margin-bottom: 24px;
}

.comment-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-send {
    padding: 12px 24px;
    flex-shrink: 0;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-comments {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 4px;
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

/* History Page */
.history-container {
    max-width: 1400px;
    margin: 0 auto;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 0;
}

.history-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.history-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.history-card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 150%;
    overflow: hidden;
    background: var(--dark);
}

.history-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.history-card:hover .history-card-thumbnail img {
    transform: scale(1.1);
}

.history-card-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;
}

.history-card:hover .history-card-overlay {
    opacity: 1;
}

.history-card-play {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    padding-left: 4px;
}

.history-card-episode {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.history-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.history-card-time {
    color: var(--text-secondary);
}

.history-card-count {
    color: var(--primary);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    border-radius: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Profile Page */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.profile-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    top: 100px;
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.profile-vip-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.vip-expires {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-section {
    margin-bottom: 0;
}

.profile-section .section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.profile-info {
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.info-value {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.vip-badge-small {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.profile-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.action-card {
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.action-icon {
    font-size: 32px;
    line-height: 1;
}

.action-title {
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

@media (max-width: 768px) {
    .profile-wrapper {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        position: static;
    }
    
    .history-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 16px;
    }
    
    .profile-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Film Actions */
.film-actions {
    margin: 24px 0;
    display: flex;
    gap: 12px;
}

.btn-favorite {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-favorite:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

/* Responsive for film detail */
@media (max-width: 768px) {
    .film-detail-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .film-detail-thumbnail {
        max-width: 200px;
        margin: 0 auto;
    }
    
    .episodes-grid-compact {
        justify-content: center;
    }
    
    .episodes-title-compact {
        font-size: 14px;
        text-align: center;
    }
    
    .video-episodes-panel {
        width: 100%;
        max-width: 320px;
    }
    
    .video-controls-bottom {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .video-controls-left,
    .video-controls-right {
        width: 100%;
        justify-content: center;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--hover);
    color: var(--text);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body input {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 4px;
    color: var(--text);
    font-size: 14px;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.modal-footer {
    padding: 0 20px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-footer a {
    color: var(--primary);
    text-decoration: none;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }

    .header-left {
        gap: 16px;
    }

    .main-nav {
        display: none;
    }

    .logo {
        font-size: 20px;
    }

    .main-content {
        padding: 16px;
    }

    .hero-card {
        height: 400px;
        padding: 24px;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-description {
        font-size: 14px;
    }

    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .film-card {
        flex: 0 0 160px;
    }
}
