/* ==========================================================================
   RoPhim Theme - Dark Navy Movie Streaming Theme
   Matching rophim.gg demo exactly
   ========================================================================== */

/* ---------- CSS Variables (from demo summer.css) ---------- */
:root {
    --bg-color: #191b24;
    --text-base: #aaa;
    --primary-color: #ffd875;
    --primary-color-hover: #ffde8a;
    --primary-button-text: #191b24;
    --primary-text: #ffd875;
    --top-bg-default: #202331;
    --border-color: #ffffff10;
    --bg-2: #282b3a;
    --bg-3: #2f3346;
    --bg-4: #3e435c;
    --bg-5: #535d8e;
    --footer-bg: #0f111a;
    --shadow-large: 0 0 20px 20px rgba(0, 0, 0, 0.1);
    --h-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
    --padding-base: 40px;
    --rp-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--rp-font-family);
    background: var(--bg-color);
    color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: #fff; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-text); text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

/* Override for images inside positioned containers */
img.rp-movie-card__poster,
.rp-movie-card__poster-wrap img,
.rp-movie-card__hover-poster img,
.rp-thumb-slider__item img,
.rp-sidebar-numbered__poster img,
.rp-sidebar-thumb__poster img,
.rp-recommend__poster img,
.rp-single-backdrop__poster img,
.rp-actor-item__photo img,
.rp-hero__bg,
.rp-top10-item__poster {
    max-width: none;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; border: none; outline: none; background: none; color: inherit; }
button { cursor: pointer; }

/* ---------- Layout ---------- */
.rp-container {
    width: 100%;
    max-width: 1900px;
    margin: 0 auto;
    padding: 0 50px;
}

.rp-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rp-main {
    flex: 1;
    padding: 40px 0 60px;
}

.rp-content-wrap {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.rp-content-wrap--fullwidth { display: block; }
.rp-content-wrap--fullwidth .rp-sidebar { display: none; }

.rp-content {
    flex: 1;
    min-width: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 50px; /* fluid-gap from demo */
}

.rp-sidebar { width: 340px; flex-shrink: 0; }

/* ---------- Badges (matching demo pin-new style) ---------- */
.rp-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 0.33rem;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    vertical-align: middle;
    white-space: nowrap;
}

