/* =============================================
   HH3D Theme - Main Styles
   ============================================= */

/* =============================================
   Body & Layout
   ============================================= */
.hh3d-wp {
    min-height: 100vh;
}

.Body {
    min-height: calc(100vh - 130px);
}

.PageContent {
    display: flex;
    gap: 24px;
    max-width: var(--hh3d-max-width);
    margin: 0 auto;
    padding: 24px 20px;
}

.MainContent {
    flex: 1;
    min-width: 0;
}

/* =============================================
   Section
   ============================================= */
.Section {
    margin-bottom: 40px;
}

.SectionHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hh3d-border);
}

.SectionTitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--hh3d-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ViewMore {
    font-size: 13px;
    font-weight: 600;
    color: var(--hh3d-primary);
    padding: 4px 12px;
    border: 1px solid var(--hh3d-primary);
    border-radius: 20px;
    transition: all var(--hh3d-transition);
}

.ViewMore:hover {
    background: var(--hh3d-primary);
    color: #fff;
}

/* =============================================
   Movie Grid
   ============================================= */
.MovieGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.MovieCard {
    background: var(--hh3d-bg-card);
    border-radius: var(--hh3d-radius);
    overflow: hidden;
    transition: all var(--hh3d-transition);
    border: 1px solid transparent;
}

.MovieCard:hover {
    transform: translateY(-4px);
    box-shadow: var(--hh3d-shadow);
    border-color: var(--hh3d-primary);
}

.MovieThumb {
    position: relative;
    display: block;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--hh3d-border);
}

.MovieThumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.MovieCard:hover .MovieThumb img {
    transform: scale(1.05);
}

.MovieOverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--hh3d-transition);
}

.MovieThumb:hover .MovieOverlay {
    opacity: 1;
}

.MovieOverlay .Badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--hh3d-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
}

.MovieOverlay .Badge + .Badge {
    bottom: auto;
    top: 10px;
}

.MovieOverlay i {
    font-size: 42px;
    color: var(--hh3d-primary);
}

.MovieBadge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.MovieBadge .Year,
.MovieBadge .Qlty,
.MovieBadge span {
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-block;
}

.MovieInfo {
    padding: 10px 12px;
}

.MovieTitle {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.MovieTitle a {
    color: var(--hh3d-text);
}

.MovieTitle a:hover {
    color: var(--hh3d-primary);
}

.MovieSubtitle {
    font-size: 12px;
    color: var(--hh3d-text-muted);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.MovieMeta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--hh3d-text-muted);
    flex-wrap: wrap;
}

.MovieMeta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* =============================================
   Sidebar
   ============================================= */
.Sidebar {
    width: 300px;
    flex-shrink: 0;
}

.Widget {
    background: var(--hh3d-bg-card);
    border-radius: var(--hh3d-radius);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--hh3d-border);
}

.WidgetTitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--hh3d-text);
    text-transform: uppercase;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hh3d-border);
}

.MovieListSidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.MovieItem {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.MovieItem .MovieThumb {
    width: 80px;
    height: 110px;
    aspect-ratio: auto;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.MovieItem .MovieThumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.MovieItem .MovieInfo h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.MovieItem .MovieInfo h4 a {
    color: var(--hh3d-text);
}

.MovieItem .MovieInfo h4 a:hover {
    color: var(--hh3d-primary);
}

.MovieItem .MovieInfo span {
    font-size: 11px;
    color: var(--hh3d-text-muted);
}

/* =============================================
   Pagination
   ============================================= */
.Pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.PageBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--hh3d-bg-card);
    color: var(--hh3d-text-muted);
    border: 1px solid var(--hh3d-border);
    border-radius: var(--hh3d-radius);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--hh3d-transition);
}

.PageBtn:hover:not(.disabled):not(.active) {
    background: var(--hh3d-primary);
    color: #fff;
    border-color: var(--hh3d-primary);
}

.PageBtn.active {
    background: var(--hh3d-primary);
    color: #fff;
    border-color: var(--hh3d-primary);
}

.PageBtn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =============================================
   Footer
   ============================================= */
