/* ============================================
 * DH AI导航 - 自定义样式增强
 * AI主题智能书签网站视觉系统
 * 版本: 2.0 | 2026-07-04
 * ============================================ */

/*调整全局字体大小*/
body,html{font-size:14px;}

/* === AI主题渐变色变量 === */
:root{
    --ai-primary: #6366f1;
    --ai-primary-light: #818cf8;
    --ai-primary-dark: #4f46e5;
    --ai-accent: #ec4899;
    --ai-gradient: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --ai-gradient-soft: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(236,72,153,0.08) 100%);
    --ai-card-shadow: 0 2px 8px rgba(99,102,241,0.06);
    --ai-card-shadow-hover: 0 8px 24px rgba(99,102,241,0.15);
    --ai-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 滚动条 - 日间模式 === */
@media only screen and (min-device-width: 768px) {
    ::-webkit-scrollbar-thumb {
        background-color:rgba(99,102,241,.3);
        -webkit-border-radius: 4px;
        border-radius: 4px
    }
    ::-webkit-scrollbar-thumb:hover {
        background-color: var(--ai-primary);
        -webkit-border-radius: 4px;
        border-radius: 4px
    }
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px
    }
    ::-webkit-scrollbar-thumb:active {
        background-color: var(--ai-primary-dark);
        -webkit-border-radius: 4px;
        border-radius: 4px
    }
    ::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.03);
    }
    ::-webkit-scrollbar-corner {
        background: rgba(0,0,0,0);
        border-radius: 0 0 8px 0
    }
    ::-webkit-scrollbar-button {
        background-color: rgba(0,0,0,0);
        height: 2px;
        width: 2px
    }
}

/* === 滚动条 - 暗色模式 === */
.io-black-mode::-webkit-scrollbar-thumb {
    background-color: rgba(129,140,248,.3);
}
.io-black-mode::-webkit-scrollbar-thumb:hover {
    background-color: var(--ai-primary-light);
}
.io-black-mode::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}

@media (max-width: 767.98px) {
    .tab-auto-scrollbar::-webkit-scrollbar {
        display:none
    }
}

/*背景图铺满*/
#search-bg {
    background-size: cover;
}

/* === 加载动画 - AI主题渐变 === */
.loader {
    width: 250px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: helvetica, arial, sans-serif;
    font-weight: 900;
    color: var(--ai-primary);
    letter-spacing: 0.2em
}
.loader::before,
.loader::after {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    background: var(--ai-gradient);
    border-radius: 3px;
    position: absolute;
    animation: load .5s infinite alternate ease-in-out
}
.loader::before {top: 0}
.loader::after {bottom: 0}
@keyframes load {
    0% {left: 0;height: 30px;width: 15px}
    50% {height: 8px;width: 40px}
    100% {left: 235px;height: 30px;width: 15px}
}

/*左导航悬浮sidebar-menu-inner宽度调整为90px*/
.sidebar-popup.sidebar-menu-inner > div > ul > li.sidebar-item>ul{position:absolute;top:0px;left:10px;width:90px;z-index:99}
.sidebar-popup.sidebar-menu-inner ul{width:90px}
.sidebar-popup.sidebar-menu-inner ul li{width:90px}

/*搜索框搜索图标颜色*/
#search button i{color:#6C757D;font-size:18px}

