.page-hero {
    padding: 180px 0 90px;
}

.page-hero .ud-hero-content {
    max-width: 680px;
    margin: 0 auto;
}

.page-hero .ud-hero-title {
    margin-bottom: 18px;
}

.page-hero .ud-hero-desc {
    margin-bottom: 0;
}

/* ====== 分类切换胶囊 Tab ====== */
.type-tabs-wrap {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 5px;
    margin-top: 28px;
    box-shadow: 0 4px 18px rgba(48, 86, 211, 0.06);
}

.btn-type-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 24px;
    border: none;
    border-radius: 40px;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .28s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-type-tab:hover {
    color: #3056d3;
}

.btn-type-tab.is-active {
    background: #3056d3;
    color: #fff;
    box-shadow: 0 4px 14px rgba(48, 86, 211, 0.32);
}

/* ====== 炫酷搜索栏样式 ====== */
.theme-search-box {
    max-width: 520px;
    margin: 20px auto 0;
}

.theme-search-inner {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e7ebf3;
    border-radius: 50px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 12px 30px rgba(48, 86, 211, 0.08);
    transition: all .3s ease;
}

.theme-search-inner:focus-within {
    border-color: #3056d3;
    box-shadow: 0 14px 35px rgba(48, 86, 211, 0.18);
}

.theme-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #212b36;
    background: transparent;
    min-width: 0;
}

.theme-search-input::placeholder {
    color: #94a3b8;
}

.theme-search-clear {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 15px;
    padding: 0 8px;
    cursor: pointer;
    display: none;
    transition: color .2s;
}

.theme-search-clear:hover {
    color: #64748b;
}

.theme-search-btn {
    border: none;
    background: #3056d3;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .2s ease, background .2s ease;
}

.theme-search-btn:hover {
    background: #2446b2;
    transform: scale(1.05);
}

.themes {
    overflow: hidden;
    padding: 80px 0 110px;
    background: #f3f4fe;
    min-height: 500px;
}

.themes .row {
    justify-content: flex-start;
}

.theme-card {
    overflow: hidden;
    height: 100%;
    background: var(--white, #fff);
    border: 1px solid #e7ebf3;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(48, 86, 211, .1);
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
}

.theme-card:hover {
    position: relative;
    z-index: 2;
    transform: scale(1.03);
    box-shadow: 0 18px 38px rgba(48, 86, 211, .22);
}

.theme-cover {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 186px;
    padding: 0;
    background: #1d263b;
}

.theme-cover::before {
    content: "";
    position: absolute;
    inset: -18px;
    background-image: var(--theme-preview-image);
    background-position: center;
    background-size: cover;
    filter: blur(18px);
    opacity: .8;
    transform: scale(1.08);
}

.theme-cover img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
}

.theme-info {
    padding: 16px 18px 18px;
}

.theme-info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.theme-info h3 {
    margin: 0;
    color: var(--heading-color, #212b36);
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.theme-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.theme-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--body-color, #637381);
}

.theme-meta i {
    color: var(--primary-color, #3056d3);
    font-size: 13px;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    background: #eef3ff;
    color: #3056d3;
    font-size: 12px;
    font-weight: 600;
}

/* 加载更多按钮与状态 */
.load-more-wrap {
    margin-top: 50px;
    text-align: center;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 36px;
    border: 0;
    border-radius: 6px;
    background: #3056d3;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .3s;
}

.btn-load-more:hover {
    background: #2446b2;
}

.btn-load-more:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.load-empty,
.load-end {
    color: #8b95a5;
    font-size: 14px;
}

/* ================= 炫酷毛玻璃轮播弹窗 ================= */
.theme-preview-modal {
    position: fixed;
    z-index: 1050;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 15, 29, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s cubic-bezier(0.16, 1, 0.3, 1), visibility .3s ease;
}

.theme-preview-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.theme-preview-dialog {
    position: relative;
    width: min(980px, 100%);
    padding: 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 18px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    transform: translateY(20px) scale(.96);
    transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-preview-modal.is-open .theme-preview-dialog {
    transform: translateY(0) scale(1);
}

/* 关闭按钮 */
.theme-preview-close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 20;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #1e293b;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
}

.theme-preview-close:hover {
    transform: rotate(90deg) scale(1.12);
    background: #fff;
    color: #3056d3;
}

/* 轮播视口 */
.slider-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 56vh;
    min-height: 290px;
    max-height: 540px;
    border-radius: 12px;
    perspective: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
}

.slider-ambient-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(45px) brightness(0.65) saturate(1.6);
    transform: scale(1.2);
    z-index: 1;
    transition: background-image .6s ease, opacity .6s ease;
}

.slider-ambient-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.65) 100%);
    pointer-events: none;
}

.slider-img-container {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.slider-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    will-change: transform, opacity, filter;
}

@keyframes slideEnterNext {
    0% {
        opacity: 0;
        transform: scale(0.88) translateX(60px) rotateY(-8deg);
        filter: blur(10px);
    }

    50% {
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0) rotateY(0deg);
        filter: blur(0px);
    }
}

@keyframes slideEnterPrev {
    0% {
        opacity: 0;
        transform: scale(0.88) translateX(-60px) rotateY(8deg);
        filter: blur(10px);
    }

    50% {
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0) rotateY(0deg);
        filter: blur(0px);
    }
}

.anim-slide-next {
    animation: slideEnterNext .42s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.anim-slide-prev {
    animation: slideEnterPrev .42s cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: all .28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-arrow:hover {
    background: rgba(48, 86, 211, 0.85);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(48, 86, 211, 0.6), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.slider-arrow.prev {
    left: 18px;
}

.slider-arrow.prev:hover {
    transform: translateY(-50%) translateX(-3px) scale(1.08);
}

.slider-arrow.next {
    right: 18px;
}

.slider-arrow.next:hover {
    transform: translateY(-50%) translateX(3px) scale(1.08);
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width .32s cubic-bezier(0.34, 1.56, 0.64, 1), background .25s ease, box-shadow .25s ease;
}

.slider-dot.is-active {
    width: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 20px rgba(48, 86, 211, 0.5);
}

.slider-loading,
.slider-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #e2e8f0;
    font-size: 14px;
    z-index: 5;
}

.theme-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 6px 2px;
}

.theme-preview-dialog h2 {
    margin: 0;
    color: var(--heading-color, #212b36);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.slider-page-counter {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
}

@media(max-width:767px) {
    .page-hero {
        padding: 130px 0 65px;
    }

    .themes {
        padding: 60px 0 80px;
    }

    .theme-preview-dialog {
        padding: 12px;
    }

    .slider-viewport {
        height: 42vh;
        min-height: 230px;
    }

    .slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .theme-preview-close {
        top: -10px;
        right: -10px;
        width: 32px;
        height: 32px;
    }

    .theme-search-box {
        margin-top: 18px;
        padding: 0 10px;
    }

    .btn-type-tab {
        padding: 7px 18px;
        font-size: 13px;
    }
}