.Footer {
    background: var(--hh3d-header-bg);
    border-top: 1px solid var(--hh3d-border);
    padding: 24px 0;
    text-align: center;
}

.Footer p {
    color: var(--hh3d-text-muted);
    font-size: 14px;
}

/* =============================================
   Catalog / Empty State
   ============================================= */
.CatalogSection {
    min-height: 400px;
}

.EmptyState {
    text-align: center;
    padding: 60px 20px;
    color: var(--hh3d-text-muted);
}

.EmptyState p {
    font-size: 16px;
}

/* =============================================
   Slider Poster (Homepage Banner)
   ============================================= */
.SliderPoster {
    max-width: var(--hh3d-max-width);
    margin: 0 auto 24px;
    padding: 0 20px;
}

.SliderPosterInner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.SlideItem {
    border-radius: var(--hh3d-radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.SlideItem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.SlideItem:hover img {
    transform: scale(1.03);
}

.SlideOverlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.SlideOverlay h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.SlideOverlay p {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.SlideOverlay .Badge {
    display: inline-block;
    background: var(--hh3d-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-top: 6px;
}

/* =============================================
   Slider Thumb
   ============================================= */
.SliderThumb {
    max-width: var(--hh3d-max-width);
    margin: 0 auto 24px;
    padding: 0 20px;
}

.SliderThumbInner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--hh3d-primary) var(--hh3d-bg-card);
}

.SliderThumbInner::-webkit-scrollbar {
    height: 4px;
}

.SliderThumbInner::-webkit-scrollbar-thumb {
    background: var(--hh3d-primary);
    border-radius: 2px;
}

.ThumbItem {
    flex-shrink: 0;
    width: 130px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform var(--hh3d-transition);
}

.ThumbItem:hover {
    transform: translateY(-3px);
}

.ThumbImage {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: var(--hh3d-radius);
    overflow: hidden;
    background: var(--hh3d-bg-card);
}

.ThumbImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ThumbItem:hover .ThumbImage img {
    transform: scale(1.05);
}

.ThumbOverlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--hh3d-transition);
}

.ThumbItem:hover .ThumbOverlay {
    opacity: 1;
}

.ThumbOverlay i {
    font-size: 28px;
    color: var(--hh3d-primary);
}

.ThumbEpisode {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(248, 0, 0, 0.8);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 2px;
}

.ThumbTitle {
    font-size: 12px;
    font-weight: 600;
    color: var(--hh3d-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--hh3d-transition);
}

.ThumbItem:hover .ThumbTitle {
    color: var(--hh3d-primary);
}

/* =============================================
   Single Hero (Movie Detail Page)
   ============================================= */
.SingleHero {
    position: relative;
    padding: 80px 0 40px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
}

.SingleHeroBg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(12px) brightness(0.3);
    transform: scale(1.05);
}

.SingleHeroOverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--hh3d-bg) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,0.3) 100%);
}

