/* MB11 Brand Theme 04: Mango TV / 芒果TV风格 */
:root {
    --theme-primary: #a9591c;
    --theme-primary-hover: #884312;
    --theme-primary-soft: #f7ece4;
    --theme-accent: #c17a20;
    --theme-accent-2: #705596;
    --theme-accent-soft: #fbf2dd;
    --theme-bg: #f2e4d7;
    --theme-surface: #ffffff;
    --theme-text: #3f342b;
    --theme-muted: #75685e;
    --theme-border: #eadbce;
    --theme-footer: #5b371e;
    --theme-footer-text: #fff9f4;
    --theme-focus: rgba(169, 89, 28, .28);
    --theme-shadow: 0 8px 24px rgba(63, 52, 43, .08);
    --theme-radius: 12px;
    --theme-control-radius: 18px;
}

html { color-scheme: light; }
body {
    background-color: var(--theme-bg);
    background-image:
        radial-gradient(circle at 7% -4%, rgba(193, 122, 32, .29), transparent 31rem),
        radial-gradient(circle at 95% 8%, rgba(112, 85, 150, .19), transparent 29rem),
        linear-gradient(145deg, #f2d9c3 0, #fbf0e6 49%, #f2e4d7 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    min-height: 100vh;
    color: var(--theme-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body::before {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-primary) 0 64%, var(--theme-accent) 64% 84%, var(--theme-accent-2) 84% 100%);
}

::selection { background: var(--theme-primary-soft); color: var(--theme-text); }
a, .text-primary, .youmu-app dt a, .score > em, .detail-info h2 small,
.appel-title h4 a, .frvod, .today-count { color: var(--theme-primary) !important; }
a:hover, a:focus, .youmu-app dt a:hover, .appel-title h4 a:hover {
    color: var(--theme-primary-hover) !important;
}
:focus-visible { outline: 3px solid var(--theme-focus); outline-offset: 2px; }

.appel, .youmu-app, .search-list, .detail-content, .detail-play-list,
.thumbnail, .play-box, .comment-box {
    background: var(--theme-surface);
    border-color: var(--theme-border) !important;
    box-shadow: var(--theme-shadow);
}
.appel-title, .youmu-app dt, .detail-tab, .breadcrumbs {
    border-color: var(--theme-border) !important;
}
.appel-title::after, .appel-title:after, .youmu-app dt::after, .youmu-app dt:after,
.appel-tabs > a.active, #ddab .seach button, .backtop:hover .iconfont {
    background: var(--theme-primary) !important;
    color: #fff !important;
}
.appel-tabs > a:hover, #ddab .seach button:hover, #ddab .seach button:focus {
    background: var(--theme-primary-hover) !important;
    color: #fff !important;
}

#ddab .seach input {
    background: var(--theme-surface);
    border-color: var(--theme-primary) !important;
    color: var(--theme-text);
}
#ddab .seach input:focus { box-shadow: 0 0 0 3px var(--theme-focus); outline: 0; }
#ddab .seach input::placeholder { color: var(--theme-muted); opacity: .85; }

.detail-tab > li, .detail-play-list li > a, .play-source,
.page a, .page span, .pagination > li > a, .pagination > li > span {
    background: var(--theme-primary-soft) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text) !important;
}
.detail-tab > li.active, .detail-tab > li.active > a,
.detail-play-list li > a:hover, .detail-play-list li > a.play-active,
.page a:hover, .page .current, .pagination > .active > a {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #fff !important;
}

.text-muted, .breadcrumbs, .detail-info p, .detail-info span,
.thumbnail .text-muted, .appel-title small { color: var(--theme-muted) !important; }
.thumbnail { border-radius: 8px; transition: transform .18s ease, box-shadow .18s ease; }
.thumbnail:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(38, 52, 69, .13); }
.thumbnail img, .video-pic { border-radius: 7px; }

.stui-header__top {
    background: linear-gradient(135deg, var(--theme-primary-soft), var(--theme-accent-soft));
    border-bottom: 1px solid var(--theme-border);
    border-radius: 8px;
}

.STYLE1 { font-size: 22px !important; font-weight: 700; }
.home-link-zone { overflow: hidden; }
.home-link-zone__title {
    position: relative;
    margin: 0 0 10px;
    padding: 4px 10px 8px 16px;
    color: var(--theme-text);
    line-height: 1.35;
}
.home-link-zone__title::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 8px;
    left: 0;
    width: 5px;
    border-radius: 5px;
    background: linear-gradient(180deg, var(--theme-primary), var(--theme-accent), var(--theme-accent-2));
}
.random-link-grid, .txtguanggao, .txtguanggaos {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    overflow: hidden;
}
.home-link-zone .search-cloud1 {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
}
.home-link-zone .random-link-item {
    box-sizing: border-box;
    flex: 0 0 calc(16.666666% - 2px);
    min-width: 0;
    height: 30px;
    margin: 1px;
    padding: 0 6px;
    border: 1px solid var(--random-link-color, var(--theme-primary)) !important;
    border-radius: 3px;
    background: var(--random-link-color, var(--theme-primary)) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 28px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: center;
    text-shadow: none;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}
