/*
Theme Name: Ultimate Master Theme V42
Theme URI: https://massive-hall.com
Author: Hieu Dang
Author URI: https://massive-hall.com
Description: Ultimate Asian Gay Porn Theme - Fully Synced with Ultimate Master Plugin V42. High performance, 128GB RAM optimized, custom ads zones.
Version: 42.0
Text Domain: uim-theme
*/

html { 
    font-family: sans-serif; 
    -webkit-text-size-adjust: 100%; 
    box-sizing: border-box; 
}
body { 
    margin: 0; 
    background-color: #181818 !important; 
    color: #ccc !important; 
    padding: 0; 
    line-height: 1.5;
}
a { 
    background-color: transparent; 
    text-decoration: none; 
    outline: 0; 
    color: #fff; 
}
a:hover { 
    color: #ff3366; 
    transition: all 200ms linear; 
}
*, *:after, *:before { 
    box-sizing: border-box; 
}

/* ========== WRAPPER ========== */
#page { 
    width: 100%; 
    margin: 0 auto; 
    background: #000; 
    padding: 0 10px; 
}
@media (min-width: 1025px) {
    #page { 
        width: 82% !important; 
        padding: 0 20px; 
    }
}

/* ========== HOME TITLE ========== */
.uim-home-title { 
    background: #282828; 
    color: #fff; 
    padding: .3em .6em; /* Nho lai */
    font-size: 0.85em; /* Nho lai 30% tu 1.1em */
    font-weight: 600; 
    border-left: 4px solid #ff3366; 
    margin: 10px 0; 
    clear: both; 
    text-transform: uppercase; 
}

/* ========== HOME GRID + CARDS ========== */
.uim-home-grid { 
    display: flex; 
    flex-wrap: wrap; 
    margin: 0 -2px; 
    clear: both; 
}
.uim-home-card { 
    width: 20%; 
    padding: 2px; 
    box-sizing: border-box; 
    position: relative; 
}
.uim-home-thumb { 
    position: relative; 
    width: 100%; 
    padding-top: 56.25%; 
    overflow: hidden; 
    background: #111; 
    border-radius: 3px;
}
.uim-home-thumb img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s ease; 
}
.uim-home-thumb:hover img { 
    transform: scale(1.05); 
}

/* ========== VIEWS & DURATION BADGES ========== */
span.views,
span.duration {
    position: absolute;
    bottom: 4px;
    padding: .1em .3em;
    font-size: .55em; /* Nho lai 30% tu 0.72em */
    font-weight: bold;
    border-radius: 2px;
    z-index: 20;
    color: #fff;
    background: rgba(0,0,0,.85);
    line-height: 1;
}

span.views {
    left: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

span.duration {
    right: 4px;
    background: rgba(0,0,0,.9);
    color: #ffcc00;
}

/* ========== CARD TITLE ========== */
.uim-home-card h3 { 
    background: #000; 
    height: 22px; /* Giam tu 26px */
    line-height: 22px; /* Giam tu 26px */
    padding: 0 5px; 
    margin: 0; 
    text-align: center; 
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis; 
}
.uim-home-card h3 a { 
    color: #fff; 
    font-size: .6em; /* Nho lai ~30% tu 0.75em */
    font-weight: 500; 
    display: block; 
}

/* ========== NAVIGATION ========== */
#site-navigation { 
    background: #000; 
    border-top: 1px solid #111; 
    border-bottom: 1px solid #333; 
    min-height: 40px; 
    width: 100%; 
    clear: both; 
    position: relative; 
    z-index: 999; 
}
.uim-menu-toggle { display: none; }
.uim-menu-icon { 
    display: none; 
    color: #fff; 
    padding: 10px 15px; 
    cursor: pointer; 
    font-weight: bold; 
    text-transform: uppercase; 
    background: #111; 
    width: 100%; 
}
#site-navigation ul.uim-main-menu { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-wrap: wrap; /* Rớt xuống 2-3 hàng ở Desktop */
    padding: 0; 
    margin: 0; 
    list-style: none; 
}
#site-navigation ul.uim-main-menu > li { 
    border-right: 1px solid #222; 
    border-bottom: 1px solid #222; 
}
#site-navigation ul.uim-main-menu > li > a { 
    padding: 0 8px; /* Thu hẹp padding để menu sát lại */
    line-height: 40px; 
    color: #fff; 
    font-size: .85em; 
    font-weight: 700; 
    text-transform: uppercase; 
    display: block; 
}
#site-navigation ul.uim-main-menu > li > a:hover { 
    color: #ff3366; 
}

@media (max-width: 767px) {
    .uim-menu-icon { display: block; }
    #site-navigation ul.uim-main-menu { 
        display: none; 
        flex-direction: column; 
        width: 100%; 
        background: #111; 
    }
    #site-navigation .uim-menu-toggle:checked ~ ul.uim-main-menu { 
        display: flex; 
    }
    #site-navigation ul.uim-main-menu > li { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid #222; 
    }
}

/* ========== LAYOUT & PAGINATION ========== */
.uim-split-layout { 
    display: flex; 
    gap: 20px; 
    margin-top: 15px; 
}
.uim-layout-content { flex: 1; min-width: 0; }
.uim-layout-sidebar { width: 300px; flex-shrink: 0; }

