/* ============================================
   搜索模块 - 轻拟态玻璃按钮风格（与PC顶部菜单一致）
   ============================================ */

/* CSS 自定义属性动画 - 共享 */
@property --s-angle-1 {
    syntax: "<angle>";
    inherits: false;
    initial-value: -75deg;
}
@property --s-angle-2 {
    syntax: "<angle>";
    inherits: false;
    initial-value: -45deg;
}

:root {
    --s-anim-time: 400ms;
    --s-anim-ease: cubic-bezier(0.25, 1, 0.5, 1);
    --s-border-w: clamp(1px, 0.0625em, 4px);
}

/* === 搜索区域背景 === */
.header-banner {
    background: linear-gradient(145deg, #0f0c29, #302b63, #24243e) !important;
    position: relative;
    overflow: hidden;
}
.header-banner::before,
.header-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
    animation: sFloat 8s ease-in-out infinite;
}
.header-banner::before {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.6), transparent 70%);
    top: -100px; left: -60px;
}
.header-banner::after {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 70%);
    bottom: -80px; right: -40px;
    animation-delay: -4s;
    animation-direction: reverse;
}
.search-container::before {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
    border-radius: 50%;
    filter: blur(70px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
    z-index: -1;
}
.search-container:hover::before { opacity: 0.3; }
@keyframes sFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    33% { transform: translateY(20px) scale(1.05); }
    66% { transform: translateY(-15px) scale(0.95); }
}

/* === 大标题 === */
.big-search {
    --font-color: rgba(255, 255, 255, 0.9) !important;
    --anchor-color: rgba(255, 255, 255, 0.8) !important;
}
.big-title h2, .big-title p, .big-search .h1 {
    text-shadow: 0 2px 20px rgba(139, 92, 246, 0.3) !important;
    letter-spacing: 8px !important;
}

/* === 搜索输入框 - 轻拟态胶囊按钮 === */
.search-form .search-key {
    height: 54px !important;
    border-radius: 999vw !important;
    padding: 12px 60px 12px 22px !important;
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.05)
    ) !important;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.06),
        inset 0 -1px 1px rgba(255, 255, 255, 0.4),
        0 2px 1px -1px rgba(0, 0, 0, 0.25),
        0 0 1px 2px inset rgba(255, 255, 255, 0.15),
        0 0 0 0 rgba(255, 255, 255, 1) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 15px !important;
    transition: all var(--s-anim-time) var(--s-anim-ease) !important;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.06) !important;
}

/* 输入框旋转边框 */
.search-form .search-key::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: 999vw;
    padding: 1px;
    box-sizing: border-box;
    background: conic-gradient(
        from var(--s-angle-1) at 50% 50%,
        rgba(255, 255, 255, 0.25),
        rgba(255, 255, 255, 0) 5% 40%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 60% 95%,
        rgba(255, 255, 255, 0.25)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15));
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    transition:
        all var(--s-anim-time) var(--s-anim-ease),
        --s-angle-1 500ms ease;
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

/* 输入框光泽扫过 */
.search-form .search-key::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 1px;
    border-radius: 999vw;
    overflow: hidden;
    background: linear-gradient(
        var(--s-angle-2),
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 40% 50%,
        rgba(255, 255, 255, 0) 55%
    );
    mix-blend-mode: screen;
    pointer-events: none;
    background-size: 200% 200%;
    background-position: 0% 50%;
    background-repeat: no-repeat;
    transition:
        background-position calc(var(--s-anim-time) * 1.25) var(--s-anim-ease),
        --s-angle-2 calc(var(--s-anim-time) * 1.25) var(--s-anim-ease);
}

.search-form .search-key::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
    letter-spacing: 0.5px;
    text-shadow: none !important;
}

/* 悬停 */
.search-form .search-key:hover {
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.06)
    ) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.06),
        inset 0 -1px 1px rgba(255, 255, 255, 0.45),
        0 1px 0.5px -0.5px rgba(0, 0, 0, 0.3),
        0 0 0.5px 1px inset rgba(255, 255, 255, 0.3),
        0 0 0 0 rgba(255, 255, 255, 1) !important;
    transform: scale(0.99);
}
.search-form .search-key:hover::after {
    --s-angle-1: -125deg;
}
.search-form .search-key:hover::before {
    background-position: 25% 50%;
}

/* 聚焦 */
.search-form .search-key:focus {
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.08)
    ) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.06),
        inset 0 -1px 1px rgba(255, 255, 255, 0.45),
        0 1px 0.5px -0.5px rgba(0, 0, 0, 0.3),
        0 0 0.5px 1px inset rgba(255, 255, 255, 0.3),
        0 0 0 0 rgba(255, 255, 255, 1),
        0 0 20px rgba(139, 92, 246, 0.1) !important;
    transform: scale(0.975);
    outline: none !important;
}
.search-form .search-key:focus::after {
    --s-angle-1: -125deg;
}
.search-form .search-key:focus::before {
    background-position: 50% 50%;
    --s-angle-2: -15deg;
}