.SingleHeroContent {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    max-width: var(--hh3d-max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.SinglePoster {
    flex-shrink: 0;
    width: 220px;
}

.SinglePoster img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: var(--hh3d-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.SingleInfo {
    flex: 1;
    min-width: 0;
}

.SingleTitle {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.1;
}

.SingleSubtitle {
    font-size: 16px;
    color: var(--hh3d-text-muted);
    margin-bottom: 16px;
}

.SingleMeta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.MetaItem {
    font-size: 14px;
    color: var(--hh3d-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.MetaItem i {
    color: var(--hh3d-primary);
    font-size: 12px;
}

.SingleGenres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.GenreTag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(229,9,20,0.15);
    color: var(--hh3d-primary);
    border: 1px solid rgba(229,9,20,0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: all var(--hh3d-transition);
}

.GenreTag:hover {
    background: var(--hh3d-primary);
    color: #fff;
    border-color: var(--hh3d-primary);
}

.SingleDescription {
    margin-bottom: 16px;
}

.SingleDescription p {
    font-size: 14px;
    color: var(--hh3d-text-muted);
    line-height: 1.7;
    max-width: 600px;
}

.SingleActors {
    font-size: 13px;
    color: var(--hh3d-text-muted);
    margin-bottom: 20px;
}

.SingleActors strong {
    color: var(--hh3d-text);
}

.SingleActors a {
    color: var(--hh3d-primary);
}

.SingleActors a:hover {
    text-decoration: underline;
}

.SingleActions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.BtnPrimary,
.BtnSecondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--hh3d-radius);
    font-size: 15px;
    font-weight: 700;
    transition: all var(--hh3d-transition);
    cursor: pointer;
    border: none;
}

.BtnPrimary {
    background: var(--hh3d-primary);
    color: #fff;
}

.BtnPrimary:hover {
    background: var(--hh3d-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(229,9,20,0.4);
}

.BtnSecondary {
    background: rgba(255,255,255,0.1);
    color: var(--hh3d-text);
    border: 1px solid var(--hh3d-border);
}

.BtnSecondary:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* =============================================
   Alert Box
   ============================================= */
.AlertBox {
    background: rgba(229,9,20,0.1);
    border: 1px solid rgba(229,9,20,0.3);
    border-radius: var(--hh3d-radius);
    padding: 14px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #fff;
}

.AlertBox strong {
    color: var(--hh3d-primary);
}

/* =============================================
   Episode Grid / Server
   ============================================= */
.EpisodeServer {
    margin-bottom: 20px;
}

.ServerName {
    font-size: 16px;
    font-weight: 700;
    color: var(--hh3d-text);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--hh3d-border);
}

.EpisodeGrid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}

.EpisodeItem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: var(--hh3d-bg-card);
    border: 1px solid var(--hh3d-border);
    border-radius: var(--hh3d-radius);
    color: var(--hh3d-text);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--hh3d-transition);
    cursor: pointer;
    text-decoration: none;
}

.EpisodeItem:hover {
    background: var(--hh3d-primary);
    color: #fff;
    border-color: var(--hh3d-primary);
}

.EpisodeItem.active {
    background: var(--hh3d-primary);
    color: #fff;
    border-color: var(--hh3d-primary);
}

/* =============================================
   Episode Player
   ============================================= */
.EpisodePlayer {
    background: #000;
    max-width: var(--hh3d-max-width);
    margin: 0 auto;
    padding: 0 20px;
    border-bottom: 2px solid var(--hh3d-border);
}

.VideoPlayer {
    position: relative;
    width: 100%;
}

.Video {
    position: relative;
    min-height: 250px;
    max-height: 720px;
    overflow: hidden;
    display: none;
    width: 100%;
}

.Video.on {
    display: block;
}

.Video:before {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.Video iframe,
.Video embed,
.Video video,
.Video object,
.Video #jwplayer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =============================================
   Single Movie Info (Episode page)
   ============================================= */
.SingleMovieInfo {
    padding: 20px 0;
    border-bottom: 1px solid var(--hh3d-border);
    margin-bottom: 24px;
}

.MovieInfoGrid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.MoviePosterSmall {
    width: 120px;
    flex-shrink: 0;
}

.MoviePosterSmall img {
    width: 100%;
    border-radius: var(--hh3d-radius);
}

.MovieDetails {
    flex: 1;
    min-width: 0;
}

.MovieDetails .SingleTitle {
    font-size: 24px;
}

.SingleDescShort {
    font-size: 13px;
    color: var(--hh3d-text-muted);
    margin: 8px 0;
    line-height: 1.6;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 1024px) {
    .Sidebar {
        display: none;
    }
    .PageContent {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .HeaderTop {
        flex-direction: column;
        gap: 10px;
    }
    .SearchForm {
        min-width: 100%;
    }
    .NavList {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .NavList::-webkit-scrollbar {
        display: none;
    }
    .MovieGrid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
    .MovieTitle {
        font-size: 13px;
    }
    .SingleHeroContent {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .SinglePoster {
        width: 160px;
    }
    .SingleTitle {
        font-size: 24px;
    }
    .SingleMeta {
        justify-content: center;
    }
    .SingleGenres {
        justify-content: center;
    }
    .SingleActions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .MovieGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}
