/* ========================================
   PHIMUS WATCH PAGE STYLES
   Modern PhimUs-style layout for watch page
   ======================================== */

/* Rating Display */
.movie-meta-phimus .rating-display {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border: 1px solid #ff6b6b;
    font-weight: 600;
    font-size: 13px;
    color: #ffffff !important;
}

/* Container and Layout */
.phimus-watch-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #0a0a0a;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.phimus-main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

/* Full Width Player Layout */
.phimus-player-full-width {
    grid-column: 1 / -1;
    margin-bottom: 30px;
}

/* Breadcrumbs */
.phimus-breadcrumbs {
    background: transparent;
    padding: 15px 0;
    margin-bottom: 0;
    border-bottom: 1px solid #333;
}

/* Movie Title Section */
.phimus-movie-title-section {
    padding: 20px 0;
    margin-bottom: 0;
}

.phimus-movie-title-section .phimus-player-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.phimus-breadcrumbs li {
    display: inline-block;
    margin-right: 10px;
    font-size: 14px;
}

.phimus-breadcrumbs li:not(:last-child)::after {
    content: ">";
    margin-left: 10px;
    color: #666;
}

.phimus-breadcrumbs li.active {
    color: #DD003F;
    font-weight: 600;
}

.phimus-breadcrumbs a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.phimus-breadcrumbs a:hover {
    color: #DD003F;
}

/* Left Content */
.phimus-left-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Player Section */
.phimus-player-section {
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* Player Controls Section */
.phimus-player-controls-section {
    padding: 15px 25px;
    background: #000;
    border-top: 1px solid #333;
}

.phimus-player-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 8px;
    border: 1px solid rgba(221, 0, 63, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* New Control Buttons */
.phimus-reaction-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%) !important;
    border-color: #FF9800 !important;
}

.phimus-reaction-btn:hover {
    background: linear-gradient(135deg, #F57C00 0%, #EF6C00 100%) !important;
    transform: translateY(-2px);
}

.phimus-reaction-btn.active {
    background: linear-gradient(135deg, #DD003F 0%, #C00035 100%) !important;
    border-color: #DD003F !important;
}

.phimus-auto-play-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%) !important;
    border-color: #2196F3 !important;
}

.phimus-auto-play-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%) !important;
    transform: translateY(-2px);
}

.phimus-auto-play-btn.active {
    background: linear-gradient(135deg, #DD003F 0%, #C00035 100%) !important;
    border-color: #DD003F !important;
}

.phimus-theater-btn {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%) !important;
    border-color: #9C27B0 !important;
}

