/* Force blue UI into purple theme across legacy templates */
:root {
    --purple-main: #9f35ff;
    --purple-dark: #7f22d9;
    --purple-soft: #f3e9ff;
}

/* Header logo: right side and compact like reference */
.headertop .header-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 10px !important;
}

.headertop .home-title {
    color: #ffef4f !important;
    font-size: 31px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin-left: 6px !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25) !important;
}

.headertop .logo-wrap {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin-left: auto !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
}

.headertop .logo-wrap .top-logo,
.headertop .header-row .top-logo,
.headertop .header-row img.top-logo {
    width: 42px !important;
    height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    display: block !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

/* Latest news icon + black text (title and marquee) */
.headertop .box1.news-box .news-title,
.headertop .box1.news-box .news-title * {
    color: #000 !important;
}

.headertop .box1.news-box .news-title {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.headertop .box1.news-box .news-title img {
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    margin: 0 !important;
}

.headertop .box1.news-box marquee,
.headertop .box1.news-box .txtMarquee-left,
.headertop .box1.news-box .txtMarquee-left * {
    color: #000 !important;
}

/* Date/lunar strip text force black */
.riqi,
.riqi *,
.riqi span,
.riqi font,
.riqi b {
    color: #000 !important;
}

/* common blue blocks */
.headertop,
.header,
.box1,
.box.spareURL,
.spareURL,
.news-box,
.xjct,
.cgi-con-tit,
.blue-tit {
    background: linear-gradient(180deg, var(--purple-main), var(--purple-dark)) !important;
    background-image: linear-gradient(180deg, var(--purple-main), var(--purple-dark)) !important;
    border-color: var(--purple-dark) !important;
}

/* legacy blue cards */
.box,
.subnavl,
.xjbox {
    border-color: #dbc8f4 !important;
}

/* force icon nav bar purple borders/labels style */
.subnav a,
.subnavl a {
    color: #2a1850 !important;
}

/* Top area icon/image tint for legacy blue assets */
.headertop .subnav a img,
.subnav a img,
.subnavl a img {
    filter: hue-rotate(52deg) saturate(120%);
}

.ymgg .box.img100 img {
    filter: hue-rotate(40deg) saturate(115%);
}

/* blue backgrounds set by attributes or inline styles */
[bgcolor="#0000FF"],
[bgcolor="#00f"],
[bgcolor="#3366FF"],
[bgcolor="#409DFF"],
[bgcolor="#4292EF"] {
    background-color: var(--purple-main) !important;
}

[style*="background:#0000FF"],
[style*="background: #0000FF"],
[style*="background:#00f"],
[style*="background: #00f"],
[style*="background-color:#0000FF"],
[style*="background-color: #0000FF"],
[style*="background-color:#3366FF"],
[style*="background-color: #3366FF"],
[style*="background-color:#409DFF"],
[style*="background-color: #409DFF"],
[style*="background-color:#4292EF"],
[style*="background-color: #4292EF"] {
    background-color: var(--purple-main) !important;
}

[style*="linear-gradient(to right, #4292EF"],
[style*="linear-gradient(to right,#4292EF"],
[style*="linear-gradient(to right, #409DFF"],
[style*="linear-gradient(to right,#409DFF"],
[style*="linear-gradient(to right, #3366FF"],
[style*="linear-gradient(to right,#3366FF"] {
    background: linear-gradient(180deg, var(--purple-main), var(--purple-dark)) !important;
    background-image: linear-gradient(180deg, var(--purple-main), var(--purple-dark)) !important;
}

/* blue text */
a,
a:visited,
.wblue,
.wb,
.text-blue,
.blue,
font[color="#0000FF"],
font[color="blue"],
font[color="#3366FF"],
font[color="#409DFF"] {
    color: var(--purple-dark) !important;
}