.rp-badge--hot { background: #e50914; color: #fff; }
.rp-badge--new { background: #2ca35d; color: #fff; margin-left: 4px; }
.rp-badge--quality { background: var(--primary-color); color: var(--bg-color); }
.rp-badge--lang { background: #2196f3; color: #fff; }
.rp-badge--ep { background: #e91e8c; color: #fff; }
.rp-badge--trailer { background: #e50914; color: #fff; }
.rp-badge--year { background: rgba(255, 255, 255, 0.15); color: var(--text-base); }

/* ---------- Buttons (matching demo) ---------- */
.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
}

.rp-btn--primary {
    background: #fecf59;
    background: linear-gradient(39deg, #fecf59, #fff1cc);
    color: var(--bg-color);
    box-shadow: 0 5px 10px 5px rgba(255, 218, 125, 0.1);
}
.rp-btn--primary:hover {
    box-shadow: 0 5px 10px 10px rgba(255, 218, 125, 0.15);
    color: var(--bg-color);
    transform: translateY(-1px);
}

.rp-btn--ghost {
    background: transparent;
    color: var(--text-base);
    border: 1px solid var(--border-color);
}
.rp-btn--ghost:hover { color: #fff; border-color: #fff5; }

.rp-btn--member {
    font-size: 1em;
    padding: 0.6rem 1.4rem;
    border-radius: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    opacity: 0.9;
    font-weight: 500;
    white-space: nowrap;
    min-width: 145px;
    text-align: center;
    background: transparent;
}
.rp-btn--member:hover { opacity: 1; color: #fff; }

.rp-btn--lg { padding: 14px 28px; font-size: 16px; }
.rp-btn--sm { padding: 6px 12px; font-size: 12px; }

/* ==========================================================================
   HEADER (matching demo header/fly/fixed)
   ========================================================================== */
.rp-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: #191b24;
    background: linear-gradient(0deg, rgba(25,27,36,0), #191b24);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.rp-header.rp-header--fly {
    background: transparent !important;
}

.rp-header.rp-header--fixed .rp-header__inner {
    height: 60px;
}

/* Spacer to prevent content from hiding behind fixed header */
.rp-header-spacer { height: 60px; }

.rp-header__inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 1.5rem;
    padding: 0 50px;
    max-width: 1900px;
    margin: 0 auto;
}

.rp-header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
    align-items: center;
    border-radius: 0.4rem;
    flex-shrink: 0;
}

.rp-header__hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Logo */
.rp-header__logo {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.rp-header__logo img { height: 46px; width: auto; }
.rp-header__logo-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Search (matching demo #search) */
.rp-header__search {
    width: 100%;
    max-width: 23rem;
    position: relative;
}

.rp-search-elements {
    position: relative;
}

.rp-search__icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    flex-shrink: 0;
    padding: 3px;
    font-size: 16px;
}

.rp-search__input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--bg-2);
    border: 1px solid var(--border-color);
    border-radius: 3rem;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.2s ease;
}
.rp-search__input::placeholder { color: var(--text-base); }
.rp-search__input:focus { border-color: #fff !important; }

/* Menu wrap (matching demo el-group) */
.rp-header__menu-wrap {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.rp-header__spacer { flex-grow: 1; }

/* Navigation (matching demo #main_menu) */
.rp-header__nav {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Menu items (matching demo .menu-item) */
.rp-menu-item {
    position: relative;
    padding: 0 0.7rem;
    font-size: 14px;
    white-space: nowrap;
}

.rp-menu-item__link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    padding: 8px 0;
    font-weight: 500;
    transition: color 0.2s;
}
.rp-menu-item__link:hover { color: var(--primary-text); }

.rp-menu-item__arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.rp-menu-item--sub:hover .rp-menu-item__arrow { transform: rotate(180deg); }

/* Dropdown (matching demo .menu-item-sub dropdown) */
.rp-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--top-bg-default);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--h-shadow);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 100;
}

.rp-menu-item--sub:hover .rp-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rp-menu-dropdown__item {
    display: block;
    padding: 0.3rem 1.2rem;
    line-height: 32px;
    font-size: 13px;
    color: var(--text-base);
    transition: all 0.15s ease;
}
.rp-menu-dropdown__item:hover {
    background: var(--bg-3);
    color: var(--primary-text);
}

/* User section (matching demo #main_user) */
.rp-header__user {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Mobile search icon (hidden by default, shown on <=1359px via responsive.css) */
.rp-header__mobile-search {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
}
.rp-header__mobile-search:hover { color: var(--primary-color); }

/* Mobile overlay */
.rp-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}
.rp-mobile-overlay.active { display: block; }

/* ==========================================================================
   HERO SLIDER (matching demo top-slide-wrap)
   ========================================================================== */
.rp-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: -60px; /* overlap fixed header */
    margin-bottom: -120px; /* demo: top-slide-main margin-bottom: -120px */
}

.rp-hero .swiper { width: 100%; }

.rp-hero__slide {
    position: relative;
    height: 860px;
    overflow: hidden;
}

.rp-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Gradient overlay (matching demo cover-fade + background-fade) */
.rp-hero__gradient {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 200px;
    z-index: 3;
    background: linear-gradient(0deg, #191b24, rgba(25, 27, 36, 0));
}

/* Side mask for hero */
.rp-hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(25, 27, 36, 0.6) 0%,
        transparent 30%,
        transparent 70%,
        rgba(25, 27, 36, 0.3) 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Hero content (matching demo .slide-content) */
.rp-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    max-width: 700px;
    width: 100%;
    padding: 100px 50px;
}

.rp-hero__title {
    font-size: 3em;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 1rem;
    text-shadow: 0 2px 1px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.rp-hero__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.rp-hero__meta-item {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.rp-hero__desc {
    font-size: 1em;
    color: #fff;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.rp-hero__actions {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Swiper pagination & nav */
.rp-hero .swiper-pagination { bottom: 40px !important; }
.rp-hero .swiper-pagination-bullet { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.4); opacity: 1; transition: all 0.3s ease; }
.rp-hero .swiper-pagination-bullet-active { background: var(--primary-color); width: 28px; border-radius: 5px; }
.rp-hero .swiper-button-prev,
.rp-hero .swiper-button-next {
    color: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.rp-hero .swiper-button-prev:hover,
.rp-hero .swiper-button-next:hover { background: rgba(0, 0, 0, 0.5); color: #fff; }
.rp-hero .swiper-button-prev:after,
.rp-hero .swiper-button-next:after { font-size: 18px; }

/* Thumb slider row below hero */
.rp-thumb-slider { background: var(--bg-color); padding: 12px 0; }
.rp-thumb-swiper .swiper-slide { width: 140px; flex-shrink: 0; }
.rp-thumb-slider__item {
    display: block;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 2/3;
}
.rp-thumb-slider__item img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.3s ease; }
.rp-thumb-slider__item:hover img { transform: scale(1.05); }
.rp-thumb-slider__overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 8px 8px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); }
.rp-thumb-slider__title { font-size: 11px; font-weight: 600; color: #fff; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rp-thumb-slider__ep { position: absolute; top: 6px; left: 6px; }

/* Category pills below hero */
.rp-category-pills { padding: 20px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rp-category-pills::-webkit-scrollbar { display: none; }
.rp-category-pills__list { display: flex; gap: 10px; padding: 0; flex-wrap: wrap; }
.rp-category-pills__item { flex-shrink: 0; }
.rp-category-pills__link {
    display: block;
    padding: 8px 20px;
    background: var(--bg-2);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-base);
    white-space: nowrap;
    transition: all 0.3s ease;
}
.rp-category-pills__link:hover,
.rp-category-pills__link--active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-color);
}

/* ==========================================================================
   SECTION HEADERS (matching demo .cards-row .row-header)
   ========================================================================== */
.rp-section {
    position: relative;
}

.rp-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    min-height: 32px;
}

/* Section title (matching demo .category-name) */
.rp-section__title {
    font-size: 2em;
    font-weight: 600;
    color: #fff;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* "Xem thêm" button (matching demo .cat-more) */
.rp-section__more {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 30px;
    width: 30px;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0; /* hide text, show only icon */
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow: hidden;
}
.rp-section__more i { font-size: 12px; }
.rp-section__more:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

/* ==========================================================================
   MOVIE CARD (matching demo sw-cover.single / sw-item)
   ========================================================================== */
.rp-movie-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.rp-movie-card__poster-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 150%;
    height: 0;
    overflow: hidden;
    background: var(--bg-3);
    border-radius: 0.5rem;
    display: block;
}

.rp-movie-card__poster-wrap a {
    display: block;
    position: absolute;
    inset: 0;
}

.rp-movie-card__poster {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top;
    transition: opacity 0.3s ease;
    max-width: none !important;
}

.rp-movie-card:hover .rp-movie-card__poster { opacity: 0.8; }

/* Badges - matching demo pin-new (bottom center) */
.rp-movie-card__badges {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    border-radius: 0.3rem 0.3rem 0 0;
    overflow: hidden;
    box-shadow: 0 0 5px 2px rgba(0,0,0,0.1);
}

.rp-movie-card__badges .rp-badge {
    flex: 1 1;
    gap: 0.2rem;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    font-size: 11px;
    font-weight: 400;
    border-radius: 0;
    margin: 0;
}

.rp-movie-card__badges .rp-badge--quality {
    background: #5e6070;
    color: #fff;
}

.rp-movie-card__badges .rp-badge--lang {
    background: #2ca35d;
    color: #fff;
}

.rp-movie-card__badges .rp-badge--trailer {
    background: #e50914;
    color: #fff;
}

.rp-movie-card__ep-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    border-radius: 0.3rem 0.3rem 0 0;
    overflow: hidden;
    box-shadow: 0 0 5px 2px rgba(0,0,0,0.1);
}

