:root {
    --bg-color: #141414;
    --card-bg: #1f1f1f;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-color: #ff3b30;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.text-red {
    color: var(--accent-color);
}

/* ================= Header ================= */
.main-header {
    background-color: #000;
    padding: 12px 0;
    position: relative;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: none;
    align-items: center;
    gap: 30px;
}

.brand-logo {
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4facfe;
}

.brand-logo i {
    font-size: 1.5rem;
}

.desktop-nav {
    display: none;
    gap: 20px;
}

.desktop-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.desktop-nav a.active, .desktop-nav a:hover {
    color: var(--text-primary);
}

.mobile-header-tabs {
    display: flex;
    gap: 20px;
    font-size: 1.1rem;
    font-weight: bold;
}

.mobile-header-tabs a {
    color: var(--text-secondary);
    position: relative;
}

.mobile-header-tabs a.active {
    color: var(--accent-color);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-icon {
    font-size: 1.2rem;
}

.profile-icon.active {
    color: var(--accent-color);
}

/* ================= Language Switcher ================= */
.language-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.lang-btn i {
    font-size: 0.9rem;
    color: var(--accent-color);
}

.lang-text {
    font-weight: 500;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    min-width: 120px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #ccc;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.lang-option.active {
    background: rgba(255, 59, 48, 0.15);
    color: var(--accent-color);
}

.lang-option.active::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 8px;
    font-size: 0.75rem;
}

/* Hide default translate.js selector */
.translateSelectLanguage {
    display: none !important;
}

/* ================= Hero Carousel ================= */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-slider {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.hero-slider::-webkit-scrollbar {
    display: none;
}

.hero-slide {
    flex: 0 0 100%;
    min-width: 100%;
    position: relative;
    scroll-snap-align: start;
}

.hero-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.desktop-hero {
    display: none;
}

.mobile-hero {
    display: block;
    aspect-ratio: 4/5;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, var(--bg-color), transparent);
    pointer-events: none;
}

.hero-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    transition: 0.3s;
}

.dot.active {
    background-color: #fff;
    width: 16px;
    border-radius: 8px;
}

/* ================= Category Filter ================= */
.category-filter {
    padding: 15px 0;
    width: 100%;
    overflow: hidden;
}

.scroll-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex-shrink: 0;
    background: #333;
    padding: 6px 16px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    white-space: nowrap;
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
}

/* ================= Content Sections ================= */
.main-content {
    width: 100%;
}

.content-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.more-link {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ================= Media Grid (Mobile: 2 columns) ================= */
.media-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.media-card {
    width: 100%;
    overflow: hidden;
}

.poster-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    line-height: 1;
    font-style: italic;
}

.play-overlay {
    display: none;
}