.home-link-zone .random-link-item:hover,
.home-link-zone .random-link-item:focus-visible {
    color: #fff !important;
    filter: brightness(.92);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.random-icon-grid { margin: 2px 1px 1px; background: transparent; }
.random-icon-grid ul {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2px;
    margin: 0;
    padding: 0;
}
.random-icon-grid ul li { float: none; width: auto; min-width: 0; }
.random-icon-grid .random-icon-item {
    display: block;
    min-height: 92px;
    padding: 7px 4px 5px;
    border: 1px solid var(--random-link-color, var(--theme-border));
    border-radius: 10px;
    background: var(--random-link-soft, var(--theme-primary-soft));
    color: var(--random-link-color, var(--theme-primary)) !important;
    text-align: center;
}
.random-icon-grid .random-icon-item img {
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto;
    border-radius: 12px;
}
.random-icon-grid .photo-name {
    display: block;
    color: var(--random-link-color, var(--theme-primary)) !important;
    line-height: 24px;
}
.partner-banner-links { display: grid; gap: 2px; margin: 2px 1px 1px; }
.partner-banner-link {
    display: block;
    padding: 3px;
    border: 1px solid var(--random-link-color, var(--theme-border));
    border-left-width: 5px;
    border-radius: 8px;
    background: var(--random-link-soft, var(--theme-primary-soft));
    overflow: hidden;
}
.partner-banner-link img {
    display: block;
    width: 100%;
    height: 70px;
    margin: 0;
    border-radius: 5px;
    object-fit: cover;
}

/* 其他广告位保持主题色；三个友链区由更高优先级的随机色覆盖。 */
.txtguanggao a, .txtguanggaos a {
    background: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #fff !important;
    text-shadow: none !important;
}
.txtguanggao a:nth-child(even), .txtguanggaos a:nth-child(even) {
    background: var(--theme-primary-hover) !important;
    border-color: var(--theme-primary-hover) !important;
}
.home-link-zone .random-link-item.has-random-color,
.home-link-zone .random-link-item.has-random-color:nth-child(even) {
    background: var(--random-link-color, var(--theme-primary)) !important;
    border-color: var(--random-link-color, var(--theme-primary)) !important;
}

/* 热门标签按参考图统一为中性灰，并使用比其他友链更小的字号。 */
.home-link-zone--tags .search-cloud1 > .random-link-item,
.home-link-zone--tags .search-cloud1 > .random-link-item:nth-child(even) {
    background: #767676 !important;
    border-color: #767676 !important;
    color: #fff !important;
    font-size: 12px;
    font-weight: 500;
}
.home-link-zone--tags .search-cloud1 > .random-link-item:hover,
.home-link-zone--tags .search-cloud1 > .random-link-item:focus-visible {
    background: #686868 !important;
    border-color: #686868 !important;
    color: #fff !important;
}

.footer { background: var(--theme-footer) !important; color: var(--theme-footer-text); }
.footer a { color: #dce7f0 !important; }
.footer a:hover { color: #fff !important; }
.footer-highlight { color: #edf3f8; font-size: 16px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1000px) {
    .home-link-zone .random-link-item { flex-basis: calc(33.333333% - 2px); min-width: 0; }
    .random-icon-grid ul { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .STYLE1 { font-size: 19px !important; }
    .random-icon-grid ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
    .random-icon-grid .random-icon-item { min-height: 86px; }
}

/* 品牌主题的圆角节奏：卡片与交互控件分别控制。 */
.appel, .stui-header__top, .thumbnail { border-radius: var(--theme-radius) !important; }
#ddab .seach input, #ddab .seach button { border-radius: var(--theme-control-radius) !important; }
.home-link-zone .random-link-item { border-radius: 3px; }
.random-icon-grid .random-icon-item, .partner-banner-link { border-radius: var(--theme-radius); }
/* 首页与今日更新页只在视频列表下方显示分页。 */
.mb11-paged-list {
    display: block;
}
.mb11-pagination--bottom { clear: both; }
.mb11-pagination-controls { padding: 8px 0; }
.mb11-pagination-summary {
    margin: 0 0 6px;
    color: var(--theme-muted);
    font-size: 13px;
    line-height: 1.5;
}
.mb11-pagination-controls .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mb11-pagination-controls .pagination > li { margin: 0; }
.mb11-pagination-controls .pagination > li > a,
.mb11-pagination-controls .page_input,
.mb11-pagination-controls .mb11_page_go {
    box-sizing: border-box;
    height: 36px;
    border-radius: 3px;
    font-size: 15px;
    line-height: 34px;
}
.mb11-pagination-controls .pagination > li > a {
    min-width: 62px;
    padding: 0 14px;
}
.mb11-page-jump {
    display: inline-flex !important;
    gap: 6px;
}
.mb11-pagination-controls .page_input {
    width: 62px;
    padding: 0 6px;
    border: 1px solid var(--theme-primary);
    background: var(--theme-surface);
    color: var(--theme-text);
    text-align: center;
    outline: none;
}
.mb11-pagination-controls .page_input:focus {
    border-color: var(--theme-primary-hover);
    box-shadow: 0 0 0 3px var(--theme-focus);
}
.mb11-pagination-controls .page_input.is-invalid {
    border-color: #a23d49;
}
.mb11-pagination-controls .mb11_page_go {
    min-width: 70px;
    padding: 0 14px;
    border: 1px solid var(--theme-primary);
    background: var(--theme-primary);
    color: #fff;
    cursor: pointer;
}
.mb11-pagination-controls .mb11_page_go:hover,
.mb11-pagination-controls .mb11_page_go:focus-visible {
    border-color: var(--theme-primary-hover);
    background: var(--theme-primary-hover);
}