.rp-movie-card__ep-badge .rp-badge {
    padding: 0.2rem 0.5rem;
    font-size: 11px;
    border-radius: 0;
    margin: 0;
}

/* Card info (below poster) - matching demo .item-title */
.rp-movie-card__info {
    padding: 0;
}

.rp-movie-card__title {
    color: #fff;
    font-size: 1em;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
}
.rp-movie-card__title a { color: inherit; }
.rp-movie-card__title a:hover { color: var(--primary-text); }

.rp-movie-card__sub {
    font-size: 0.9em;
    color: var(--text-base);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
}

/* ---------- Hover Panel (popup on hover) ---------- */
.rp-movie-card__hover-panel {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: calc(100% + 60px);
    min-width: 280px;
    max-width: 320px;
    background: var(--top-bg-default);
    border-radius: 0.75rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--primary-color), 0 0 20px rgba(255, 216, 117, 0.1);
    z-index: 100;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.rp-movie-card:hover .rp-movie-card__hover-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    transition-delay: 0.3s;
}

.rp-movie-card:hover .rp-movie-card__info { opacity: 0; }

.rp-movie-card__hover-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    max-height: 280px;
}
.rp-movie-card__hover-poster img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.rp-movie-card__hover-body { padding: 14px; }
.rp-movie-card__hover-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 4px; line-height: 1.3; }
.rp-movie-card__hover-origin { font-size: 12px; color: var(--text-base); margin-bottom: 12px; }

.rp-movie-card__hover-actions { display: flex; gap: 6px; margin-bottom: 12px; }