.views-count {
    position: absolute;
    bottom: 6px;
    left: 6px;
    font-size: 0.65rem;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 2px 5px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-info {
    display: none;
}

.card-title-only {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-play-btn {
    display: none;
}

/* ================= List Layout for Section 1 (Mobile) ================= */
.list-on-mobile {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-on-mobile .media-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.list-on-mobile .poster-wrapper {
    width: 90px;
    min-width: 90px;
    flex-shrink: 0;
    aspect-ratio: 2/3;
    border-radius: 6px;
}

.list-on-mobile .badge-overlay {
    display: none;
}

.list-on-mobile .card-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding-top: 5px;
}

.list-on-mobile .card-info h3 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-on-mobile .card-info .desc {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.list-on-mobile .mobile-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    width: fit-content;
}

/* ================= Footer ================= */
.main-footer {
    background-color: #0a0a0a;
    padding: 30px 15px;
    margin-top: 30px;
    font-size: 0.75rem;
    color: #666;
    text-align: center;
    width: 100%;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.footer-extra {
    margin-bottom: 15px;
}

.copyright {
    margin-bottom: 15px;
}

.payment-icons {
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    gap: 12px;
    color: #fff;
    flex-wrap: wrap;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

/* ================= Auth Pages (Login/Register) ================= */
.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Use a background image that looks like movie posters */
    background: url('https://picsum.photos/1080/1920?blur=5') no-repeat center center;
    background-size: cover;
    filter: brightness(0.3); /* Darken the background */
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    width: 100%;
    z-index: 10;
}

.back-btn {
    font-size: 1.2rem;
    color: white;
}

.auth-link {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

.auth-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.auth-container h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #ccc;
    font-size: 0.95rem;
}

.form-group label.required::before {
    content: '*';
    color: var(--accent-color); /* Use accent red */
    margin-right: 5px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 40px;
}

.forgot-pass {
    color: #ccc;
    font-size: 0.9rem;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background-color: #8c2830; /* Darker red from screenshot */
    background: var(--accent-color); /* Or stick to our accent color */
    background-color: #9f2a34; /* Slightly darker than bright red to match login buttons usually */
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 30px;
}

.auth-btn:hover {
    opacity: 0.9;
}

.auth-footer-text {
    font-size: 0.8rem;
    color: #888;
    line-height: 1.5;
}

.auth-footer-text a {
    text-decoration: underline;
    color: #aaa;
}

/* ================= Player Page ================= */
.play-page {
    background-color: #000;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* Prevent body scroll */
    color: white;
}

.player-layout {
    display: flex;
    width: 100%; /* 填充满屏幕宽度 */
    max-width: none;
    height: 100vh; /* 填充满屏幕高度 */
    margin: 0;
    gap: 0;
    align-items: stretch;
    background: #000;
}

/* --- Video Column --- */
.video-column {
    flex: 1; /* 占据剩余空间 */
    height: 100%; 
    width: auto;
    background: #000;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: flex 0.3s ease; /* 平滑过渡 */
}

/* 视频区域全宽模式（当右侧折叠时） */
.video-column.full-width {
    flex: 1;
}

.video-content {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持比例居中显示，多余部分留黑 */
}

/* Toggle Info Button */
.toggle-info-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 60px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #888;
    cursor: pointer;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    transition: 0.3s;
}

.toggle-info-btn:hover {
    background: #333;
    color: white;
}

/* --- Info Column (Right Side) --- */
.info-column {
    width: 380px; /* 右侧固定宽度 */
    flex: none;
    height: 100%;
    background: #1f1f1f;
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow-y: auto; 
    border-left: 1px solid #333;
    transition: width 0.3s ease, padding 0.3s ease; /* 平滑过渡 */
}

/* 折叠状态 */
.info-column.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
    border: none;
}

/* Desktop Floating Nav */
.desktop-floating-nav {
    position: absolute; /* 相对于 player-layout */
    top: 20px;
    left: 20px;
    display: flex !important;
    flex-direction: row !important; /* 强制横向排列 */
    flex-wrap: nowrap !important; /* 禁止换行 */
    align-items: center;
    width: auto !important;
    gap: 15px; /* 间距 */
    z-index: 100; /* 最高层级 */
    pointer-events: auto;
}

.nav-circle {
    width: 40px;
    height: 40px;
    flex-shrink: 0 !important; /* 禁止被压缩 */
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
    transition: 0.3s;
}

.nav-circle:hover {
    background: rgba(255,255,255,0.4);
}

/* Center Play Button */
.center-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.3);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0; /* Hidden when playing */
    transition: 0.3s;
    pointer-events: none; /* Let clicks pass through to video container usually */
}

/* Controls Bottom */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 10;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-bottom: 15px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.play-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.time-display {
    font-size: 0.85rem;
    font-weight: 500;
}

.speed-control {
    font-size: 0.85rem;
    cursor: pointer;
}

.volume-btn, .fullscreen-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