/*顶部导航栏字体+图标颜色*/
.big-header-banner .page-header{color:#ffffff;background:rgba(255,255,255,0);box-shadow:none;transition:color .3s,background-color .3s}
.big-header-banner:not(.header-bg) .page-header .navbar-nav>li>a,.big-header-banner:not(.header-bg) .navbar-menu a:not(.dropdown-item){color:#ffffff;}
.big-header-banner:not(.header-bg) .page-header .navbar-nav>li>a:hover,.big-header-banner:not(.header-bg) .navbar-menu a:not(.dropdown-item):hover{color:var(--ai-primary-light);}
.big-header-banner:not(.header-bg) .header-mini-btn path{stroke:#ffffff;}
.big-header-banner:not(.header-bg) .header-mini-btn label:hover path{stroke:#ffffff;}

/*搜索栏字体+背景*/
.header-big #search-text{color:#6C757D;}
.io-black-mode .header-big #search-text{color:#fff;}

/*搜索activate图标颜色*/
.header-big .search-type input:checked+label:before{content:'';border-width:8px 8px 0px 8px;border-style:solid;border-color:#ffffff transparent transparent;position:absolute;left:50%;top:0;margin-left:-8px}

/*主页搜索搜索框(头+底部)字体颜色*/
.header-big:not(.no-bg) .s-type-list{color:#20c997}
.header-big:not(.no-bg) .text-muted,.header-big:not(.no-bg) .search-type .menu-item a,.header-big:not(.no-bg) .big-title .h1{color:#ffffff!important}

/*主页header-banner底部宽度*/
@media screen and (min-width:768px){.post-top{padding-bottom:50px}}
/*左导航二级导航标题左侧距离*/
.sidebar-menu-inner ul li ul li a{margin-left:30px;}

/*头部导航二级导航iconfont图标*/
.navbar-collapse ul li.menu-item-has-children:after{content:'\e612';}

/*搜索部分背景样式*/
.header-big.css-color{background-size:unset;background-position:unset;animation:unset;}

/*搜索热词样式调整*/
.search-hot-text{
    position: absolute;
    z-index: 100;
    width: 100%;
    border-radius: 10px 10px;
    background: #FFF;
    box-shadow: 0px 4px 5px 0px #cccccc94;
    overflow: hidden;
}
.search-hot-text ul{
    margin: 0;
    padding: 5px 0;
}
.search-hot-text ul li{
    line-height: 30px;
    font-size: 14px;
    padding: 0px 25px;
    color: #777;
    cursor: pointer;
    transition: all 0.2s ease;
}
.io-black-mode .search-hot-text{
    background: #1b1d1f;
    box-shadow: 0px 4px 12px 0px rgba(0,0,0,.4);
}
.io-black-mode .search-hot-text ul li{
    color: #fff;
}    
.search-hot-text ul li.current{
    background: var(--ai-gradient-soft);
    color: var(--ai-primary);
}
.search-hot-text ul li:hover{
    background: var(--ai-gradient-soft);
    color: var(--ai-primary);
    cursor: pointer;
}
.search-hot-text ul li span{
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    background: #e5e5e5;
    margin-right: 10px;
    border-radius: 10px;
    color: #999;
}
.io-black-mode .search-hot-text ul li span{
    background: rgba(255,255,255,0.1);
    color: #aaa;
}

/* === 页脚样式增强 === */
footer.main-footer .footer-text {
    text-align: center;
    font-size: 0.95rem !important;
    line-height: 2;
}
footer.main-footer .footer-text a {
    color: var(--ai-primary);
    transition: color 0.2s ease;
}
footer.main-footer .footer-text a:hover {
    color: var(--ai-accent);
}

/* === 背景纹理 === */
.io-grey-mode .page-container .grid-bg {
    background-image: linear-gradient(rgba(50, 0, 0, 0.05) 1px, transparent 0), linear-gradient(90deg, rgba(50, 0, 0, 0.05) 1px, transparent 0); 
    background-size: 15px 15px;
    background-color: #d8d8d8;
}
.io-grey-mode .page-container .white-bg {
    background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);
    background-size: 20px 20px;
    background-position: center center;
}
.io-grey-mode .page-container .polkadot-bg {
    background-color: #d8d8d8;
    background-image: radial-gradient(tan 32%, transparent 0), radial-gradient(tan 30%, transparent 0);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
}
.io-grey-mode .page-container .mosaic-bg {
    background: #eee url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill-opacity=".25" ><rect x="50" width="50" height="50" /><rect y="50" width="50" height="50" />            </svg>');
    background-size: 30px 30px;
}
.io-grey-mode .page-container .brickwall-bg {
    background-color: silver;
    background-image: linear-gradient(335deg, #979393  23px, transparent 23px),
    linear-gradient(155deg, #9f9999 23px, transparent 23px),
    linear-gradient(335deg, #9b8f8f 23px, transparent 23px),
    linear-gradient(155deg, #9f9999 23px, transparent 23px);
    background-size: 58px 58px; 
    background-position: 0px 2px, 4px 35px, 29px 31px, 34px 6px;
}

.hide{
    display: none!important;
}
img.icon{width:15px;height:15px;margin:0 5px 0 8px;vertical-align:-0.15em;fill:currentColor;overflow:hidden}

/* === 过渡页相关 === */
.card .site-introduce p {font-size: 15px;word-wrap: break-word;line-height: 2;text-align: left;}
.card .site-snapshot {float: left;width: 30%;text-align: center;position: relative;height: 180px;}
.card .site-image {margin-top: 10px;height: 120%;width: 100%;}
.card .site-form {float: right;width: 67%;margin-top: 10px;}
.card .site-form span {padding-right: 20px;float: left;width: 50%;font-size: 15px;border-bottom: 1px solid #eee;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;position: relative;line-height: 50px;height: 50px;}
.card .site-road {max-width: 100%;width: 100%;overflow: hidden;}
.card .site-road-start {width: 230px;overflow: hidden;margin: 10px auto;text-align: center;}
.card .site-similar {float: right;text-align: center;width: 45%;}
.card .site-similar a {position: relative;line-height: 35px;width: 80px;display: inline-block;height: 35px;color: #fff;font-size: 15px;border-radius: 4px;padding: 0 10px;background-color: #2fa23d;}
.card .site-similar a:hover {opacity: .7;}
.card .site-arrive {float: left;text-align: center;width: 45%;}
.card .site-arrive a {cursor: pointer;position: relative;line-height: 35px;width: 80px;display: inline-block;height: 35px;color: #fff;font-size: 15px;border-radius: 4px;padding: 0 10px;background-color: #ff5722;}
.card .site-arrive a:hover {opacity: .7;}

@media (max-width: 768px) {
.card .site-snapshot {width: 100%;height: auto;line-height: initial;}
.card .site-form {width: 100%;margin-left: 0;margin-top: 10px;}
.card .site-road-start {margin-top: 20px;}
.card .site-arrive {width: 46%;margin: 0 2%;float: left;}
.card span.site-similar {width: 46%;margin: 0 2%;float: left;}
.card .site-arrive a {line-height: 35px;height: 35px;font-size: 14px;}
.card .site-similar a {line-height: 35px;height: 35px;font-size: 14px;}
.card .site-form span {width: 100%;padding-right: 0px;}
}

#translateSelectLanguage {
  width: 120px;
  padding: 3px 10px;
  font-size: 16px;
  border-radius: 5px;
  margin-left: 10px;
}
.hot-card .hot-body {
    width: 100%;
}
@media (max-width: 768px) {
    #translateSelectLanguage {
      width: 100px;
      font-size: 12px;
    }
}

/* ============================================
 * AI主题增强样式 (v2.0 新增)
 * ============================================ */

/* === 链接卡片增强 === */
.url-card .url-body.default {
    transition: transform var(--ai-transition), box-shadow var(--ai-transition);
}
.url-card .url-body.default .card {
    transition: all var(--ai-transition);
    box-shadow: var(--ai-card-shadow);
    border: 1px solid rgba(99,102,241,0.06);
}
.url-card .url-body.default:hover .card {
    transform: translateY(-3px);
    box-shadow: var(--ai-card-shadow-hover);
    border-color: rgba(99,102,241,0.2);
}
.url-card .url-body.default:hover .url-img img {
    transform: scale(1.1);
}
.url-card .url-img img {
    transition: transform 0.3s ease;
}

/* === 暗色模式卡片适配 === */
.io-black-mode .url-card .url-body.default .card {
    background: #1e2022;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.io-black-mode .url-card .url-body.default:hover .card {
    box-shadow: 0 8px 24px rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.3);
}

/* === 章节标题增强 === */
.content-site h4.text-gray {
    position: relative;
    padding-left: 14px;
    color: #3b3f45;
    transition: color 0.2s ease;
}
.content-site h4.text-gray::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--ai-gradient);
    border-radius: 2px;
}
.io-black-mode .content-site h4.text-gray {
    color: #e2e8f0;
}

/* === 网站动态卡片 - 三行滚动轮播 === */
#category-dynamics h4.text-gray::before {
    /* 显示幻彩竖线，与其他分类一致 */
    display: block;
}
#dynamics {
    overflow: hidden;
    position: relative;
}
#dynamics .dynamics-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    padding: 8px 0;
    will-change: transform;
}
#dynamics .dynamics-scroll.row-1 {
    animation: scrollLeft 40s linear infinite;
}
#dynamics .dynamics-scroll.row-2 {
    animation: scrollRight 40s linear infinite;
}
#dynamics .dynamics-scroll.row-3 {
    animation: scrollLeft 40s linear infinite;
}
#dynamics .dynamics-scroll:hover {
    animation-play-state: paused;
}
#dynamics .dynamics-scroll .url-card {
    flex: 0 0 auto;
    width: 280px;
    min-width: 280px;
}
@keyframes scrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes scrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
#dynamics .url-card .card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    background: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}
#dynamics .url-card:hover .card {
    box-shadow: 0 4px 16px rgba(99,102,241,0.12);
    transform: translateY(-2px);
}
.io-black-mode #dynamics .url-card .card {
    background: rgba(30,32,34,0.7);
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.io-black-mode #dynamics .url-card:hover .card {
    box-shadow: 0 4px 16px rgba(99,102,241,0.2);
}