.rp-hover-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.rp-hover-btn--primary { background: var(--primary-color); color: #000; }
.rp-hover-btn--primary:hover { background: #ffd740; color: #000; }
.rp-hover-btn--ghost { background: rgba(255,255,255,0.08); color: var(--text-base); border: 1px solid var(--border-color); }
.rp-hover-btn--ghost:hover { background: rgba(255,255,255,0.15); color: #fff; }

.rp-movie-card__hover-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12px; color: var(--text-base); }
.rp-hover-imdb { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid #f0d25c; border-radius: 0.33rem; font-size: 12px; font-weight: 700; color: #f0d25c; background: transparent; }
.rp-hover-imdb::before { content: ""; }
.rp-hover-meta-item { color: var(--text-base); font-size: 12px; }

.rp-movie-card__hover-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rp-hover-cat { font-size: 11px; padding: 2px 8px; background: rgba(255,255,255,0.06); border-radius: 3px; color: var(--text-base); }

/* ==========================================================================
   MOVIE GRID (matching demo .cards-grid-wrapper)
   ========================================================================== */
.rp-movie-grid {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 1.5rem;
    overflow: visible;
}

.rp-movie-grid--4col { grid-template-columns: repeat(4, 1fr) !important; }
.rp-movie-grid--6col { grid-template-columns: repeat(6, 1fr) !important; }

/* ==========================================================================
   SECTION CAROUSEL (matching demo .cards-slide-wrapper)
   ========================================================================== */
.rp-section-carousel { position: relative; }
.rp-section-carousel .swiper-slide { width: 200px; }
.rp-section-carousel .swiper-button-prev,
.rp-section-carousel .swiper-button-next {
    color: #fff;
    width: 40px;
    height: 40px;
    background: rgba(25, 27, 36, 0.85);
    border-radius: 50%;
    border: 1px solid var(--border-color);
    top: 40%;
    transition: all 0.3s ease;
}
.rp-section-carousel .swiper-button-prev:hover,
.rp-section-carousel .swiper-button-next:hover { background: var(--primary-color); color: var(--bg-color); border-color: var(--primary-color); }
.rp-section-carousel .swiper-button-prev:after,
.rp-section-carousel .swiper-button-next:after { font-size: 14px; }
.rp-section-carousel .swiper-button-prev { left: -8px; }
.rp-section-carousel .swiper-button-next { right: -8px; }

/* ==========================================================================
   SECTION GRID (grid layout section)
   ========================================================================== */
.rp-section-grid .rp-movie-grid {
    grid-template-columns: repeat(8, 1fr) !important;
}

/* ==========================================================================
   TOP 10 NUMBERED SECTION (matching demo .w-chart)
   ========================================================================== */
.rp-section-top10 { }

.rp-top10-grid {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 8px;
}
.rp-top10-grid::-webkit-scrollbar { display: none; }

.rp-top10-item {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    width: calc(100% / 6);
    min-width: 200px;
}

.rp-top10-item__number {
    font-size: 10rem;
    font-weight: 900;
    line-height: 0.8;
    color: transparent;
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin-right: -30px;
    user-select: none;
    font-family: 'Inter', sans-serif;
}

.rp-top10-item:nth-child(1) .rp-top10-item__number { -webkit-text-stroke: 3px var(--primary-color); color: rgba(255, 216, 117, 0.08); }
.rp-top10-item:nth-child(2) .rp-top10-item__number { -webkit-text-stroke: 3px #adb5bd; color: rgba(173, 181, 189, 0.08); }
.rp-top10-item:nth-child(3) .rp-top10-item__number { -webkit-text-stroke: 3px #cd7f32; color: rgba(205, 127, 50, 0.08); }

.rp-top10-item__poster-wrap {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    z-index: 3;
}

.rp-top10-item__poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: opacity 0.3s ease;
}
.rp-top10-item:hover .rp-top10-item__poster { opacity: 0.8; }

.rp-top10-item__badges { position: absolute; top: 6px; left: 6px; display: flex; flex-direction: column; gap: 3px; z-index: 4; }
.rp-top10-item__ep-badge { position: absolute; bottom: 6px; left: 6px; z-index: 4; }

.rp-top10-item__info { display: none; padding: 8px 4px 4px; }
.rp-top10-item__title { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.rp-top10-item__title a { color: inherit; }
.rp-top10-item__title a:hover { color: var(--primary-text); }
.rp-top10-item__sub { font-size: 11px; color: var(--text-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==========================================================================
   FEATURED CARD SECTION (matching demo big-slide-wrapper)
   ========================================================================== */
.rp-featured-card {
    position: relative;
    width: 100%;
    border-radius: 1.2rem;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    background-color: var(--bg-3);
}

.rp-featured-card__bg-wrap { position: absolute; inset: 0; }
.rp-featured-card__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.rp-featured-card__gradient {
    position: absolute;
    inset: 0;
    width: calc(100% - 500px);
    height: 100%;
    left: auto;
    right: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000);
    mask-image: linear-gradient(90deg, transparent, #000 30%, #000);
}

.rp-featured-card__content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    max-width: 600px;
}

.rp-featured-card__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rp-featured-card__meta-item { font-size: 13px; color: rgba(255,255,255,0.7); }

.rp-featured-card__title { font-size: 2em; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 6px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.rp-featured-card__sub { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 12px; }
.rp-featured-card__desc { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.6; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rp-featured-card__actions { display: flex; gap: 12px; align-items: center; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.rp-sidebar-block {
    background: var(--top-bg-default);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--h-shadow);
}

.rp-sidebar-block__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-sidebar-block__title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 18px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Sidebar numbered list */
.rp-sidebar-numbered__item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.rp-sidebar-numbered__item:last-child { border-bottom: none; }
.rp-sidebar-numbered__rank { flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; border-radius: 4px; color: var(--text-base); }
.rp-sidebar-numbered__item:nth-child(1) .rp-sidebar-numbered__rank { background: var(--primary-color); color: #000; }
.rp-sidebar-numbered__item:nth-child(2) .rp-sidebar-numbered__rank { background: #adb5bd; color: #000; }
.rp-sidebar-numbered__item:nth-child(3) .rp-sidebar-numbered__rank { background: #cd7f32; color: #000; }
.rp-sidebar-numbered__poster { flex-shrink: 0; width: 48px; height: 68px; border-radius: 4px; overflow: hidden; }
.rp-sidebar-numbered__poster img { width: 100%; height: 100%; object-fit: cover; }
.rp-sidebar-numbered__info { flex: 1; min-width: 0; }
.rp-sidebar-numbered__title { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.rp-sidebar-numbered__title a { color: inherit; }
.rp-sidebar-numbered__title a:hover { color: var(--primary-text); }
.rp-sidebar-numbered__meta { font-size: 11px; color: var(--text-base); display: flex; align-items: center; gap: 6px; }

/* Sidebar thumb list */
.rp-sidebar-thumb__item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.rp-sidebar-thumb__item:last-child { border-bottom: none; }
.rp-sidebar-thumb__poster { flex-shrink: 0; width: 60px; height: 85px; border-radius: 4px; overflow: hidden; }
.rp-sidebar-thumb__poster img { width: 100%; height: 100%; object-fit: cover; }
.rp-sidebar-thumb__info { flex: 1; min-width: 0; }
.rp-sidebar-thumb__title { font-size: 13px; font-weight: 600; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.rp-sidebar-thumb__title a { color: inherit; }
.rp-sidebar-thumb__title a:hover { color: var(--primary-text); }
.rp-sidebar-thumb__meta { font-size: 11px; color: var(--text-base); display: flex; flex-wrap: wrap; gap: 4px; }

/* ==========================================================================
   FILTER BAR
   ========================================================================== */
.rp-filter { background: var(--top-bg-default); border: 1px solid var(--border-color); border-radius: 0.75rem; padding: 16px 20px; margin-bottom: 24px; }
.rp-filter__toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--primary-color); cursor: pointer; margin-bottom: 12px; }
.rp-filter__toggle i { transition: transform 0.2s ease; }
.rp-filter__toggle.active i { transform: rotate(180deg); }
.rp-filter__body { display: none; }
.rp-filter__body.active { display: block; }
.rp-filter__row { margin-bottom: 12px; }
.rp-filter__row:last-child { margin-bottom: 0; }
.rp-filter__label { font-size: 12px; font-weight: 600; color: var(--text-base); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.rp-filter__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-filter__tag { display: inline-block; padding: 4px 12px; background: var(--bg-2); border: 1px solid var(--border-color); border-radius: 20px; font-size: 12px; color: var(--text-base); transition: all 0.3s ease; cursor: pointer; }
.rp-filter__tag:hover, .rp-filter__tag--active { background: var(--primary-color); border-color: var(--primary-color); color: var(--bg-color); }
.rp-filter__actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-color); }
.rp-filter__select { padding: 6px 12px; background: var(--bg-2); border: 1px solid var(--border-color); border-radius: 0.5rem; color: var(--text-base); font-size: 12px; cursor: pointer; }
.rp-filter__select:focus { border-color: var(--primary-color); }

/* ==========================================================================
   CATALOG PAGE
   ========================================================================== */
.rp-catalog__header { margin-bottom: 24px; }
.rp-catalog__title { font-size: 2.4em; font-weight: 600; line-height: 1.5; color: #fff; }
.rp-breadcrumb { display: flex; align-items: center; gap: 8px; padding: 12px 0; font-size: 13px; margin-bottom: 8px; }
.rp-breadcrumb__item { color: var(--text-base); }
.rp-breadcrumb__item a { color: var(--text-base); }
.rp-breadcrumb__item a:hover { color: var(--primary-text); }
.rp-breadcrumb__sep { color: var(--text-base); font-size: 10px; }

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.rp-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-color); }
.rp-pagination__item { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 0.5rem; font-size: 13px; font-weight: 500; color: var(--text-base); background: var(--top-bg-default); border: 1px solid var(--border-color); transition: all 0.3s ease; }
.rp-pagination__item:hover { background: var(--bg-2); border-color: var(--primary-color); color: var(--primary-color); }
.rp-pagination__item--active { background: var(--primary-color); border-color: var(--primary-color); color: var(--bg-color); font-weight: 700; }
.rp-pagination__item--active:hover { background: var(--primary-color-hover); color: var(--bg-color); }
.rp-pagination__item--disabled { opacity: 0.4; pointer-events: none; }
.rp-pagination__dots { color: var(--text-base); padding: 0 4px; }

/* ==========================================================================
   MOVIE DETAIL
   ========================================================================== */
.rp-single-backdrop { position: relative; width: 100%; min-height: 420px; overflow: hidden; }
.rp-single-backdrop__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: brightness(0.35) blur(2px); }
.rp-single-backdrop__gradient { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-color) 0%, rgba(25,27,36,0.85) 50%, rgba(25,27,36,0.5) 100%); }
.rp-single-backdrop__content { position: relative; z-index: 2; max-width: 1900px; margin: 0 auto; padding: 80px 20px 40px; display: flex; align-items: flex-end; gap: 30px; min-height: 420px; }
.rp-single-backdrop__poster { flex-shrink: 0; width: 200px; border-radius: 0.75rem; overflow: hidden; box-shadow: var(--h-shadow); }
.rp-single-backdrop__poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.rp-single-backdrop__info { flex: 1; min-width: 0; }
.rp-single-backdrop__title { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.rp-single-backdrop__origin { font-size: 16px; color: var(--text-base); margin-bottom: 12px; }
.rp-single-backdrop__badges { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.rp-single-backdrop__actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Tabs */
.rp-tabs { border-bottom: 2px solid var(--border-color); margin-bottom: 24px; display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.rp-tabs::-webkit-scrollbar { display: none; }
.rp-tabs__item { flex-shrink: 0; padding: 12px 20px; font-size: 14px; font-weight: 500; color: var(--text-base); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.2s ease; white-space: nowrap; }
.rp-tabs__item:hover { color: #fff; }
.rp-tabs__item--active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.rp-tab-content { display: none; }
.rp-tab-content--active { display: block; }

/* Movie info */
.rp-movie-info { margin-bottom: 24px; }
.rp-movie-info__row { display: flex; padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 13px; }
.rp-movie-info__label { flex-shrink: 0; width: 120px; color: var(--text-base); font-weight: 500; }
.rp-movie-info__value { flex: 1; color: var(--text-base); }
.rp-movie-info__value a { color: #2196f3; }
.rp-movie-info__value a:hover { color: var(--primary-text); }
.rp-movie-desc { font-size: 14px; line-height: 1.7; color: var(--text-base); margin-bottom: 24px; }

/* Episodes */
.rp-episode-list { margin-bottom: 24px; }
.rp-episode-list__server { margin-bottom: 16px; }
.rp-episode-list__server-name { font-size: 14px; font-weight: 600; color: var(--text-base); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.rp-episode-list__server-name i { color: var(--primary-color); }
.rp-episode-list__grid { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-episode-list__ep { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 36px; padding: 0 10px; background: var(--bg-2); border: 1px solid var(--border-color); border-radius: 4px; font-size: 12px; font-weight: 500; color: var(--text-base); transition: all 0.3s ease; }
.rp-episode-list__ep:hover { background: var(--bg-3); border-color: var(--primary-color); color: var(--primary-color); }
.rp-episode-list__ep--active { background: var(--primary-color); border-color: var(--primary-color); color: var(--bg-color); font-weight: 700; }

/* Rating */
.rp-rating { display: flex; align-items: center; gap: 16px; padding: 16px 0; margin-bottom: 24px; }
.rp-rating__label { font-size: 14px; font-weight: 600; color: #fff; }
.rp-rating__stars { display: flex; gap: 2px; }
.rp-rating__score { font-size: 14px; color: var(--primary-color); font-weight: 700; }

/* ==========================================================================
   WATCH PAGE
   ========================================================================== */
.rp-player-area { width: 100%; margin-bottom: 0; }
.rp-player-wrap { position: relative; width: 100%; padding-top: 56.25%; background: #000; border-radius: 0.75rem 0.75rem 0 0; overflow: hidden; }
.rp-player-wrap iframe, .rp-player-wrap video, .rp-player-wrap #rophim-player, .rp-player-wrap .jwplayer { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.rp-player-actions { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--top-bg-default); border: 1px solid var(--border-color); border-top: none; border-radius: 0 0 0.75rem 0.75rem; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   FOOTER (matching demo footer-elements)
   ========================================================================== */
.rp-footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 30px;
    text-align: center;
    margin-top: auto;
}

.rp-footer__badge-wrap { margin-bottom: 20px; }
.rp-footer__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #fecf59;
    background: linear-gradient(39deg, #fecf59, #fff1cc);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bg-color);
}
.rp-footer__badge-icon { font-size: 14px; }
.rp-footer__brand { margin-bottom: 20px; }
.rp-footer__logo-link { display: inline-block; margin-bottom: 4px; }
.rp-footer__logo-text { font-size: 28px; font-weight: 800; color: var(--primary-color); }
.rp-footer__tagline { font-size: 13px; color: var(--text-base); }

.rp-footer__social { margin-bottom: 20px; }
.rp-social-list { display: flex; justify-content: center; gap: 0.75rem; }
.rp-social-list__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-2);
    border: 1px solid var(--border-color);
    color: var(--text-base);
    font-size: 18px;
    transition: all 0.3s ease;
}
.rp-social-list__link:hover { background: var(--primary-color); border-color: var(--primary-color); color: var(--bg-color); transform: translateY(-3px); }

.rp-footer__links { margin-bottom: 20px; }
.rp-footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; }
.rp-footer-nav__link { font-size: 13px; color: var(--text-base); }
.rp-footer-nav__link:hover { color: var(--primary-text); }

.rp-footer__desc { max-width: 700px; margin: 0 auto 16px; }
.rp-footer__desc-text { font-size: 12px; color: var(--text-base); line-height: 1.6; }
.rp-footer__copyright { padding-top: 16px; border-top: 1px solid var(--border-color); }
.rp-footer__copyright-text { font-size: 12px; color: var(--text-base); }

/* ==========================================================================
   ADS
   ========================================================================== */
.rp-ads-header { padding: 8px 0; text-align: center; }
.rp-ads-catfish { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; text-align: center; background: rgba(25,27,36,0.95); border-top: 1px solid var(--border-color); padding: 4px; }

/* ==========================================================================
   MISC
   ========================================================================== */
.rp-loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-base); }
.rp-loading__spinner { width: 32px; height: 32px; border: 3px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: rp-spin 0.8s linear infinite; }
@keyframes rp-spin { to { transform: rotate(360deg); } }

.rp-empty { text-align: center; padding: 60px 20px; color: var(--text-base); }
.rp-empty__icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.rp-empty__text { font-size: 15px; }

/* Scroll to top */
.rp-scroll-top { position: fixed; bottom: 24px; right: 24px; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--primary-color); color: #000; border-radius: 50%; font-size: 16px; box-shadow: var(--shadow-large); opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 999; cursor: pointer; }
.rp-scroll-top.visible { opacity: 1; visibility: visible; }
.rp-scroll-top:hover { background: #ffd740; transform: translateY(-2px); color: #000; }

/* Selection & scrollbar */
::selection { background: var(--primary-color); color: var(--bg-color); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-base); }

img[loading="lazy"] { background: var(--bg-3); }

/* JWplayer skin override */
.jwplayer .jw-controls .jw-controlbar { background: linear-gradient(transparent, rgba(0,0,0,0.7)) !important; }
.jwplayer .jw-progress { background: var(--primary-color) !important; }

/* Comments */
.rp-comments { margin-bottom: 24px; }
.rp-comments__header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rp-comments__label { font-size: 14px; font-weight: 600; color: #fff; }
.rp-comments__body { background: var(--top-bg-default); border-radius: 0.75rem; padding: 20px; min-height: 200px; }

/* ==============================================
   INTEREST SECTION - "Bạn đang quan tâm gì?"
   ============================================== */
.rp-section-interest { margin-bottom: 30px; }
.rp-topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.rp-topic-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 120px;
    border-radius: 12px;
    overflow: hidden;
    padding: 16px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rp-topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.rp-topic-card__mask {
    position: absolute;
    inset: 0;
    opacity: 0.85;
    z-index: 0;
    transition: opacity 0.3s ease;
}
.rp-topic-card:hover .rp-topic-card__mask { opacity: 1; }
.rp-topic-card__intro {
    position: relative;
    z-index: 1;
}
.rp-topic-card__name {
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.rp-topic-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.8);
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}
.rp-topic-card:hover .rp-topic-card__btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ==============================================
   MOOD SECTION - "Tâm Trạng Của Bạn"
   ============================================== */
.rp-section-mood { margin-bottom: 30px; }
.rp-section-mood .rp-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.rp-mood-dice {
    cursor: pointer;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}
.rp-mood-dice:hover { transform: rotate(180deg); }
.rp-mood-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.rp-mood-card {
    position: relative;
    flex: 0 0 auto;
    width: 160px;
    min-height: 100px;
    border-radius: 12px;
    overflow: hidden;
    padding: 16px;
    background: var(--bg-2);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.rp-mood-card:hover,
.rp-mood-card--active {
    border-color: var(--primary-color);
    background: var(--bg-3);
    transform: translateY(-2px);
}
.rp-mood-card__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,216,117,0.1), transparent);
    z-index: 0;
}
.rp-mood-card__text {
    position: relative;
    z-index: 1;
    font-size: 1em;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}
.rp-mood-card__info { position: relative; z-index: 1; }
.rp-mood-card__sub {
    font-size: 0.75em;
    color: var(--text-base);
    margin: 0;
}

/* ==============================================
   COUNTRY CAROUSEL - Phim Hàn/Trung/US-UK
   ============================================== */
.rp-section-country { margin-bottom: 30px; }
.rp-country-header {
    margin-bottom: 16px;
}
.rp-country-header__intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rp-country-header__title {
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
}
.rp-country-header__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-base);
    font-size: 0.85em;
    text-decoration: none;
    transition: color 0.3s ease;
}
.rp-country-header__more:hover { color: var(--primary-color); }

/* Horizontal card for country sections */
.rp-carousel--hoz .swiper-slide { width: 290px; }
.rp-card-hoz {
    display: flex;
    flex-direction: column;
}
.rp-card-hoz__thumb {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.rp-card-hoz__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.rp-card-hoz:hover .rp-card-hoz__thumb img { transform: scale(1.05); }
.rp-card-hoz__pin {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    gap: 4px;
}
.rp-card-hoz__pin span {
    background: var(--primary-color);
    color: var(--bg-color);
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.rp-card-hoz__info { padding: 8px 0; }
.rp-card-hoz__title {
    font-size: 0.9em;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-card-hoz__title a { color: #fff; text-decoration: none; }
.rp-card-hoz__title a:hover { color: var(--primary-color); }
.rp-card-hoz__alias {
    font-size: 0.75em;
    color: var(--text-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==============================================
   COMMUNITY SECTION - IRT + Comments + Tabs
   ============================================== */
.rp-section-community { margin-bottom: 40px; }
.rp-comm-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 1rem;
    overflow: hidden;
}

/* IRT Table */
.rp-irt-table {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--top-bg-default);
    padding: 0;
}
.rp-irt-col {
    flex: 1 1;
    padding: 1.5rem 2rem;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.rp-irt-col:last-child { border-right: none; }
.rp-irt-col__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    font-size: 0.9em;
}
.rp-irt-col__icon { color: var(--primary-color); }
.rp-irt-col__list { display: flex; flex-direction: column; gap: 8px; }
.rp-irt-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.rp-irt-item:hover { background: var(--bg-2); }
.rp-irt-item__pos {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 20px;
}
.rp-irt-item__thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.rp-irt-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rp-irt-item__name {
    flex: 1;
    font-size: 0.8em;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-irt-item__badge {
    font-size: 0.7em;
    color: var(--primary-color);
    background: rgba(255,216,117,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* Top Discuss / Comments */
.rp-top-discuss {
    background: var(--top-bg-default);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rp-top-discuss__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    font-size: 0.9em;
}
.rp-top-discuss__icon { color: var(--primary-color); }
.rp-comment-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: var(--bg-2);
    text-decoration: none;
    height: 100%;
}
.rp-comment-card__poster {
    width: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}
.rp-comment-card__poster img { width: 100%; height: 80px; object-fit: cover; }
.rp-comment-card__body { flex: 1; min-width: 0; }
.rp-comment-card__movie {
    font-size: 0.85em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-comment-card__text {
    font-size: 0.8em;
    color: var(--text-base);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}
.rp-comment-card__time { font-size: 0.7em; color: #666; }
.rp-comment-swiper .swiper-slide { width: 300px; height: auto; }

/* Tabs Section */
.rp-tabs-section {
    background: var(--top-bg-default);
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.13);
    padding: 1.5rem 2rem;
    margin-top: 20px;
}
.rp-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    overflow-x: auto;
}
.rp-tabs-nav__btn {
    flex: 0 0 auto;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-base);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.rp-tabs-nav__btn:hover { color: #fff; }
.rp-tabs-nav__btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.rp-tabs-panel { display: none; }
.rp-tabs-panel.active { display: block; }

/* Chart List (used in tabs) */
.rp-chart-list { display: flex; flex-direction: column; gap: 6px; }
.rp-chart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.rp-chart-item:hover { background: var(--bg-2); }
.rp-chart-item__pos {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 24px;
}
.rp-chart-item__thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}
.rp-chart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rp-chart-item__name {
    flex: 1;
    font-size: 0.85em;
    font-weight: 500;
    color: #fff;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==============================================
   TOP 30 CHART CAROUSEL - w-chart style
   ============================================== */
.rp-section-top30 { margin-bottom: 30px; }
.rp-carousel--chart .swiper-slide { width: 280px; }
.rp-chart-card { display: flex; flex-direction: column; }
.rp-chart-card__thumb {
    position: relative;
    display: block;
    border-radius: 10px;
    overflow: hidden;
    padding-bottom: 150%;
}
.rp-chart-card__thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.rp-chart-card:hover .rp-chart-card__thumb img { transform: scale(1.05); }
.rp-chart-card__mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 60%, rgba(0,0,0,0.6));
    z-index: 1;
    pointer-events: none;
}
.rp-chart-card__pin {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.rp-chart-card__pin-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65em;
    font-weight: 700;
    background: var(--primary-color);
    color: var(--bg-color);
}
.rp-chart-card__pin-line--sub {
    background: rgba(255,255,255,0.9);
    color: #333;
}
.rp-chart-card__info {
    padding: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.rp-chart-card__number {
    font-size: 4.2em;
    font-weight: 800;
    font-style: italic;
    line-height: 1;
    background: linear-gradient(39deg, #fecf59, #fff1cc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
}
.rp-chart-card__title {
    font-size: 0.85em;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-chart-card__title a { color: #fff; text-decoration: none; }
.rp-chart-card__title a:hover { color: var(--primary-color); }
.rp-chart-card__alias {
    font-size: 0.75em;
    color: var(--text-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-chart-card__tag {
    display: inline-block;
    font-size: 0.65em;
    font-weight: 600;
    color: var(--text-base);
    background: var(--bg-3);
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    margin-top: 2px;
}

/* ==============================================
   UPDATED FEATURED SECTION - big-slide style
   ============================================== */
.rp-featured-card {
    position: relative;
    border-radius: 1.2rem;
    overflow: hidden;
    min-height: 500px;
}
.rp-featured-card__bg-wrap {
    position: absolute;
    inset: 0;
}
.rp-featured-card__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rp-featured-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(25,27,36,0.95) 0%, rgba(25,27,36,0.7) 40%, transparent 100%);
}
.rp-featured-card__content {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
}
.rp-featured-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.rp-featured-card__meta-item {
    font-size: 0.85em;
    color: var(--text-base);
    background: var(--bg-3);
    padding: 3px 10px;
    border-radius: 4px;
}
.rp-featured-card__title {
    font-size: 2em;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
}
.rp-featured-card__sub {
    font-size: 0.9em;
    color: var(--text-base);
    margin: 0 0 12px;
}
.rp-featured-card__desc {
    font-size: 0.85em;
    color: var(--text-base);
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rp-featured-card__actions { display: flex; gap: 10px; }
