/*
Theme Name: Ultimate Master Theme V42
Theme URI: https://massive-hall.com
Author: Hieu Dang
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.4; }
a { background-color: transparent; text-decoration: none; outline: 0; color: #fff; }
a:hover { color: #fff; opacity: 0.8; transition: all 0.2s; }
*, *: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: #000; color: #fff; padding: 5px 10px; 
    font-size: 0.75em; font-weight: 700; 
    border-left: 3px solid #fff; 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: #000; border-radius: 2px; }
.uim-home-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

/* ========== BADGES (VIEW/DURATION) ========== */
span.views, span.duration {
    position: absolute; bottom: 3px; padding: 1px 4px;
    font-size: 0.5em; font-weight: bold; z-index: 10;
    color: #000; background: #fff; border-radius: 1px; line-height: 1;
}
span.views { left: 3px; }
span.duration { right: 3px; }

/* ========== CARD TITLE (THU NHỎ) ========== */
.uim-home-card h3 { background: #000; height: 20px; line-height: 20px; padding: 0 3px; margin: 0; text-align: center; }
.uim-home-card h3 a { color: #fff; font-size: 0.55em; font-weight: 400; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ========== NAVIGATION (2 MÀU ĐEN TRẮNG) ========== */
#site-navigation { background: #000; border-bottom: 1px solid #333; min-height: 35px; width: 100%; }
#site-navigation ul.uim-main-menu { display: flex; justify-content: center; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
#site-navigation ul.uim-main-menu > li { border-right: 1px solid #333; }
#site-navigation ul.uim-main-menu > li > a { padding: 0 10px; line-height: 35px; color: #fff; font-size: 0.7em; font-weight: 600; text-transform: uppercase; }

/* ========== SINGLE PAGE & DOWNLOAD ========== */
.single-meta-flex { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px; background: #000; }
.uim-btn-download { 
    display: block; background: #fff; color: #000; text-align: center; 
    padding: 6px 15px; font-size: 0.7em; font-weight: 700; border-radius: 2px; text-transform: uppercase;
}

/* ========== FIX ADS CENTERING & RESPONSIVE ========== */
.uim-ad-wrapper {
    display: flex !important; justify-content: center !important; align-items: center !important;
    width: 100% !important; max-width: 100% !important; overflow: hidden !important;
    margin: 10px auto !important; padding: 0 !important;
}
.uim-ad-wrapper ins, .uim-ad-wrapper iframe { max-width: 100% !important; margin: 0 auto !important; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) { .uim-home-card { width: 25%; } }
@media (max-width: 992px) { .uim-home-card { width: 33.333%; } }
@media (max-width: 768px) { .uim-home-card { width: 50% !important; } }

/* ========== ADS OVERLAY ========== */
#uim-ads-overlay { display: none; position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 999999; }
.uim-ads-close { background: #fff; color: #000; padding: 2px 8px; font-size: 10px; font-weight: bold; cursor: pointer; }