/* === 热点新闻卡片增强 === */
.hot-card {
    transition: all var(--ai-transition);
}
.hot-card:hover {
    transform: translateY(-2px);
}

/* === 页脚按钮增强 === */
#footer-tools .btn {
    transition: all var(--ai-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#footer-tools .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.io-black-mode #footer-tools .btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* === 搜索热词序号增强 === */
.search-hot-text ul li:nth-child(1) span {
    background: var(--ai-gradient);
    color: #fff;
}
.search-hot-text ul li:nth-child(2) span {
    background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    color: #fff;
}
.search-hot-text ul li:nth-child(3) span {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
    color: #fff;
}

/* === 文章卡片增强 === */
.card-post {
    transition: all var(--ai-transition);
    overflow: hidden;
}
.card-post:hover {
    transform: translateY(-3px);
    box-shadow: var(--ai-card-shadow-hover);
}
.card-post .media-content {
    transition: transform 0.4s ease;
}
.card-post:hover .media-content {
    transform: scale(1.05);
}

/* === 侧边栏激活项增强 === */
.sidebar-item > a:hover,
.sidebar-show > a {
    background: rgba(99,102,241,0.15) !important;
}
.sidebar-item > a:hover::before,
.sidebar-show > a::before {
    background: var(--ai-gradient);
}

/* === 侧边栏无边框 === */
.sidebar, .sidebar-nav, .sidebar-menu, .sidebar-menu-inner,
.sidebar-item, .sidebar-item > a, .sidebar-show, .sidebar-popup {
    border: none !important;
    box-shadow: none !important;
}
.io-black-mode .sidebar, .io-black-mode .sidebar-nav,
.io-black-mode .sidebar-menu, .io-black-mode .sidebar-menu-inner {
    border: none !important;
}

/* === 夜间模式去除所有分割线 === */
.io-black-mode .border-top,
.io-black-mode .border-bottom,
.io-black-mode .border-left,
.io-black-mode .border-right,
.io-black-mode .border-color,
.io-black-mode [class*="border-top"],
.io-black-mode [class*="border-bottom"] {
    border-color: transparent !important;
}
.io-black-mode .navbar {
    border-bottom: none !important;
    box-shadow: none !important;
    background: transparent !important;
}
.io-black-mode .page-header {
    background: transparent !important;
    box-shadow: none !important;
}
.io-black-mode .big-header-banner.header-bg .page-header {
    background: transparent !important;
    box-shadow: none !important;
}
.io-black-mode .header-big {
    border-bottom: none !important;
    background: transparent !important;
}
.io-black-mode .sidebar-scroll {
    border-right: none !important;
}

/* === 夜间模式炫彩光晕效果 === */
.io-black-mode .wzybox,
.io-black-mode .wzynr,
.io-black-mode .wzyright,
.io-black-mode .grzylist,
.io-black-mode .container,
.io-black-mode .hot-card {
    box-shadow: 0 0 30px rgba(99,102,241,0.06), 0 0 60px rgba(139,92,246,0.04), 0 0 90px rgba(236,72,153,0.02);
    transition: box-shadow 0.5s ease;
}
.io-black-mode .wzybox:hover,
.io-black-mode .wzynr:hover,
.io-black-mode .wzyright:hover,
.io-black-mode .grzylist:hover,
.io-black-mode .hot-card:hover {
    box-shadow: 0 0 40px rgba(99,102,241,0.12), 0 0 80px rgba(139,92,246,0.08), 0 0 120px rgba(236,72,153,0.04);
}

/* === 背景色跟随日夜模式 === */
body {
    background-color: #ebecf0;
    transition: background-color 0.3s ease;
}
.io-black-mode body,
body.io-black-mode {
    background-color: #1b1d1f !important;
}

/* === 日间模式 body 背景 === */
body.io-grey-mode {
    background-color: #ebecf0;
}

/* === 失踪儿童信息面板日夜模式 === */
.io-black-mode .missing-children-banner,
.io-black-mode .missing-children-footer {
    background: linear-gradient(135deg, #2a1a1a, #1f1520) !important;
    border-color: #4a3035 !important;
}
.io-black-mode .missing-children-banner > div > div > div:first-child,
.io-black-mode .missing-children-footer > div > div > div:first-child {
    color: #f87171 !important;
}
.io-black-mode .missing-children-banner > div > div > div:last-child,
.io-black-mode .missing-children-footer > div > div > div:last-child {
    color: #6b7280 !important;
}

/* 宝贝回家流动播放 */
@keyframes baby-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.baby-track:hover {
    animation-play-state: paused;
}
/* 宝贝回家卡片 */
.baby-card {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    padding: 4px 8px;
    margin-right: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}
.baby-card:hover {
    background: rgba(254,202,202,0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220,38,38,0.1);
}
.baby-card img {
    height: 100%;
    width: auto;
    max-width: 80px;
    aspect-ratio: 3/4;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
    margin-right: 6px;
}
.baby-card .baby-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 60px;
    max-width: 120px;
    line-height: 1.3;
}
.baby-card .baby-name {
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.baby-card .baby-meta {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* 暗色模式 */
.io-black-mode .baby-card {
    background: rgba(255,255,255,0.06);
}
.io-black-mode .baby-card:hover {
    background: rgba(254,202,202,0.15);
}
.io-black-mode .baby-card .baby-name {
    color: #f87171;
}
.io-black-mode .baby-card .baby-meta {
    color: #9ca3af;
}
.missing-children-footer {
    /* 宽度继承 .foot 的 max-width: 1200px */
}
.missing-children-footer:hover {
    box-shadow: 0 4px 16px rgba(220,38,38,0.12);
}

/* 移动端宝贝回家适配 */
@media (max-width: 768px) {
    .baby-card img {
        max-width: 60px;
    }
    .baby-card .baby-info {
        min-width: 45px;
        max-width: 90px;
    }
    .baby-card .baby-name {
        font-size: 11px;
    }
    .baby-card .baby-meta {
        font-size: 10px;
    }
}

/* === Tab滑块增强 === */
.slider_menu[sliderTab] {
    background: rgba(99,102,241,0.04);
    border-radius: 8px;
    padding: 4px;
}
.io-black-mode .slider_menu[sliderTab] {
    background: rgba(255,255,255,0.04);
}
.slider_menu .nav-pills .nav-link.active {
    background: var(--ai-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.slider_menu .nav-pills .nav-link {
    transition: all 0.2s ease;
    border-radius: 6px;
}
.slider_menu .nav-pills .nav-link:not(.active):hover {
    background: rgba(99,102,241,0.08);
    color: var(--ai-primary);
}

/* === 全局平滑滚动 === */
html {
    scroll-behavior: smooth;
}

/* === 图片加载失败占位 === */
img.lazy:not([src]),
img[src=""] {
    background: var(--ai-gradient-soft);
}

/* === 暗色模式背景增强 === */
.io-black-mode .main-content {
    background: #181a1c;
}
.io-black-mode .url-card .url-body.default .card .text-sm strong {
    color: #e2e8f0;
}
.io-black-mode .text-muted {
    color: #8b92a0 !important;
}

/* === 响应式微调 === */
@media (max-width: 768px) {
    .url-card .url-body.default:hover .card {
        transform: none;
    }
    .content-site h4.text-gray {
        padding-left: 10px;
    }
    .content-site h4.text-gray::before {
        height: 16px;
    }
    #footer-tools .btn {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* === 可访问性: 减少动画 === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === 焦点可见性 === */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--ai-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === 内容区域渐入动画 === */
.content-site > .flex-fill {
    animation: fadeInUp 0.4s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === 搜索按钮AI主题增强 === */
.header-big .submit {
    background: var(--ai-gradient);
    border: none;
    transition: all var(--ai-transition);
}
.header-big .submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.header-big .submit i {
    color: #fff !important;
}

/* === 搜索输入框聚焦增强 === */
.header-big #search-text:focus {
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    border-color: var(--ai-primary) !important;
}

/* === 友情链接卡片增强 === */
.friendlink.card {
    transition: all var(--ai-transition);
    border: 1px solid rgba(99,102,241,0.08);
}
.friendlink.card:hover {
    border-color: rgba(99,102,241,0.2);
    box-shadow: var(--ai-card-shadow-hover);
}
.io-black-mode .friendlink.card {
    background: #1e2022;
    border-color: rgba(255,255,255,0.06);
}
.friendlink a {
    transition: color 0.2s ease;
    font-size: 0.85rem !important;
}
.friendlink a:hover {
    color: var(--ai-primary) !important;
}
/* 友情链接标题 */
#friendlink { font-size: 1.1rem; }

/* === 搜索建议下拉增强 === */
.search-hot-text {
    border: 1px solid rgba(99,102,241,0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 修复: 当搜索建议列表为空时隐藏下拉框,避免在搜索框下方出现一条不美观的横线 */
.search-hot-text:not(:has(ul#word > li)) {
    display: none !important;
}

/* === 侧边栏logo过渡 === */
.sidebar-logo {
    transition: background-color 0.3s ease;
}
.sidebar-logo:hover {
    background: rgba(99,102,241,0.08);
}

/* === 大标题渐变文字 === */
.big-title .h1 {
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -moz-text-fill-color: transparent;
}
.io-black-mode .big-title .h1 {
    background: linear-gradient(135deg, #818cf8 0%, #f472b6 50%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== AI 悬浮对话机器人 ===== */

/* 悬浮按钮 */
#footer-tools .ai-chat-btn {
    position: relative;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: #fff !important;
    border: none !important;
    overflow: visible;
}

/* 白天模式：AI按钮favicon图标居中 */
#footer-tools .ai-chat-btn .ai-chat-icon {
    display: block;
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 4px;
}
#footer-tools .ai-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes iridescent-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 夜间模式：AI按钮保持幻彩光晕 */
.io-black-mode #footer-tools .ai-chat-btn {
    box-shadow: 0 0 20px rgba(99,102,241,0.3), 0 0 40px rgba(139,92,246,0.2), 0 0 60px rgba(236,72,153,0.1);
    animation: night-glow-pulse 3s ease-in-out infinite;
}
@keyframes night-glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.3), 0 0 40px rgba(139,92,246,0.2), 0 0 60px rgba(236,72,153,0.1); }
    50% { box-shadow: 0 0 30px rgba(99,102,241,0.5), 0 0 60px rgba(139,92,246,0.35), 0 0 90px rgba(236,72,153,0.2); }
}

#footer-tools .ai-chat-btn::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    opacity: 0;
    z-index: -1;
    animation: ai-pulse 2s infinite;
}

@keyframes ai-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    70%  { transform: scale(1.4); opacity: 0;   }
    100% { transform: scale(1);   opacity: 0;   }
}

#footer-tools .ai-chat-btn:hover::before {
    opacity: 0.4;
}

/* AI 对话窗口 */
.ai-chat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 560px;
    max-height: calc(100vh - 160px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(99, 102, 241, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 99999;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.ai-chat-widget.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* 暗色模式 */
.io-black-mode .ai-chat-widget {
    background: #1f2937;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

/* 头部 */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: #fff;
    flex-shrink: 0;
}

.ai-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-chat-title {
    display: flex;
    flex-direction: column;
}

.ai-chat-title .name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.ai-chat-title .status {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
}

.ai-chat-title .status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    margin-right: 4px;
    vertical-align: middle;
    animation: status-blink 2s infinite;
}

@keyframes status-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.ai-chat-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 消息区 */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
}

.io-black-mode .ai-chat-messages {
    background: #111827;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

/* 消息气泡 */
.ai-msg {
    display: flex;
    gap: 8px;
    max-width: 85%;
    animation: msg-in 0.3s ease;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ai-msg.ai-msg-bot {
    align-self: flex-start;
}

.ai-msg.ai-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.ai-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.ai-msg-bot .ai-msg-avatar {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #fff;
}

.ai-msg-user .ai-msg-avatar {
    background: #e5e7eb;
    color: #374151;
}

.io-black-mode .ai-msg-user .ai-msg-avatar {
    background: #374151;
    color: #e5e7eb;
}

.ai-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.ai-msg-bot .ai-msg-bubble {
    background: #fff;
    color: #1f2937;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.io-black-mode .ai-msg-bot .ai-msg-bubble {
    background: #1f2937;
    color: #e5e7eb;
}

.ai-msg-user .ai-msg-bubble {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-top-right-radius: 4px;
}

.ai-msg-bubble code {
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.io-black-mode .ai-msg-bubble code {
    background: rgba(255, 255, 255, 0.1);
}

.ai-msg-bubble p {
    margin: 0 0 8px 0;
}

.ai-msg-bubble p:last-child {
    margin-bottom: 0;
}

/* 打字中 */
.ai-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.ai-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.ai-typing span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* 快捷问题 */
.ai-quick-questions {
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex-shrink: 0;
}

.io-black-mode .ai-quick-questions {
    background: #111827;
    border-top-color: #374151;
}

.ai-quick-btn {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.io-black-mode .ai-quick-btn {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

.ai-quick-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

/* 输入区 */
.ai-chat-input-area {
    padding: 12px 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

.io-black-mode .ai-chat-input-area {
    background: #1f2937;
    border-top-color: #374151;
}

.ai-chat-textarea {
    flex: 1;
    resize: none;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    max-height: 100px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
}

.io-black-mode .ai-chat-textarea {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.ai-chat-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ai-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s, opacity 0.2s;
    flex-shrink: 0;
}

.ai-chat-send:hover:not(:disabled) {
    transform: scale(1.08);
}

.ai-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 640px) {
    .ai-chat-widget {
        width: 100vw;
        height: calc(100vh - 100px);
        max-width: 100vw;
        max-height: calc(100vh - 100px);
        bottom: 60px;
        right: 0;
        border-radius: 16px 16px 0 0;
    }
}

/* ============================================
 * AI 光感科技风格 v4.0
 * 轻盈通透 · 光晕渐变 · 微动效
 * 设计原则：无边框、透明、光感
 * ============================================ */

/* === 全局光感背景（不覆盖任何元素） === */
body {
    position: relative;
}
/* 七彩炫光顶部线 */
body::after {
    content: '';
    position: fixed;
    top: 0; left: -50%;
    width: 200%; height: 3px;
    background: linear-gradient(90deg, 
        #ff0000, #ff8800, #ffff00, #00ff00, #0088ff, #8800ff, #ff0088, #ff0000
    );
    background-size: 200% 100%;
    animation: rainbowSlide 3s linear infinite;
    z-index: 9999;
    pointer-events: none;
}
@keyframes rainbowSlide {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        radial-gradient(ellipse at 15% 0%, rgba(99,102,241,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 90%, rgba(236,72,153,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139,92,246,0.02) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* === 暗色模式全局光感 === */
.io-black-mode body::before {
    background: 
        radial-gradient(ellipse at 15% 0%, rgba(99,102,241,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 90%, rgba(236,72,153,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139,92,246,0.03) 0%, transparent 70%);
}

/* === 卡片悬浮光晕 — 无边框设计 === */
.url-card .url-body.default .card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.url-card .url-body.default:hover .card {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99,102,241,0.1), 0 0 0 1px rgba(99,102,241,0.06);
}
.io-black-mode .url-card .url-body.default .card {
    background: transparent;
}
.io-black-mode .url-card .url-body.default:hover .card {
    box-shadow: 0 12px 32px rgba(99,102,241,0.2), 0 0 0 1px rgba(99,102,241,0.1);
}

/* === 链接图标光晕 === */
.url-card .card-img {
    transition: all 0.4s ease;
}
.url-card:hover .card-img {
    filter: drop-shadow(0 0 8px rgba(99,102,241,0.2));
}
.io-black-mode .url-card:hover .card-img {
    filter: drop-shadow(0 0 12px rgba(99,102,241,0.3));
}

/* === 搜索框光效 === */
#search-text:focus {
    border-color: rgba(99,102,241,0.25);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.05), 0 0 20px rgba(99,102,241,0.06);
    outline: none;
}
.io-black-mode #search-text:focus {
    box-shadow: 0 0 0 3px rgba(99,102,241,0.08), 0 0 24px rgba(99,102,241,0.1);
}

/* === 分类标题渐变光感 === */
.content-site h4.text-gray {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.io-black-mode .content-site h4.text-gray {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === 导航菜单光感 === */
.nav-pills .nav-link {
    transition: all 0.3s;
    border-radius: 8px;
}
.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 2px 12px rgba(99,102,241,0.2);
}
.nav-pills .nav-link:not(.active):hover {
    background: rgba(99,102,241,0.05);
}

/* === 分隔线光感 === */
hr, .divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.12), transparent);
}
.io-black-mode hr, .io-black-mode .divider {
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), transparent);
}

/* === 空状态提示 === */
.nothing {
    background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(139,92,246,0.03));
    border: 1px dashed rgba(99,102,241,0.12);
    border-radius: 12px;
}

/* === 卡片渐现动画 === */
@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.url-card {
    animation: cardFadeIn 0.5s ease backwards;
}
.url-card:nth-child(1) { animation-delay: 0.03s; }
.url-card:nth-child(2) { animation-delay: 0.06s; }
.url-card:nth-child(3) { animation-delay: 0.09s; }
.url-card:nth-child(4) { animation-delay: 0.12s; }
.url-card:nth-child(5) { animation-delay: 0.15s; }
.url-card:nth-child(6) { animation-delay: 0.18s; }
.url-card:nth-child(7) { animation-delay: 0.21s; }
.url-card:nth-child(8) { animation-delay: 0.24s; }
.url-card:nth-child(9) { animation-delay: 0.27s; }
.url-card:nth-child(10) { animation-delay: 0.30s; }

/* === 暗色模式滚动条 === */
.io-black-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--ai-primary), var(--ai-primary-light));
    border-radius: 4px;
}
.io-black-mode ::-webkit-scrollbar-track {
    background: rgba(99,102,241,0.03);
}

/* === 移动端优化 === */
@media (max-width: 768px) {
    .url-card .url-body.default:hover .card {
        transform: translateY(-1px);
    }
}

/* === 留言板暗色模式 === */
.io-black-mode #form {
    background: #1e1f24;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.io-black-mode .container {
    background: #1a1b20;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.io-black-mode .container h2 {
    color: #e0e0e0;
}
.io-black-mode .form-group label {
    color: #bbb;
}
.io-black-mode .form-group input,
.io-black-mode .form-group textarea,
.io-black-mode .form-group select {
    background: #25262b;
    color: #ddd;
    border: 1px solid #333;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}
.io-black-mode .form-group input:focus,
.io-black-mode .form-group textarea:focus,
.io-black-mode .form-group select:focus {
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.1), inset 0 1px 3px rgba(0,0,0,0.3);
    outline: none;
}
.io-black-mode .submit-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
    border: none;
}
.io-black-mode .submit-btn:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}