.phimus-theater-btn:hover {
    background: linear-gradient(135deg, #7B1FA2 0%, #6A1B9A 100%) !important;
    transform: translateY(-2px);
}

.phimus-theater-btn.active {
    background: linear-gradient(135deg, #DD003F 0%, #C00035 100%) !important;
    border-color: #DD003F !important;
}

/* Emotion Chart Section */
.phimus-emotion-chart-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid rgba(221, 0, 63, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.phimus-emotion-description {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
}

.phimus-emotion-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phimus-emotion-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.phimus-emotion-item:hover {
    background: rgba(221, 0, 63, 0.1);
    transform: translateX(5px);
}

.phimus-emotion-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.phimus-emotion-bar {
    flex: 1;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.phimus-emotion-fill {
    height: 100%;
    background: linear-gradient(90deg, #DD003F 0%, #ff1744 100%);
    border-radius: 10px;
    transition: width 0.8s ease;
    position: relative;
}

.phimus-emotion-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.phimus-emotion-percentage {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    min-width: 35px;
    text-align: right;
}

/* Reaction Section */
.phimus-reaction-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 15px 0;
    border: 1px solid rgba(221, 0, 63, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: none; /* Hidden by default */
}

.phimus-reaction-icons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.phimus-reaction-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
}

.phimus-reaction-icon:hover {
    background: rgba(221, 0, 63, 0.1);
    border-color: rgba(221, 0, 63, 0.3);
    transform: translateY(-2px);
}

.phimus-reaction-icon.active {
    background: rgba(221, 0, 63, 0.2);
    border-color: #DD003F;
}

.phimus-reaction-emoji {
    font-size: 24px;
    line-height: 1;
}

.phimus-reaction-count {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    background: rgba(221, 0, 63, 0.8);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ========================================
   REACTION LIST - RIGHT SIDEBAR (THUNGPHIM STYLE)
   ======================================== */

.phimus-reaction-sidebar {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 60px;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

/* Reaction sidebar should follow player when scrolling */
.phimus-player-container {
    position: relative;
}

.phimus-reaction-sidebar.follow-player {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.phimus-reaction-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.phimus-reaction-sidebar-item:hover {
    background: rgba(221, 0, 63, 0.2);
    border-color: rgba(221, 0, 63, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(221, 0, 63, 0.3);
}

.phimus-reaction-sidebar-item.active {
    background: rgba(221, 0, 63, 0.3);
    border-color: #DD003F;
    transform: scale(1.05);
}

.phimus-reaction-sidebar-emoji {
    font-size: 20px;
    line-height: 1;
    display: block;
    margin-bottom: 2px;
}

.phimus-reaction-sidebar-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #DD003F;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile responsive for reaction sidebar */
@media (max-width: 768px) {
    .phimus-reaction-sidebar {
        right: 10px;
        padding: 10px 6px;
        gap: 6px;
        min-width: 50px;
    }
    
    .phimus-reaction-sidebar-item {
        width: 38px;
        height: 38px;
    }
    
    .phimus-reaction-sidebar-emoji {
        font-size: 18px;
    }
    
    .phimus-reaction-sidebar-count {
        font-size: 9px;
        padding: 1px 3px;
        min-width: 14px;
    }
}

/* ========================================
   BIỂU ĐỒ CẢM XÚC (THUNGPHIM STYLE)
   ======================================== */

.phimus-emotion-chart {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(221, 0, 63, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none; /* Hidden by default */
}

.phimus-emotion-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-align: center;
}

.phimus-emotion-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0 0 20px 0;
    text-align: center;
}

.phimus-emotion-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phimus-emotion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.phimus-emotion-emoji {
    font-size: 20px;
    min-width: 30px;
    text-align: center;
}

.phimus-emotion-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    min-width: 80px;
}

.phimus-emotion-progress {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.phimus-emotion-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.phimus-emotion-item[data-reaction="love"] .phimus-emotion-bar {
    background: linear-gradient(90deg, #e91e63, #f06292);
}

.phimus-emotion-item[data-reaction="sad"] .phimus-emotion-bar {
    background: linear-gradient(90deg, #2196f3, #64b5f6);
}

.phimus-emotion-item[data-reaction="wow"] .phimus-emotion-bar {
    background: linear-gradient(90deg, #ff9800, #ffb74d);
}

.phimus-emotion-item[data-reaction="poop"] .phimus-emotion-bar {
    background: linear-gradient(90deg, #8d6e63, #a1887f);
}

.phimus-emotion-item[data-reaction="laugh"] .phimus-emotion-bar {
    background: linear-gradient(90deg, #ffeb3b, #fff176);
}

.phimus-emotion-item[data-reaction="fire"] .phimus-emotion-bar {
    background: linear-gradient(90deg, #ff5722, #ff7043);
}

.phimus-emotion-percentage {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

.phimus-emotion-collapse {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: all 0.3s ease;
}

.phimus-emotion-collapse:hover {
    background: rgba(221, 0, 63, 0.2);
    border-color: rgba(221, 0, 63, 0.5);
}

.phimus-emotion-collapse i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.phimus-emotion-chart.collapsed .phimus-emotion-collapse i {
    transform: rotate(180deg);
}

/* ========================================
   THEATER MODE (THUNGPHIM STYLE) - TẮT ĐÈN
   ======================================== */

.theater-mode {
    background: #000000 !important;
}

.theater-mode .phimus-header,
.theater-mode .phimus-main-layout,
.theater-mode .phimus-right-content,
.theater-mode .phimus-emotion-chart {
    opacity: 0.1 !important;
    transition: opacity 0.3s ease;
}

.theater-mode .phimus-player-container {
    opacity: 1 !important;
    z-index: 9999 !important;
}

.theater-mode .phimus-player-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theater-mode .phimus-player-container:hover .phimus-player-controls {
    opacity: 1;
}

.theater-mode .phimus-player-container:hover .phimus-reaction-sidebar {
    opacity: 1;
}

/* Theater Mode - Keep theater button visible */
.theater-mode .phimus-control-btn[title="Rạp phim"] {
    opacity: 1 !important;
    z-index: 10000 !important;
}



.phimus-control-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    min-width: auto;
}

.phimus-control-btn:hover {
    background: rgba(221, 0, 63, 0.2);
    border-color: #DD003F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 0, 63, 0.3);
}

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

.phimus-toggle {
    background: #DD003F;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Video Container */
.phimus-video-container {
    position: relative;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 16/9;
    width: 100%;
}

.phimus-video-player {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
}

/* Server Controls */
.phimus-server-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #1a1a1a;
    border-top: 1px solid #333;
}

.phimus-server-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 16px;
    font-weight: 500;
}

.phimus-server-buttons {
    display: flex;
    gap: 10px;
}

.phimus-server-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
}

.phimus-server-btn:hover {
    background: linear-gradient(135deg, #DD003F 0%, #ff1744 100%);
    border-color: #DD003F;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(221, 0, 63, 0.4);
}

.phimus-server-btn.active {
    background: linear-gradient(135deg, #DD003F 0%, #ff1744 100%);
    border-color: #DD003F;
    box-shadow: 0 6px 20px rgba(221, 0, 63, 0.4);
}

/* Movie Info Section */
.phimus-movie-info {
    display: flex;
    gap: 25px;
    background: #111;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.phimus-movie-poster {
    flex-shrink: 0;
    width: 200px;
}

.phimus-movie-poster img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.phimus-movie-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phimus-movie-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.phimus-movie-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.phimus-movie-title a:hover {
    color: #DD003F;
}

.phimus-movie-subtitle {
    font-size: 18px;
    color: #ccc;
    margin: 0;
    font-weight: 400;
}

.phimus-movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 10px 0;
}

.phimus-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.phimus-meta-label {
    color: #999;
    font-weight: 500;
}

.phimus-meta-value {
    color: #ffffff;
    font-weight: 600;
}

.phimus-meta-link {
    color: #DD003F;
    text-decoration: none;
    transition: color 0.3s ease;
}

.phimus-meta-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* Tags Section */
.phimus-tags-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(221, 0, 63, 0.1);
}

.phimus-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.phimus-tag-link {
    background: #333;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #555;
}

.phimus-tag-link:hover {
    background: #DD003F;
    color: #fff;
    border-color: #DD003F;
    transform: translateY(-2px);
}

.phimus-movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.phimus-genre-tag {
    padding: 6px 12px;
    background: rgba(221, 0, 63, 0.2);
    border: 1px solid #DD003F;
    border-radius: 20px;
    color: #DD003F;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.phimus-genre-tag:hover {
    background: #DD003F;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 0, 63, 0.3);
}

.phimus-movie-description {
    color: #ccc;
    line-height: 1.6;
    font-size: 14px;
}

.phimus-more-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #DD003F 0%, #ff1744 100%);
    border-radius: 25px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.phimus-more-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(221, 0, 63, 0.4);
}

/* Episodes Section */
.phimus-episodes-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(221, 0, 63, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.phimus-episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.phimus-season-selector,
.phimus-language-selector {
    display: flex;
    gap: 10px;
}

.phimus-season-btn,
.phimus-lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phimus-season-btn:hover,
.phimus-lang-btn:hover {
    background: rgba(221, 0, 63, 0.2);
    border-color: #DD003F;
}

.phimus-season-btn.active,
.phimus-lang-btn.active {
    background: #DD003F;
    border-color: #DD003F;
}

.phimus-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 6px;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phimus-toggle-btn:hover {
    border-color: #DD003F;
    color: #DD003F;
}

/* Auto Episode Toggle Button */
.phimus-auto-episode-btn {
    background: #DD003F;
    color: #fff;
    border: 2px solid #DD003F;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.phimus-auto-episode-btn:hover {
    background: #b80033;
    border-color: #b80033;
}

.phimus-auto-episode-btn.disabled {
    background: #666;
    border-color: #666;
    color: #ccc;
}

.phimus-auto-episode-btn.disabled:hover {
    background: #666;
    border-color: #666;
}

/* Auto Play Control Button */
.phimus-auto-play-btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.phimus-auto-play-btn:hover {
    background: #444;
    border-color: #666;
}

.phimus-auto-play-btn.active {
    background: #DD003F;
    border-color: #DD003F;
    color: #fff;
}

.phimus-auto-play-btn.active:hover {
    background: #C00035;
}

.phimus-auto-play-icon {
    font-size: 16px;
}

.phimus-auto-play-text {
    font-weight: 500;
}

.phimus-auto-play-status {
    font-weight: 700;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Theater Mode Button */
.phimus-theater-btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.phimus-theater-btn:hover {
    background: #444;
    border-color: #666;
}

.phimus-theater-btn.active {
    background: #DD003F;
    border-color: #DD003F;
    color: #fff;
}

.phimus-theater-btn.active:hover {
    background: #C00035;
}

.phimus-theater-icon {
    font-size: 16px;
}

.phimus-theater-text {
    font-weight: 500;
}

/* Theater Mode Styles */
body.theater-mode {
    overflow: hidden;
}

.phimus-player-section.theater-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phimus-player-section.theater-mode .phimus-video-container {
    width: 95vw;
    height: 95vh;
    max-width: 1600px;
    max-height: 900px;
    position: relative;
}

.phimus-player-section.theater-mode .phimus-video-player {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.phimus-episodes-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px;
    padding: 10px 0;
}

@media (max-width: 1200px) {
    .phimus-episodes-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .phimus-episodes-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .phimus-episodes-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Episode Card States - ThungPhim Style */
.phimus-episodes-grid.collapsed .phimus-episode-card {
    width: 100%;
    height: 45px;
    padding: 0;
    text-align: center;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.phimus-episodes-grid.collapsed .phimus-episode-card:hover {
    background: linear-gradient(135deg, #DD003F 0%, #C00035 100%);
    border-color: #DD003F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(221, 0, 63, 0.3);
}

.phimus-episodes-grid.collapsed .phimus-episode-thumbnail {
    display: none;
}

.phimus-episodes-grid.collapsed .phimus-episode-info {
    display: block;
    margin: 0;
}

.phimus-episodes-grid.collapsed .phimus-episode-number {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.phimus-episodes-grid.collapsed .phimus-episode-status {
    display: none;
}

.phimus-episodes-grid.expanded {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.phimus-episodes-grid.expanded .phimus-episode-card {
    width: 100%;
    min-height: 200px;
    max-height: 220px;
    padding: 0;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    aspect-ratio: 1;
}

.phimus-episodes-grid.expanded .phimus-episode-thumbnail {
    display: block;
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.phimus-episodes-grid.expanded .phimus-episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.phimus-episodes-grid.expanded .phimus-episode-card:hover .phimus-episode-thumbnail img {
    transform: scale(1.05);
}

.phimus-episodes-grid.expanded .phimus-episode-status {
    display: block;
    position: absolute;
    top: 5px;
    left: 55px;
    background: #DD003F;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    height: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phimus-episodes-grid.expanded .phimus-episode-info {
    padding: 10px;
    text-align: center;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phimus-episodes-grid.expanded .phimus-episode-number {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.phimus-episode-card {
    display: block;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.phimus-episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    border-color: #DD003F;
}

.phimus-episode-card.current {
    border-color: #DD003F;
    box-shadow: 0 0 20px rgba(221, 0, 63, 0.5);
}

.phimus-episode-thumbnail {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.phimus-episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phimus-episode-status {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #DD003F;
    color: #ffffff;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 600;
    line-height: 1.2;
}

.phimus-episode-info {
    padding: 10px;
    text-align: center;
}

.phimus-episode-number {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

/* Comments Section */
.phimus-comments-section {
    background: #111;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.phimus-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.phimus-comments-tabs {
    display: flex;
    gap: 10px;
}

.phimus-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 8px;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phimus-tab-btn:hover {
    border-color: #DD003F;
    color: #DD003F;
}

.phimus-tab-btn.active {
    background: #DD003F;
    border-color: #DD003F;
    color: #ffffff;
}

.phimus-rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    font-size: 14px;
}

.phimus-rating-stars {
    display: flex;
    align-items: center;
    gap: 5px;
}

.phimus-rating-count {
    font-weight: 600;
    color: #DD003F;
}

.phimus-comments-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.phimus-comments-tab {
    display: none;
}

.phimus-comments-tab.active {
    display: block;
}

.phimus-rating-content {
    padding: 20px;
    text-align: center;
}

.phimus-current-rating h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 18px;
}

.phimus-rating-stars-display {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
}

.phimus-rating-stars-display .fa-star {
    font-size: 24px;
    color: #333;
    transition: color 0.3s ease;
}

.phimus-rating-stars-display .fa-star.filled {
    color: #DD003F;
}

/* Current Rating Interactive */
.phimus-current-rating .phimus-rating-stars-display {
    cursor: pointer;
}

.phimus-current-rating .phimus-rating-stars-display .fa-star {
    transition: color 0.3s ease, transform 0.2s ease;
}

.phimus-current-rating .phimus-rating-stars-display .fa-star:hover {
    transform: scale(1.1);
}

.phimus-current-rating .phimus-rating-stars-display:hover .fa-star {
    color: #DD003F;
}

.phimus-current-rating .phimus-rating-stars-display:hover .fa-star.filled {
    color: #ffd700;
}

.phimus-current-rating p {
    color: #ccc;
    font-size: 14px;
    margin: 0;
}

/* Interactive Rating */
.phimus-rate-movie {
    margin-top: 30px;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333;
    text-align: left;
}

.phimus-rate-movie h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 16px;
}

.phimus-star-rating {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.phimus-star-rating i {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phimus-star-rating i:hover,
.phimus-star-rating i.active {
    color: #ffd700;
    transform: scale(1.1);
}

.phimus-rating-feedback {
    margin-bottom: 15px;
}

.phimus-rating-feedback .phimus-rating-text {
    color: #ccc;
    font-size: 14px;
}

.phimus-submit-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #DD003F;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phimus-submit-rating:hover:not(:disabled) {
    background: #ff1744;
    transform: translateY(-2px);
}

.phimus-submit-rating:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* wpDiscuz Integration */
.wpd-comments-wrapper {
    background: transparent;
}

.wpd-comments-wrapper .wpd-comment {
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #333;
}

.wpd-comments-wrapper .wpd-comment-header {
    color: #ffffff;
}

.wpd-comments-wrapper .wpd-comment-text {
    color: #ccc;
}

.phimus-login-prompt {
    text-align: center;
    color: #999;
    font-size: 14px;
}

.phimus-comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.phimus-comment-input {
    position: relative;
}

.phimus-comment-input textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.phimus-comment-input textarea:focus {
    outline: none;
    border-color: #DD003F;
}

.phimus-char-count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: #666;
    font-size: 12px;
}

.phimus-comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phimus-spoiler-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
}

.phimus-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #DD003F 0%, #ff1744 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phimus-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(221, 0, 63, 0.4);
}

.phimus-comments-list {
    margin-top: 20px;
}

.phimus-empty-comments {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.phimus-empty-comments i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #333;
}

/* Right Sidebar */
.phimus-right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Actors Section Alignment */
.phimus-actors-section {
    /* Remove margin - let it flow naturally */
}

.phimus-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #ffffff;
    padding-bottom: 10px;
    border-bottom: 2px solid #DD003F;
}

/* Actors Section */
.phimus-actors-section {
    background: #111;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.phimus-actors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.phimus-actor-card {
    text-align: center;
}

.phimus-actor-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.phimus-actor-link:hover {
    transform: translateY(-5px);
}

.phimus-actor-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
    transition: border-color 0.3s ease;
}

.phimus-actor-link:hover .phimus-actor-avatar {
    border-color: #DD003F;
}

.phimus-actor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phimus-actor-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #DD003F 0%, #ff1744 100%);
    color: #ffffff;
    font-size: 24px;
}

.phimus-actor-name {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    transition: color 0.3s ease;
}

.phimus-actor-link:hover .phimus-actor-name {
    color: #DD003F;
}

/* Recommended Section */
.phimus-recommended-section {
    background: #111;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.phimus-recommended-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.phimus-recommended-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.phimus-recommended-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.phimus-recommended-card a {
    display: block;
    text-decoration: none;
}

.phimus-recommended-thumbnail {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.phimus-recommended-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.phimus-recommended-card:hover .phimus-recommended-thumbnail img {
    transform: scale(1.1);
}

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

.phimus-recommended-card:hover .phimus-recommended-overlay {
    opacity: 1;
}

.phimus-recommended-overlay i {
    font-size: 32px;
    color: #DD003F;
}

.phimus-recommended-title {
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.phimus-recommended-card:hover .phimus-recommended-title {
    color: #DD003F;
}

/* Episode label for recommended cards */
.phimus-episode-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(221, 0, 63, 0.9);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .phimus-main-layout {
        grid-template-columns: 1fr 250px;
        gap: 20px;
    }
    
    .phimus-player-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .phimus-player-controls {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .phimus-main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .phimus-watch-container {
        padding: 15px;
    }
    
    .phimus-movie-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .phimus-movie-poster {
        width: 150px;
        margin: 0 auto;
    }
    
    .phimus-episodes-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .phimus-episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .phimus-actors-grid,
    .phimus-recommended-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .phimus-player-controls {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .phimus-control-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .phimus-player-title {
        font-size: 18px;
    }
    
    .phimus-movie-title {
        font-size: 22px;
    }
    
    .phimus-actors-grid,
    .phimus-recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .phimus-episodes-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