.uim-pagination { 
    margin: 30px 0; 
    display: flex; 
    justify-content: center; 
    gap: 6px; 
}
.uim-pagination .page-numbers { 
    background-color: #333; 
    padding: .5em 1em; 
    color: #fff; 
    font-size: .85em; 
    font-weight: bold; 
    border-radius: 2px; 
}
.uim-pagination .page-numbers.current { 
    background-color: #ff3366; 
}

/* ========== SINGLE PAGE META (FIXED) ========== */
.single-meta-flex { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    align-items: center; 
    padding: 12px;
    background: #111;
    border-radius: 6px;
    margin-bottom: 20px;
}
.meta-info-left { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    align-items: center; 
    flex: 1; 
}

/* ========== STYLE TAGS / CATEGORY MỚI ĐEN TRẮNG ========== */
.topic-link, .meta-item a {
    display: inline-block;
    background-color: #000;
    color: #fff !important;
    border: 1px solid #555;
    padding: 2px 6px;
    font-size: 0.65em; /* Nho lai 30% */
    border-radius: 3px;
    margin: 2px 4px 2px 0;
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.3s ease;
}
.topic-link:hover, .meta-item a:hover {
    background-color: #fff;
    color: #000 !important;
    border-color: #fff;
}
.meta-item strong {
    font-size: 0.75em;
    color: #aaa;
    margin-right: 5px;
    text-transform: uppercase;
}

/* ========== NÚT DOWNLOAD ========== */
.meta-download { flex: 1 1 100%; order: 2; }
.uim-btn-download { 
    display: block; 
    background: #ff3366; 
    color: #fff; 
    text-align: center; 
    padding: 8px 0; /* Giam padding 30% tu 12px */
    font-size: 0.8em; /* Giam font size 30% */
    font-weight: bold; 
    border-radius: 4px; 
    text-transform: uppercase;
}

/* ========== VIDEO PLAYER ========== */
.video-player { width: 100%; background: #000; margin-bottom: 10px; }
#uim-player-container { 
    width: 100%; 
    aspect-ratio: 16/9; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    background-size: cover; 
    background-position: center; 
}
.play-btn { background: rgba(255, 51, 102, 0.9); padding: 12px 25px; border-radius: 6px; color: #fff; font-weight: bold; }

.responsive-player { 
    position: relative; 
    aspect-ratio: 16/9; 
    width: 100%; 
    background: #000; 
    border-radius: 4px; 
    overflow: hidden; 
    margin-bottom: 15px;
}
.responsive-player iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
}

.uim-single-duration {
    display: inline-block;
    background: #222;
    color: #ffcc00;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 600;
}

/* ========== RELATED VIDEOS ========== */
.uim-related-bar {
    background: #222;
    padding: 8px 15px;
    margin: 25px 0 10px;
    border-left: 5px solid #ff3366;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.uim-related-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    margin-top: 15px; 
}
.uim-related-card { 
    width: calc(25% - 8px); 
    aspect-ratio: 16/9; 
    overflow: hidden; 
    border-radius: 4px; 
    background: #000; 
}
.uim-related-card img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

/* ========== RESPONSIVE GRID ========== */
@media (max-width: 1200px) { 
    .uim-home-card { width: 25%; } 
}
@media (max-width: 992px) { 
    .uim-home-card { width: 33.333%; } 
    .uim-split-layout { flex-direction: column; } 
    .uim-layout-sidebar { width: 100%; } 
}
@media (min-width: 768px) {
    .meta-download { flex: 1 1 auto; order: 0; margin: 0 15px; }
    .meta-info-left { flex-wrap: nowrap; }
}
@media (max-width: 768px) {
    .uim-home-card { width: 50% !important; }
    .uim-related-card { width: calc(50% - 5px); }
}

/* ========== ADS OVERLAY ĐÃ ĐƯỢC FIX LỖI THIẾU NGOẶC ========== */
#uim-ads-overlay { 
    display: none; 
    position: fixed; 
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
}
.uim-ad-content {
    position: relative;
}
.uim-ads-close {
    position: absolute;
    top: -25px;
    right: 0;
    background: #ff3366;
    color: #fff;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    z-index: 9999999;
}
.uim-ad-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 15px auto !important;
    text-align: center !important;
}
.uim-ad-wrapper > * {
    width: 100% !important;
    max-width: 100% !important;
}

/* ========== SINGLE PAGE IMPROVEMENT ========== */
.single-page .single-meta-flex {
    flex-wrap: wrap;
    gap: 12px;
}

.single-page .meta-item {
    flex: 1;
    min-width: 140px;
}

@media (max-width: 768px) {
    .single-page .meta-download {
        flex: 1 1 100% !important;
        order: 2;
        margin-top: 8px;
    }
    .single-page .uim-home-card {
        width: 50% !important;
    }
    .related-grid .uim-home-card {
        width: 50% !important;
    }
}

/* Fix breadcrumbs */
#breadcrumbs h1, #breadcrumbs span {
    display: inline;
    font-size: 1.1em;
    font-weight: 600;
    color: #ff3366;
}

/* Player fix */
.video-player {
    margin-bottom: 25px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}