/* Desktop Episode Nav (Floating Capsule) */
.desktop-ep-nav {
    position: absolute;
    bottom: 40px;
    right: 40px; /* Inside video area */
    display: flex;
    flex-direction: column;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 5px;
    z-index: 50;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-ep-nav button {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.2s;
    font-size: 1rem;
    border-radius: 50%;
}

.desktop-ep-nav button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Specifics (Hidden on Desktop) */
.mobile-player-header, 
.mobile-action-bar,
.mobile-ep-nav,
.video-subtitles, 
.drawer-header-mobile {
    display: none;
}

/* Info Scrollbar */
.info-column::-webkit-scrollbar {
    width: 6px;
}
.info-column::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.info-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    line-height: 1.2;
}

.sub-genre {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.stats-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-btn {
    flex: 1;
    background: #333;
    border: none;
    padding: 10px;
    border-radius: 6px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.stat-btn:hover {
    background: #444;
    color: white;
}

.synopsis {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 30px;
}

.ep-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #ccc;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer; /* Clickable */
}

.ep-header i {
    transition: transform 0.3s;
}

.ep-header.collapsed i {
    transform: rotate(180deg);
}

.ep-content-wrapper {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 2000px; /* Arbitrary large height */
    opacity: 1;
    overflow: hidden;
}

.ep-content-wrapper.collapsed {
    max-height: 0;
    opacity: 0;
}

.ep-header i {
    transition: transform 0.3s;
}

.ep-header.collapsed i {
    transform: rotate(180deg);
}

.ep-content-wrapper {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 2000px; /* Arbitrary large height */
    opacity: 1;
    overflow: hidden;
}

.ep-content-wrapper.collapsed {
    max-height: 0;
    opacity: 0;
}

.ep-count {
    font-size: 0.9rem;
    color: #666;
    margin-left: 5px;
}

.ep-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
}

.ep-tab {
    background: none;
    border: none;
    color: #666;
    padding-bottom: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
}

.ep-tab.active {
    color: var(--accent-color);
}

.ep-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

.ep-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.ep-item {
    aspect-ratio: 1;
    background: #2a2a2a;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
}

.ep-item:hover {
    background: #333;
}