/* === 搜索按钮 - 旋转流光样式 === */
.search-submit-btn {
    height: 44px !important;
    width: 44px !important;
    line-height: 44px !important;
    border-radius: 999vw !important;
    border: none !important;
    position: relative !important;
    overflow: visible !important;
    z-index: 1;
    cursor: pointer;
    color: #fff !important;
    font-size: 18px !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
    text-shadow: none !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 旋转流光外层 */
.search-submit-btn::before {
    content: '';
    position: absolute;
    z-index: -2;
    inset: -2px;
    border-radius: 999vw;
    background: conic-gradient(
        from var(--s-angle-1),
        #7c3aed,
        #3b82f6,
        #a855f7,
        #6366f1,
        #818cf8,
        #7c3aed
    );
    animation: searchBtnSpin 3s linear infinite;
    opacity: 0.9;
    pointer-events: none;
}

/* 内层填充 */
.search-submit-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 2px;
    border-radius: 999vw;
    background: linear-gradient(135deg, rgba(88, 28, 135, 0.75), rgba(49, 46, 129, 0.7));
    pointer-events: none;
}

@keyframes searchBtnSpin {
    from { --s-angle-1: 0deg; }
    to { --s-angle-1: 360deg; }
}

.search-submit-btn:hover {
    transform: scale(1.08) !important;
}

.search-submit-btn:active {
    transform: scale(0.95) !important;
}

/* 触屏回退 */
@media (hover: none) and (pointer: coarse) {
    .search-submit-btn::before {
        animation: none;
        background: linear-gradient(135deg, #7c3aed, #3b82f6, #a855f7);
        opacity: 0.8;
    }
}

/* === 搜索标签菜单 === */
.search-list-menu .slider-li {
    padding: 8px 18px !important;
    border-radius: 999vw !important;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.04)
    );
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.04),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3),
        0 1px 1px -1px rgba(0, 0, 0, 0.12),
        0 0 0 0 rgba(255, 255, 255, 1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: all var(--s-anim-time) var(--s-anim-ease) !important;
}

.search-list-menu .slider-li::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: 999vw;
    padding: 1px;
    box-sizing: border-box;
    background: conic-gradient(
        from var(--s-angle-1) at 50% 50%,
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0) 5% 40%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 60% 95%,
        rgba(255, 255, 255, 0.2)
    );
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    transition: all var(--s-anim-time) var(--s-anim-ease), --s-angle-1 500ms ease;
    pointer-events: none;
}

.search-list-menu .slider-li:hover {
    transform: scale(0.975);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 -1px 1px rgba(255, 255, 255, 0.35),
        0 0.5px 0.5px -0.5px rgba(0, 0, 0, 0.2),
        0 0 0.5px 1px inset rgba(255, 255, 255, 0.25),
        0 0 0 0 rgba(255, 255, 255, 1);
}
.search-list-menu .slider-li:hover::after { --s-angle-1: -125deg; }

.search-list-menu .slider-li.active {
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.16),
        rgba(255, 255, 255, 0.06)
    ) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 -1px 1px rgba(255, 255, 255, 0.4),
        0 1px 1px -1px rgba(0, 0, 0, 0.15),
        0 0 1px 2px inset rgba(255, 255, 255, 0.2),
        0 0 0 0 rgba(255, 255, 255, 1) !important;
}

.search-list-menu .anchor {
    background: conic-gradient(
        from -75deg at 50% 50%,
        rgba(139, 92, 246, 0.6),
        rgba(59, 130, 246, 0.6) 50%,
        rgba(139, 92, 246, 0.6)
    ) !important;
    width: 20px !important;
    height: 4px !important;
    border-radius: 999vw !important;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* === 搜索引擎标签 === */
.search-group li {
    padding: 8px 18px !important;
    border-radius: 999vw !important;
    transition: all var(--s-anim-time) var(--s-anim-ease) !important;
}

.search-group li:hover {
    background: rgba(255, 255, 255, 0.04);
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.04),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3),
        0 1px 1px -1px rgba(0, 0, 0, 0.12);
}

.search-group li.active {
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 -1px 1px rgba(255, 255, 255, 0.4),
        0 1px 1px -1px rgba(0, 0, 0, 0.15),
        0 0 1px 2px inset rgba(255, 255, 255, 0.15) !important;
}

