/* Smoother animations for top slider inner elements */
#top_slider .swiper-slide .cover-fade,
#top_slider .swiper-slide .cover-fade .cover-image,
#top_slider .swiper-slide .slide-content {
  transition-property: opacity, transform, filter;
  transition-duration: 600ms;
  transition-timing-function: ease-in-out;
}

/* Community board styles */
.community-board {
  background: #1f2333;
  border-radius: 12px;
  padding: 12px 12px 6px 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.community-board .row-header {
  padding: 8px 6px 2px 6px;
}
.community-board .cm-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
.community-board .child-box {
  background: transparent;
  border-radius: 10px;
  padding: 8px;
}
.community-board .child-header {
  font-size: 1.2rem;
  gap: .6rem;
}
.community-board .child-content {
  background: #171b28;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.community-board .cc-top .item + .item { margin-top: .75rem; }
.community-board .hl-tags .tag-classic { background: #2b2f42; }
.community-board .hl-tags .tag-classic span { color: #d7def0; }

/* Swiper sizing for comment carousel */
.community-board .cmSwiper .swiper-slide { width: auto; }
.community-board .cmSwiper { margin-left: 8px; margin-right: 8px; }

/* Community V2 (designer-provided) */
.community-v2 { max-width: 100%; margin: 0 auto; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; overflow: visible;}
.community-v2 .top-comments { position: relative; overflow: visible; border-radius: 0; border: 0; background: transparent; padding: 16px; backdrop-filter: blur(16px); margin-bottom: 0; border-bottom: 1px solid rgba(255,255,255,0.08);padding-left: 25px; }
.community-v2 .section-header { display:flex; align-items:center; gap:8px; margin-bottom:16px; }
.community-v2 .section-icon { font-size:18px; }
.community-v2 .section-icon.fa-solid { font-family: "Font Awesome 6 Free"; font-weight: 900; display:inline-block; width:18px; text-align:center;color: #FFD875; }
.community-v2 .section-icon.icon-top-comments::before { content: "\f5a2"; }
.community-v2 .section-icon.icon-hot::before { content: "\e131"; }
.community-v2 .section-icon.icon-favorites::before { content: "\e4fd"; }
.community-v2 .section-icon.icon-genres::before { content: "\f65e"; }
.community-v2 .section-icon.icon-recent::before { content: "\f0e7"; }
.community-v2 .section-title { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:rgba(255,255,255,.95); }
.community-v2 .cmv2-filter{ margin-left:auto; display:flex; gap:6px; position:relative; z-index:30; pointer-events:auto; }
.community-v2 .cmv2-filter .chip{ font-size:11px; padding:3px 8px; border-radius:9999px; border:1px solid rgba(255,255,255,.09); color:#cbd4e1; text-decoration:none; background:transparent; }
.community-v2 .cmv2-filter .chip:hover{ color:#fff; border-color:rgba(255,255,255,.14); }
.community-v2 .cmv2-filter .chip.active{ background:#2b3146; color:#fff; border-color:rgba(255,255,255,.16); }
.community-v2 .cmv2-subrange{ margin-left:8px; font-size:11px; color:#9aa3b2; padding:2px 8px; border:1px solid rgba(255,255,255,.08); border-radius:9999px; }
.community-v2 .scroll-wrapper { display:flex; gap:12px; overflow-x:auto; scroll-behavior:smooth; scrollbar-width:none; -ms-overflow-style:none; }
.community-v2 .scroll-wrapper::-webkit-scrollbar{ display:none; }
.community-v2 .comment-card { position:relative; flex:0 0 clamp(240px, 45vw, 281px); width:clamp(240px, 45vw, 320px); border-radius:10px; padding:16px; overflow:hidden; color:#fff; background-image:var(--comment-bg, none); background-size:cover; background-position:center; border:none; }
.community-v2 .comment-card::before {content: "";position: absolute;inset: 0;backdrop-filter: blur(7px);-webkit-backdrop-filter: blur(14px);background: linear-gradient(to top, rgb(25 27 36) 0%, rgba(0, 0, 0, 0.50) 35%, rgba(0, 0, 0, 0.25) 100%, rgba(0, 0, 0, 0.0) 100%);pointer-events: none;z-index: 0;}
.community-v2 .comment-card > * { position:relative; z-index:2; }
.community-v2 .comment-card:hover { transform: translateY(-2px); }
.community-v2 .review-top { display:grid; grid-template-columns: 1fr auto; column-gap:14px; align-items:flex-start; }
.community-v2 .review-left { display:flex; flex-direction:column; gap:6px; }
.community-v2 .review-avatar { width:46px; height:46px; border-radius:50%; overflow:hidden; border:2px solid rgba(255,255,255,.85); box-shadow:0 10px 18px rgba(0,0,0,.35); }
.community-v2 .review-avatar img,
.community-v2 .review-avatar .avatar-img { width:100%; height:100%; object-fit:cover; display:block; }
.community-v2 .review-main { margin-top:0; padding-left:2px; display:flex; flex-direction:column; gap:6px; }
.community-v2 .review-name { font-size:14px; font-weight:600; display:flex; align-items:center; gap:6px; }
.community-v2 .review-name .icon-vip { color:#ffd86a; }
.community-v2 .review-content { font-size:13px; color:#e2e2e2; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.community-v2 .review-content .comment-mention { background: rgba(255,216,146,.35); color:#fff3d1; padding:1px 6px; border-radius:999px; display:inline-block; margin-right:2px; }
.community-v2 .review-poster { width:70px; height:105px; border-radius:12px; overflow:hidden; box-shadow:0 14px 22px rgba(0,0,0,.7); border:1px solid rgba(255,255,255,.12); display:block; }
.community-v2 .review-poster img { width:100%; height:100%; object-fit:cover; display:block; transition: transform .35s ease; }
.community-v2 .comment-card:hover .review-poster img { transform: scale(1.06); }
.community-v2 .review-footer { margin-top:14px; display:flex; gap:18px; font-size:11px; color:#b8b8c2; }
.community-v2 .review-stat { display:flex; align-items:center; gap:4px; }
.community-v2 .review-stat svg { width:12px; height:12px; fill:currentColor; }
.community-v2 .review-avatar.placeholder { background:rgba(255,255,255,.1); border:2px dashed rgba(255,255,255,.25); }
.community-v2 .comment-card-empty .comment-media { display:none; }
.community-v2 .comment-card-empty::before { display:none; }
.community-v2 .comment-card-empty::after { background:rgba(12,14,22,.95); }
.community-v2 .avatar.placeholder { width:46px; height:46px; border-radius:50%; background:rgba(255,255,255,.08); border:1px dashed rgba(255,255,255,.1); }
.community-v2 .scroll-button { position:absolute; top:50%; transform: translateY(-50%); z-index:20; width:34px; height:34px; border-radius:50%; background: rgba(26,31,46,.85); color: rgba(255,255,255,.85); border:1px solid rgba(255,255,255,.35); display:flex; align-items:center; justify-content:center; backdrop-filter: blur(4px); transition: all .25s ease; box-shadow: 0 3px 12px rgba(0,0,0,.35); }
.community-v2 .scroll-button:hover { background: rgba(45,55,72,.9); color:#fff; transform: translateY(-50%) scale(1.1); }
.community-v2 .scroll-button.left { left:-17px; } .community-v2 .scroll-button.right{ right:-17px; }
.community-v2 .grid-container { display:grid; grid-template-columns: 1fr 1fr 0.8fr 1.4fr; gap:0; }
@media (max-width:1200px){ .community-v2 .grid-container { grid-template-columns: repeat(2,1fr);} }
@media (max-width:768px){
  .community-v2 .grid-container { grid-template-columns: 1fr; }
  .community-v2 .comment-card { padding:14px; }
  .community-v2 .review-top { grid-template-columns:auto 1fr; grid-template-areas:"avatar content" "poster poster"; row-gap:12px; }
  .community-v2 .review-avatar { justify-self:flex-start; }
  .community-v2 .review-main { grid-area:content; }
  .community-v2 .review-poster { grid-area:poster; width:100%; height:190px; margin-top:0; }
  .community-v2 .review-footer { justify-content:flex-start; }
  .community-v2 .top-comments { display:none; }
}
@media (max-width:640px){
  .community-v2 .comment-card { flex:0 0 88vw; width:88vw; padding:12px; border-radius:18px; }
  .community-v2 .review-top { grid-template-columns:auto 1fr; grid-template-areas:"avatar poster" "content content"; align-items:center; row-gap:10px; column-gap:12px; }
  .community-v2 .review-avatar { width:42px; height:42px; }
  .community-v2 .review-main { gap:4px; }
  .community-v2 .review-name { font-size:13px; }
  .community-v2 .review-content { font-size:12px; }
  .community-v2 .review-poster { width:130px; height:110px; justify-self:end; }
  .community-v2 .review-footer { flex-wrap:wrap; gap:12px; justify-content:flex-start; }
}
.community-v2 .section-box { height:100%; border-radius:0; border:0; background: transparent; padding:16px; backdrop-filter: blur(16px); }
.community-v2 .grid-container > .section-box:not(:last-child){ border-right: 1px solid rgba(255,255,255,0.08); }
.community-v2 .list-item { display:flex; align-items:center; gap:10px; border-radius:6px; background: linear-gradient(90deg, rgba(26,31,46,.3) 0%, rgba(15,20,25,.5) 100%); padding:10px; margin-bottom:8px; transition: all .3s ease; color: inherit; text-decoration:none; }
.community-v2 .list-item:hover { background: rgba(26,31,46,.6); transform: translateX(4px); }
.community-v2 .mini-thumb { width:26px; height:26px; border-radius:4px; object-fit:cover; border:1px solid rgba(255,255,255,.1); flex-shrink:0; }
.community-v2 .item-number { width:12px; font-size:10px; color: rgba(107,114,128,.8); }
.community-v2 .item-title { flex:1; font-size:11px; font-weight:500; color: rgba(209,213,219,.9); }
.community-v2 .trending-icon { width:12px; height:12px; color:#ffc832; transition: transform .3s ease; }
.community-v2 .list-item:hover .trending-icon { transform: scale(1.1); }
.community-v2 .item-icon.fa-solid { width: 14px; text-align:center; opacity: .9; font-family: "Font Awesome 6 Free"; font-weight: 900; color:#bedc33; }
/* Down-trend color */
.community-v2 .fa-arrow-trend-down { color:#dc328c; }
/* Custom FA codepoints per request */
.fa-arrow-trend-up::before { content: "\e098"; }
.fa-arrow-trend-down::before { content: "\e097"; }
.community-v2 .category-badge { flex:1; text-align:center; padding:2px 10px; border-radius:9999px; font-size:11px; font-weight:500; transition: all .3s ease;max-width:fit-content;}
.community-v2 .badge-pink{ background: rgba(236,72,153,.2); color: rgb(244,114,182);} 
.community-v2 .badge-blue{ background: rgba(59,130,246,.2); color: rgb(96,165,250);} 
.community-v2 .badge-purple{ background: rgba(168,85,247,.2); color: rgb(192,132,252);} 
.community-v2 .badge-orange{ background: rgba(249,115,22,.2); color: rgb(251,146,60);} 
.community-v2 .badge-amber{ background: rgba(245,158,11,.2); color: rgb(251,191,36);} 
.community-v2 .more-button { margin-top:14px; width:100%; text-align:center; font-size:11px; color: rgba(107,114,128,.8); background:none; border:none; cursor:pointer; transition: all .3s ease; }
.community-v2 .more-button:hover { color:#ffc832; transform: scale(1.05); }
.community-v2 .recent-comments-wrap { height:420px; overflow:hidden; position:relative; }
.community-v2 .recent-comments-inner { display:flex; flex-direction:column; gap:8px; transition: transform .6s ease; }
.community-v2 .recent-comment-item { display:flex; align-items:flex-start; gap:10px; border-radius:12px; background: rgba(16,18,28,.8); padding:10px; text-decoration:none; color:inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.community-v2 .small-avatar { width:36px; height:36px; border-radius:12px; border:1px solid rgba(255,255,255,.2); object-fit:cover; }
.community-v2 .recent-comment-header { display:flex; align-items:center; gap:6px; font-size:12px; color:#f8f9fd; margin-bottom:2px; }
.community-v2 .recent-comment-header .verified-badge { color:#ffd85c; }
.community-v2 .recent-comment-line { display:flex; align-items:center; gap:8px; font-size:11px; color:rgba(213,218,234,.95); flex-wrap:wrap; }
.community-v2 .recent-comment-divider { color:rgba(255,255,255,.25); }
.community-v2 .recent-comment-text { color:rgba(213,218,234,.95); }
.community-v2 .recent-movie-title { font-size:11px; color:#ffc969; }
.community-v2 .recent-comments-shadow { position:absolute; left:0; right:0; height:80px; pointer-events:none; }
.community-v2 .recent-comments-shadow.top { top:0;}
.community-v2 .recent-comments-shadow.bottom { bottom:0;}

/* Slightly soften tag and touch elements if they animate */
#top_slider .swiper-slide .hl-tags,
#top_slider .swiper-slide .touch {
  transition: opacity 500ms ease-in-out, transform 500ms ease-in-out;
}

/* Modal styles */
.rp-modal{ position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; align-items:center; justify-content:center; z-index:10000; }
.rp-modal.show{ display:flex; }
.rp-modal .rp-box{ width:380px; max-width:92vw; background:#1f2333; border:1px solid rgba(255,255,255,.12); border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.45); overflow:hidden; }
.rp-modal .rp-header{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid rgba(255,255,255,.08); }
.rp-modal .rp-modal-title{ font-weight:700; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:#e5e7eb; }
.rp-modal .rp-modal-close{ background:transparent; border:0; color:#9ca3af; font-size:20px; line-height:1; cursor:pointer; }
.rp-modal .rp-modal-close:hover{ color:#fff; }
.rp-modal .rp-modal-body{ padding:12px; max-height:72vh; overflow:auto; }
.rp-modal .list-item{ display:flex; align-items:center; gap:10px; border-radius:6px; background: linear-gradient(90deg, rgba(26,31,46,.3) 0%, rgba(15,20,25,.5) 100%); padding:10px; margin-bottom:10px; color:inherit; text-decoration:none; }
.rp-modal .list-item:hover{ background: rgba(26,31,46,.6); }
.rp-modal .mini-thumb{ width:26px !important; height:26px !important; border-radius:4px; object-fit:cover; border:1px solid rgba(255,255,255,.1); flex-shrink:0; }
.rp-modal .item-number{ width:16px; font-size:12px; color: rgba(107,114,128,.8); }
.rp-modal .item-title{ flex:1; font-size:12px; color: rgba(209,213,219,.9); }
.rp-modal .item-icon.fa-solid{ width:14px; text-align:center; opacity:.9; font-family:"Font Awesome 6 Free"; font-weight:900; color:#bedc33; }
.rp-modal .fa-arrow-trend-down{ color:#dc328c; }
.rp-modal .genre-item{ background: transparent; padding: 6px 4px; }
.rp-modal .genre-item .category-badge{ flex:1; text-align:left; display:block; padding:6px 10px; border-radius:999px;max-width:fit-content; }
.community-v2 .badge-maroon, .rp-modal .badge-maroon{ background: rgba(123,46,58,.25); color:#f4c2ca; }
.community-v2 .badge-blue, .rp-modal .badge-blue{ background: rgba(37,99,235,.25); color:#9cc3ff; }
.community-v2 .badge-purple, .rp-modal .badge-purple{ background: rgba(124,58,237,.25); color:#d7c6ff; }
.community-v2 .badge-olive, .rp-modal .badge-olive{ background: rgba(109,140,30,.30); color:#daf08a; }
.community-v2 .badge-brown, .rp-modal .badge-brown{ background: rgba(161,98,7,.35); color:#ffd08a; }
.community-v2 .badge-cyan, .rp-modal .badge-cyan{ background: rgba(6,182,212,.28); color:#b8f3ff; }
.community-v2 .badge-magenta, .rp-modal .badge-magenta{ background: rgba(217,70,239,.28); color:#ffd0ff; }
.community-v2 .badge-orange, .rp-modal .badge-orange{ background: rgba(234,88,12,.30); color:#ffd0a6; }
.community-v2 .badge-gray, .rp-modal .badge-gray{ background: rgba(107,114,128,.30); color:#e5e7eb; }
.community-v2 .badge-red, .rp-modal .badge-red{ background: rgba(239,68,68,.28); color:#ffc0c0; }
#cmv2-wg_community-2 .comment-footer {display: flex;justify-content: flex-start;}
@media (max-width: 640px) {#cmv2-wg_community-2 .comment-footer {flex-direction: unset; align-items: flex-start;}}