.ep-item.active {
    background: rgba(255, 59, 48, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.ep-item.locked {
    color: #555;
    background: #1a1a1a;
}

.equalizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.equalizer span {
    width: 3px;
    background: var(--accent-color);
    animation: bounce 1s infinite;
}
.equalizer span:nth-child(2) { animation-delay: 0.2s; }
.equalizer span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 100% { height: 3px; }
    50% { height: 12px; }
}

/* ================= Browse Page ================= */
.browse-page-content {
    padding-top: 100px; /* Increase space for fixed header */
    min-height: 80vh;
}

.advanced-filter-section {
    background: linear-gradient(to bottom, #1a1a1a, #000);
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
}

.filter-tags-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tag-btn {
    background-color: transparent;
    color: #ccc;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}

.tag-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.tag-btn.active {
    background-color: var(--accent-color);
    color: white;
    font-weight: 500;
}

.tag-btn.expand-btn {
    margin-left: auto; /* Push to right */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

/* Browse Grid Wrapper */
.browse-grid-wrapper {
    padding: 20px 0;
}

/* ================= Profile Page ================= */
.profile-page-container {
    padding-top: 160px !important; /* Force increase padding significantly */
    min-height: 80vh;
}

.profile-layout {
    display: flex;
    gap: 30px;
}

.profile-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-card, .vip-card {
    background: #1f1f1f;
    border-radius: 16px;
    padding: 20px;
}

.user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-avatar {
    width: 70px;
    height: 70px;
    background: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: #666;
    margin-bottom: 10px;
}

.user-details h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.user-details .uid {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

.signin-btn-full {
    background: var(--accent-color);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
}

.vip-card {
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(221, 36, 118, 0.3);
}

.vip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.subscribe-btn {
    background: white;
    color: #DD2476;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.subscribe-btn:hover {
    transform: scale(1.02);
}

.profile-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #ccc;
    font-size: 1rem;
    border-radius: 8px;
    transition: 0.2s;
}

.menu-item:hover, .menu-item.active {
    background: #1f1f1f;
    color: var(--accent-color);
}

.profile-content {
    flex: 1;
    background: #0a0a0a;
    border-radius: 16px;
    min-height: 500px;
    padding: 20px;
}

.empty-state {
    text-align: center;
    color: #666;
}

.empty-state img {
    width: 100px;
    opacity: 0.3;
    margin-bottom: 15px;
}

/* ================= Subscribe Modal ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    background: linear-gradient(to bottom, #FF512F, #fff 25%); /* Vibrant top */
    padding-bottom: 30px;
    color: #333;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    z-index: 10;
}

.modal-header-img {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-img h2 {
    font-size: 2rem;
    color: #333;
    font-weight: 900;
}

.vip-badge-img {
    background: #ffd700;
    color: #8B8000;
    padding: 5px 15px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0 30px;
    margin-bottom: 30px;
}

.plan-card {
    background: white;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-2px);
}

.plan-card.active {
    border-color: #DD2476; /* Vibrant theme color */
    background: #fff0f5;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(221, 36, 118, 0.15);
}

.plan-tag {
    position: absolute;
    top: -10px;
    left: 10px;
    background: #FF512F;
    color: white;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.plan-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.per-day {
    font-size: 0.8rem;
    color: #888;
    font-weight: normal;
}

.plan-card h3 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.plan-card p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: auto;
}

.plan-note {
    margin-top: 10px;
    font-size: 0.7rem;
    color: #aaa;
}

.modal-footer {
    padding: 0 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.terms-check {
    font-size: 0.8rem;
    color: #666;
}

.pay-btn {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.card-pay {
    background: #ff3b30;
    color: white;
}

.paypal-pay {
    background: #ffc439;
    color: #003087;
}

/* ================= DESKTOP (768px+) ================= */
@media (min-width: 769px) {
    .container {
        padding: 0 20px;
    }

    /* Header Desktop */
    .main-header {
        background-color: transparent;
        position: absolute;
        top: 0;
        z-index: 100;
    }

    .logo-area {
        display: flex;
    }

    .brand-logo {
        display: flex;
    }

    .desktop-nav {
        display: flex;
    }

    .mobile-header-tabs {
        display: none;
    }

    /* Hero Desktop */
    .hero-section {
        height: 60vh;
        min-height: 450px;
    }

    .hero-slider {
        height: 100%;
        overflow-x: auto;
        overflow-y: hidden; /* Prevent vertical scrolling */
    }

    .hero-slide {
        height: 100%;
    }

    .hero-slide .desktop-hero {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .mobile-hero {
        display: none;
    }

    .hero-dots {
        bottom: 25px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }

    .dot.active {
        width: 20px;
    }

    /* Category Filter Desktop */
    .category-filter {
        padding: 20px 0;
        border-bottom: 1px solid #333;
        margin-bottom: 30px;
        background: var(--bg-color);
        position: sticky;
        top: 0;
        z-index: 90;
    }

    .scroll-wrapper {
        justify-content: center;
        gap: 30px;
        flex-wrap: wrap;
        overflow: visible;
    }

    .filter-btn {
        background: transparent;
        padding: 5px 0;
        border-radius: 0;
        color: var(--text-secondary);
        font-size: 0.95rem;
        position: relative;
    }

    .filter-btn.active {
        background: transparent;
        color: var(--accent-color);
        font-weight: bold;
    }

    .filter-btn.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--accent-color);
    }

    /* Content Sections Desktop */
    .content-section {
        margin-bottom: 50px;
    }

    .section-header h2 {
        font-size: 1.2rem;
    }

    .more-link {
        font-size: 0.85rem;
    }

    /* Grid Desktop: 6 columns */
    .media-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }

    .poster-wrapper {
        margin-bottom: 10px;
    }

    .media-card:hover .poster-wrapper img {
        transform: scale(1.05);
        transition: transform 0.3s;
    }

    .play-overlay {
        display: flex;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: var(--accent-color);
        color: white;
        padding: 8px 15px;
        border-radius: 4px;
        font-size: 0.8rem;
        opacity: 0;
        transition: opacity 0.3s;
        align-items: center;
        gap: 5px;
    }

    .media-card:hover .play-overlay {
        opacity: 1;
    }

    .badge-overlay {
        font-size: 3rem;
        bottom: 10px;
        left: 10px;
    }

    .card-title-only {
        font-size: 0.9rem;
    }

    /* Section 1 Desktop: Grid, not list */
    .list-on-mobile {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }

    .list-on-mobile .media-card {
        display: block;
    }

    .list-on-mobile .poster-wrapper {
        width: 100%;
        min-width: unset;
    }

    .list-on-mobile .badge-overlay {
        display: block;
    }

    .list-on-mobile .card-info {
        display: none;
    }

    #uncomfortable-truths .views-count {
        left: auto;
        right: 8px;
    }

    /* Footer Desktop */
    .main-footer {
        padding: 40px 0;
        margin-top: 50px;
        font-size: 0.8rem;
    }

    .footer-links {
        gap: 20px;
    }

    .payment-icons {
        font-size: 1.5rem;
        gap: 15px;
    }
}

/* ================= Mobile Player (Max 768px) ================= */
@media (max-width: 768px) {
    .play-page {
        height: 100%; /* Fallback */
        height: 100dvh; /* Dynamic viewport height */
    }

    .player-layout {
        display: block; /* Stack */
        position: relative;
        width: 100%; /* Reset from desktop */
        height: 100%; /* Reset from desktop */
        max-width: none;
        margin: 0;
        top: 0;
        transform: none;
        padding: 0;
        box-shadow: none;
    }

    /* Video Fullscreen */
    .video-column {
        height: 100%;
        width: 100%;
        min-width: unset;
        max-width: none;
        aspect-ratio: auto;
        border-radius: 0;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }

    .player-layout {
        padding: 0;
    }

    /* Hide Desktop Elements */
    .desktop-floating-nav, .desktop-ep-nav, .toggle-info-btn {
        display: none !important;
    }

    /* Hide Info Header on Mobile Drawer (User Request) */
    .info-column .info-header {
        display: none;
    }

    /* Mobile Drawer Close Button */
    .close-drawer {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }

    /* Hide Info Header on Mobile Drawer (User Request) */
    .info-column .info-header {
        display: none;
    }

    /* Mobile Drawer Close Button */
    .close-drawer {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }

    /* Show Mobile Elements */
    .mobile-player-header {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        padding: 40px 20px 20px 20px; /* Top padding for notch */
        z-index: 20;
        align-items: flex-start;
        background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    }

    .back-icon {
        color: white;
        font-size: 1.2rem;
        margin-right: 15px;
    }

    .mobile-title-info {
        display: flex;
        flex-direction: column;
    }
    
    .m-title {
        font-size: 1rem;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
    .m-ep {
        font-size: 0.8rem;
        color: #ddd;
    }

    /* Mobile Left Episode Nav */
    .mobile-ep-nav {
        display: flex;
        position: absolute;
        left: 10px;
        bottom: 120px;
        flex-direction: column;
        gap: 8px;
        z-index: 2147483647;
    }
    
    .mobile-nav-btn {
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        color: white;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        transition: all 0.2s;
    }
    
    .mobile-nav-btn:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }

    .mobile-action-bar {
        display: flex;
        position: absolute;
        right: 10px;
        bottom: 120px;
        flex-direction: column;
        gap: 20px;
        z-index: 2147483647;
    }

    .action-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
        cursor: pointer;
    }

    .action-item i {
        font-size: 1.8rem;
        color: white;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }

    .action-item span {
        font-size: 0.7rem;
        text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }

    .video-subtitles {
        display: block;
        position: absolute;
        bottom: 100px;
        left: 20px;
        font-size: 1rem;
        text-shadow: 0 1px 2px rgba(0,0,0,0.8);
        z-index: 15;
        max-width: 70%;
    }
    
    .center-play-btn {
        opacity: 0.6; /* Visible on mobile pause usually, but we keep logic same */
    }

    .video-controls {
        padding-bottom: 30px; /* Bottom safety */
    }

    /* Info Column -> Drawer */
    .info-column {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70vh;
        z-index: 50;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 0; /* Reset padding for drawer layout */
    }

    .info-column.active {
        transform: translateY(0);
    }

    .drawer-header-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #333;
    }

    .info-header {
        padding: 20px;
    }

    /* Profile Mobile */
    .profile-layout {
        flex-direction: column;
    }
    
    .profile-sidebar {
        width: 100%;
    }
    
    .profile-page-container {
        padding-top: 100px; /* Adjust for mobile header */
    }

    .modal-container {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .plan-grid {
        grid-template-columns: 1fr; /* Stack plans on mobile */
    }
}

/* ================= Header User State ================= */
.profile-icon.logged-in {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header-avatar-text {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

/* ================= Logout Button ================= */
.logout-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #aaa;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ================= VIP Card States ================= */
.vip-card.is-vip {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
}

.vip-card.is-vip .vip-header i {
    color: #fff;
}

.vip-expire-info {
    background: rgba(255,255,255,0.9) !important;
    color: #333 !important;
    font-weight: 600 !important;
    cursor: default !important;
}

/* ================= User Avatar in Card ================= */
.user-card .user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-card .user-avatar span {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ================= Skeleton Loading ================= */
.skeleton {
    background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
}

.skeleton-text {
    height: 16px;
    margin: 8px 0;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-btn {
    height: 40px;
    width: 100%;
    border-radius: 8px;
}

/* Drama Card Skeleton */
.skeleton-card {
    background: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-poster {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(90deg, #252525 25%, #333 50%, #252525 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-info {
    padding: 10px;
}

.skeleton-title {
    height: 14px;
    background: linear-gradient(90deg, #252525 25%, #333 50%, #252525 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-meta {
    height: 12px;
    width: 60%;
    background: linear-gradient(90deg, #252525 25%, #333 50%, #252525 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

/* Profile Content Grid */
.profile-content {
    flex: 1;
    background: #0a0a0a;
    border-radius: 16px;
    min-height: 500px;
    padding: 20px;
}

.profile-content.loading {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-content.has-content {
    display: block;
}

.drama-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.drama-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
}

.drama-card:hover {
    transform: translateY(-5px);
}

.drama-card .poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.drama-card .info {
    padding: 10px;
}

.drama-card .title {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drama-card .meta {
    font-size: 0.75rem;
    color: #888;
}

.drama-card .vip-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #f5af19, #f12711);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

.drama-card .poster-wrapper {
    position: relative;
}

/* History Progress Bar */
.drama-card .progress-bar-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0,0,0,0.5);
}

.drama-card .progress-bar-fill {
    height: 100%;
    background: var(--accent-color);
}

.drama-card .episode-info {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 3px;
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #222;
}

.content-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.content-header .action-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.content-header .action-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Empty State in Content */
.profile-content .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 400px;
}

@media (max-width: 768px) {
    /* Fix Mobile Header Layout */
    .header-container {
        flex-wrap: wrap;
    }
    
    .mobile-header-tabs {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        display: flex !important; /* Force show */
        padding-bottom: 5px;
    }

    .logo-area {
        flex: 1;
    }

    /* Fix Profile Page Mobile */
    .profile-layout {
        flex-direction: column !important;
        gap: 20px;
    }

    .profile-sidebar {
        width: 100% !important;
    }

    .profile-content {
        width: 100% !important;
        min-height: 300px;
    }

    .profile-page-container {
        padding-top: 20px !important; /* Reset padding for mobile flow */
        padding-left: 15px;
        padding-right: 15px;
        min-height: auto;
    }

    /* Force header to be relative on mobile to avoid overlap */
    .main-header {
        position: relative !important;
        background-color: #000;
    }
    
    /* Hide desktop nav definitely */
    .desktop-nav {
        display: none !important;
    }
}