/* === 智能提示框 === */
.search-smart-tips {
    background: rgba(30, 27, 46, 0.75) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    box-shadow:
        6px 6px 16px rgba(0, 0, 0, 0.35),
        -3px -3px 10px rgba(255, 255, 255, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
    margin-top: 8px !important;
    overflow: hidden;
}

.search-smart-tips ul li {
    transition: all 0.25s ease !important;
    border-radius: 12px !important;
    margin: 2px 4px !important;
}

.search-smart-tips ul li:hover,
.search-smart-tips ul li.active {
    background: rgba(139, 92, 246, 0.12) !important;
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.search-smart-tips .search-smart-meta {
    background: rgba(0, 0, 0, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* === 简单搜索框（非首页） === */
.simple-search {
    padding: 24px !important;
    background: rgba(30, 27, 46, 0.5) !important;
    border-radius: 22px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        6px 6px 16px rgba(0, 0, 0, 0.25),
        -3px -3px 10px rgba(255, 255, 255, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
    position: relative;
    overflow: hidden;
}

.simple-search::before {
    content: '';
    position: absolute;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    top: -60px; right: -40px;
    pointer-events: none;
    animation: sFloat 10s ease-in-out infinite;
}

.simple-search .search-form .search-key {
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.04)
    ) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3),
        0 1px 1px -1px rgba(0, 0, 0, 0.2),
        0 0 1px 2px inset rgba(255, 255, 255, 0.12),
        0 0 0 0 rgba(255, 255, 255, 1) !important;
}

.simple-search .search-form .search-key:focus {
    border-color: transparent !important;
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.16),
        rgba(255, 255, 255, 0.06)
    ) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 -1px 1px rgba(255, 255, 255, 0.35),
        0 1px 1px -1px rgba(0, 0, 0, 0.25),
        0 0 1px 2px inset rgba(255, 255, 255, 0.15),
        0 0 0 0 rgba(255, 255, 255, 1),
        0 0 20px rgba(139, 92, 246, 0.1) !important;
}

.simple-search .dropdown .btn {
    color: rgba(255, 255, 255, 0.7) !important;
}

.simple-search .dropdown-menu {
    background: rgba(30, 27, 46, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    box-shadow:
        6px 6px 16px rgba(0, 0, 0, 0.35),
        -3px -3px 10px rgba(255, 255, 255, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03) !important;
}

.simple-search .search-group li {
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 12px !important;
}

.simple-search .search-group li:hover {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.simple-search .search-group li.active {
    color: #fff !important;
    background: rgba(139, 92, 246, 0.12) !important;
}

.simple-search .search-smart-tips {
    background: rgba(30, 27, 46, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
}

/* === 搜索结果页表单 === */
.search-container .search-form .search-key {
    background: linear-gradient(
        -75deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.04)
    ) !important;
    box-shadow:
        inset 0 1px 1px rgba(0, 0, 0, 0.05),
        inset 0 -1px 1px rgba(255, 255, 255, 0.3),
        0 1px 1px -1px rgba(0, 0, 0, 0.2),
        0 0 1px 2px inset rgba(255, 255, 255, 0.12),
        0 0 0 0 rgba(255, 255, 255, 1) !important;
}

/* === 移动端适配 === */
@media screen and (max-width: 767.98px) {
    .search-form .search-key {
        height: 48px !important;
        padding: 10px 52px 10px 18px !important;
        font-size: 14px !important;
    }
    .search-submit-btn {
        height: 40px !important;
        width: 40px !important;
        line-height: 40px !important;
        font-size: 16px !important;
    }
    .search-list-menu .slider-li {
        padding: 8px 16px !important;
        font-size: 13px;
    }
    .search-group li {
        padding: 8px 12px !important;
        font-size: 13px;
    }
    .simple-search {
        padding: 16px !important;
        border-radius: 18px !important;
    }
}

/* === 暗色模式适配 === */
.io-black-mode .big-search {
    --font-color: rgba(255, 255, 255, 0.9) !important;
    --form-color: rgba(255, 255, 255, 0.85) !important;
}

/* === 触屏设备回退 === */
@media (hover: none) and (pointer: coarse) {
    .search-form .search-key::after,
    .search-submit-btn::after,
    .search-list-menu .slider-li::after {
        --s-angle-1: -75deg;
    }
    .search-form .search-key::before,
    .search-submit-btn::before {
        --s-angle-2: -45deg;
    }
}

/* === 公告栏 - 旋转流光样式 === */
#bulletin_box {
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#bulletin_box::before {
    content: '' !important;
    position: absolute !important;
    z-index: -2 !important;
    inset: -2px !important;
    border-radius: inherit !important;
    background: conic-gradient(
        from var(--s-angle-1),
        #7c3aed,
        #3b82f6,
        #a855f7,
        #6366f1,
        #818cf8,
        #7c3aed
    ) !important;
    animation: bulletinSpin 3s linear infinite !important;
    opacity: 0.7 !important;
    pointer-events: none !important;
}

#bulletin_box::after {
    content: '' !important;
    position: absolute !important;
    z-index: -1 !important;
    inset: 2px !important;
    border-radius: inherit !important;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 27, 75, 0.85)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

@keyframes bulletinSpin {
    from { --s-angle-1: 0deg; }
    to { --s-angle-1: 360deg; }
}

#bulletin_box .card-body {
    position: relative;
    z-index: 1;
    color: rgba(200, 200, 255, 0.8) !important;
}

#bulletin_box .card-body a {
    color: rgba(200, 200, 255, 0.85) !important;
}

#bulletin_box .card-body a:hover {
    color: #fff !important;
}

#bulletin_box .bulletin-close {
    color: rgba(200, 200, 255, 0.5) !important;
}

#bulletin_box .bulletin-close:hover {
    color: #fff !important;
}

@media (hover: none) and (pointer: coarse) {
    #bulletin_box::before {
        animation: none !important;
        background: linear-gradient(135deg, #7c3aed, #3b82f6, #a855f7) !important;
        opacity: 0.5 !important;
    }
}