﻿/**
 * Ripro主题UI美化增强样式
 * 包含：会员按钮动画、整体视觉优化、移动端适配、VIP开通弹窗
 */

/* ============================================
   VIP开通弹窗样式
   ============================================ */

.vip-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.vip-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.vip-popup-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90%;
    width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.vip-popup-overlay.show .vip-popup-content {
    transform: scale(1) translateY(0);
}

.vip-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.vip-popup-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.vip-popup-header h4 i {
    margin-right: 8px;
}

.vip-popup-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.vip-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.vip-popup-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.vip-popup-body ul {
    margin: 12px 0;
    padding-left: 20px;
}

.vip-popup-body li {
    margin-bottom: 8px;
}

.vip-popup-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

/* 条款确认弹窗双按钮布局 */
.vip-terms-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.vip-terms-footer .btn {
    min-width: 120px;
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
}

.vip-terms-footer .vip-terms-agree {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.vip-terms-footer .vip-terms-cancel {
    border-color: #ddd;
    color: #666;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .vip-popup-content {
        width: 92%;
        max-height: 85vh;
        border-radius: 10px;
    }
    
    .vip-popup-header {
        padding: 14px 16px;
    }
    
    .vip-popup-header h4 {
        font-size: 16px;
    }
    
    .vip-popup-body {
        padding: 16px;
        font-size: 13px;
        line-height: 1.7;
    }
    
    .vip-popup-footer {
        padding: 14px 16px;
    }
    
    .vip-popup-footer .btn {
        width: 100%;
        padding: 12px;
    }
    
    .vip-terms-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .vip-terms-footer .btn {
        width: 100%;
        min-width: auto;
    }
}

/* ============================================
   1. 永久会员按钮动态闪烁效果
   ============================================ */

/* ============================================
   1. 永久会员按钮动态闪烁效果
   ============================================ */

/* 高端金色闪烁动画 - 用于永久会员按钮 */
@keyframes vip-golden-shine {
    0% {
        background-position: -200% center;
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    }
    50% {
        background-position: 200% center;
        box-shadow: 0 0 30px rgba(255, 193, 7, 0.8), 0 0 60px rgba(255, 193, 7, 0.4);
    }
    100% {
        background-position: -200% center;
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4);
    }
}

/* 脉冲呼吸效果 */
@keyframes vip-pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 6px 25px rgba(255, 193, 7, 0.6), 0 0 40px rgba(255, 193, 7, 0.3);
    }
}

/* 渐变流光效果 */
@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 永久会员按钮样式 */
.btn-vip-permanent {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #ffc107 0%,
        #ffdb58 25%,
        #ffd700 50%,
        #ffdb58 75%,
        #ffc107 100%
    );
    background-size: 200% auto;
    border: none;
    color: #212529 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: 
        vip-golden-shine 3s ease-in-out infinite,
        vip-pulse-glow 2s ease-in-out infinite;
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

.btn-vip-permanent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transform: translateX(-100%);
    animation: shine-sweep 2s infinite;
    will-change: transform;
}

@keyframes shine-sweep {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(200%);
    }
}

.btn-vip-permanent:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.8), 0 0 50px rgba(255, 193, 7, 0.4);
}

.btn-vip-permanent:active {
    transform: translateY(0) scale(0.98);
}

/* 按钮内图标动画 */
.btn-vip-permanent i {
    animation: icon-bounce 1.5s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* ============================================
   2. VIP卡片整体美化
   ============================================ */

/* 价格卡片优化 */
.price-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.price-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* 永久会员卡片特殊样式 */
.price-card.vip-permanent {
    border: 2px solid #ffc107;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.15);
}

.price-card.vip-permanent:hover {
    box-shadow: 0 20px 40px rgba(255, 193, 7, 0.25);
}

/* 卡片头部优化 */
.price-header {
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.price-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.price-plan {
    font-size: 1.25rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.price-sub {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* 价格显示优化 */
.price-ammount {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.5rem 0;
}

.price-card.vip-permanent .price-ammount {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 特权列表优化 */
.price-desc {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.price-desc li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #4b5563;
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
}

.price-desc li:last-child {
    border-bottom: none;
}

.price-desc li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #10b981;
}

.price-card.vip-permanent .price-desc li::before {
    color: #f59e0b;
}

/* 卡片底部按钮区域 */
.price-footer {
    padding: 1.5rem;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.02));
}

/* ============================================
   3. 用户中心整体美化
   ============================================ */

/* 侧边栏菜单优化 */
.uc-menu-warp {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uc-menu-warp li {
    margin: 0.25rem 0;
}

.uc-menu-warp li a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.uc-menu-warp li a:hover {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    color: #667eea;
    transform: translateX(4px);
}

.uc-menu-warp li.current-menu-item a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.uc-menu-warp li i {
    width: 24px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* 用户信息卡片优化 */
.card .avatar-xl {
    position: relative;
}

.card .avatar-xl::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .avatar-xl::after {
    opacity: 0.3;
}

/* 统计卡片美化 */
.card-body .row .col .card {
    border: none;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.card-body .row .col .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
}

/* ============================================
   4. 表单和输入框优化
   ============================================ */

.form-control {
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* 按钮通用优化 */
.btn {
    border-radius: 10px;
    padding: 0.625rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #fff;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
    color: #fff;
}

/* ============================================
   5. 移动端适配优化
   ============================================ */

@media (max-width: 991.98px) {
    /* 容器间距优化 */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* 卡片间距 */
    .card {
        margin-bottom: 1rem;
    }
    
    /* VIP卡片网格 */
    .row-cols-md-3 > .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* 价格卡片移动端 */
    .price-card {
        margin-bottom: 1rem;
    }
    
    .price-header {
        padding: 1.5rem 1rem;
    }
    
    .price-ammount {
        font-size: 2rem;
    }
    
    /* 菜单优化 */
    .uc-menu-warp {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .uc-menu-warp li {
        flex: 1 1 auto;
        min-width: calc(50% - 0.25rem);
        margin: 0;
    }
    
    .uc-menu-warp li a {
        justify-content: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .uc-menu-warp li i {
        margin-right: 0.5rem;
    }
    
    /* 用户信息卡片 */
    .card .d-flex.align-items-center {
        flex-direction: column;
        text-align: center;
    }
    
    .card .avatar-xl {
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
    
    /* 统计卡片 */
    .row-cols-2 > .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* 按钮触摸优化 */
    .btn {
        padding: 0.75rem 1.25rem;
        min-height: 44px;
    }
    
    /* 表单优化 */
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

@media (max-width: 575.98px) {
    /* 更小屏幕的菜单 */
    .uc-menu-warp li {
        min-width: 100%;
    }
    
    /* 统计卡片改为2列 */
    .row-cols-2 > .col {
        padding: 0.25rem;
    }
    
    .card-body .row .col .card {
        padding: 1rem 0.5rem;
    }
    
    .card-body .row .col h4 {
        font-size: 1.25rem;
    }
    
    /* 价格卡片 */
    .price-desc li {
        font-size: 0.8rem;
    }
    
    /* 永久会员按钮移动端 */
    .btn-vip-permanent {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
}

/* ============================================
   6. 账号页面专项优化
   ============================================ */

/* 个人资料卡片 */
#user-profile .form-control {
    background: #fff;
    border: 2px solid #e5e7eb;
}

#user-profile .form-control:focus {
    border-color: #667eea;
}

/* 头像上传区域 */
#inputAvatarFile + label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#inputAvatarFile + label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

/* 账户绑定区域 */
#edit-email-form .btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

/* 快捷登录按钮 */
.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: #fff;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    transform: translateY(-2px);
}

/* 订单列表优化 */
.pay-vip-log .list-group-item {
    border: none;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.pay-vip-log .list-group-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

/* CDK兑换区域 */
.vip-cdk-body {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: none;
}

.vip-cdk-body .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 会员到期提醒 */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 20px;
}

/* 下载统计数字动画 */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card h4.fw-bold {
    animation: count-up 0.6s ease-out;
}

/* ============================================
   7. 滚动条美化
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a67d8 0%, #6b46c1 100%);
}

/* ============================================
   8. 加载动画
   ============================================ */

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}


/* ============================================
   9. 页面滚动进度条
   ============================================ */

/* z-index 层级说明（参考 Bootstrap 5）：
 * 1000: dropdown
 * 1020: sticky
 * 1030: fixed
 * 1040: offcanvas-backdrop
 * 1045: offcanvas
 * 1050: modal-backdrop
 * 1055: modal
 * 1070: popover
 * 1080: tooltip
 * 自定义组件应在 1030-1045 之间，避免与模态框冲突
 */

#ri-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 60%, #d63384 100%);
    z-index: 1031;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
    transition: width 0.08s linear;
    will-change: width;
}


/* ============================================
   10. 文章卡片骨架屏 + 图片淡入
   ============================================ */

/* LazyLoad 加载前的骨架屏效果 */
@keyframes ri-skeleton-flow {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.post-item .entry-media .media-img:not(.loaded) {
    background-color: var(--bs-secondary-bg, #e9ecef) !important;
    background-image: linear-gradient(
        90deg,
        transparent          0%,
        rgba(255,255,255,.5) 40%,
        rgba(255,255,255,.7) 50%,
        rgba(255,255,255,.5) 60%,
        transparent         100%
    ) !important;
    background-size: 200% 100% !important;
    animation: ri-skeleton-flow 1.4s ease-in-out infinite !important;
}

/* 深色模式骨架屏 */
[data-bs-theme="dark"] .post-item .entry-media .media-img:not(.loaded) {
    background-color: #1e2033 !important;
    background-image: linear-gradient(
        90deg,
        transparent           0%,
        rgba(255,255,255,.06) 40%,
        rgba(255,255,255,.12) 50%,
        rgba(255,255,255,.06) 60%,
        transparent          100%
    ) !important;
}

/* 图片加载完成后平滑淡入 */
@keyframes ri-img-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.post-item .entry-media .media-img.loaded {
    animation: ri-img-fadein 0.45s ease forwards !important;
}


/* ============================================
   11. 文章卡片视觉升级
   ============================================ */

/* Grid 卡片统一圈起、阴影、hover 升起 */
.post-item.item-grid {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: box-shadow .3s ease, transform .3s ease;
}
.post-item.item-grid:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.13);
    transform: translateY(-5px);
}
[data-bs-theme="dark"] .post-item.item-grid {
    box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
[data-bs-theme="dark"] .post-item.item-grid:hover {
    box-shadow: 0 10px 36px rgba(0,0,0,.45);
}

/* List 卡片 hover */
.post-item.item-list {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    transition: box-shadow .28s ease, transform .28s ease;
}
.post-item.item-list:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
    transform: translateX(3px);
}

/* 标题 hover 滚入式下划线 */
.post-item .entry-title a {
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size .3s ease, color .2s ease;
    padding-bottom: 1px;
}
.post-item:hover .entry-title a {
    background-size: 100% 1px;
}

/* Meta 信息小标注优化 */
.post-item .entry-meta {
    font-size: .78rem;
    letter-spacing: .12px;
    opacity: .8;
    transition: opacity .25s ease;
}
.post-item:hover .entry-meta {
    opacity: 1;
}

/* 分类标签微弹 */
.entry-cat-dot .badge {
    font-size: .72rem;
    letter-spacing: .2px;
    border-radius: 20px;
    padding: .3em .78em;
    transition: transform .2s cubic-bezier(.34,1.56,.64,1), filter .2s ease;
}
.entry-cat-dot .badge:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}


/* ============================================
   12. 全局排版优化
   ============================================ */

/* 页面整体字体平滑渲染 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 内容区块每条链接平滑过渡 */
a {
    transition: color .18s ease;
}

/* 表单输入框高级感聚焦 */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px rgba(13,110,253,.18);
    border-color: #86b7fe;
    outline: none;
    transition: box-shadow .2s ease, border-color .2s ease;
}

/* 图片默认圆角 - 仅作用于内容区域图片 */
.post-item img,
.entry-content img,
.single-content img,
.card-body img:not(.avatar) {
    border-radius: 4px;
}

/* 模态对话框圆角升级 */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
}

/* Alert 警告框升级 */
.alert {
    border-radius: 10px;
    border-left-width: 4px;
}

/* 页脚 小布局升级 */
.site-footer a {
    opacity: .8;
    transition: opacity .18s ease;
}
.site-footer a:hover {
    opacity: 1;
}


/* ============================================
   13. 移动端体验优化
   ============================================ */

@media (max-width: 767.98px) {
    /* 卡片移动端关闭 translate，仅保留阴影变化 */
    .post-item.item-grid:hover,
    .post-item.item-list:hover {
        transform: none;
    }
    /* 验证码按钞移动端展示 */
    .post-item .entry-title a {
        background-size: 0 1px !important;
    }
}

/* 触控设备禁用 hover 动效 */
@media (hover: none) {
    .post-item.item-grid:hover,
    .post-item.item-list:hover {
        transform: none;
        box-shadow: initial;
    }
}

/* ============================================
   14. 首页搜索区域 · 游戏主题全面重构
   ============================================ */

/* ---- 搜索区整体 ---- */
.search-bg {
    position: relative;
    overflow: hidden;
}

/* 搜索区遮罩：游戏深色渐变 */
.search-bg .search-bg-overlay {
    background: linear-gradient(
        160deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(10, 5, 30, 0.45) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

/* ---- 内容区布局 ---- */
.search-bg .search-warp {
    position: relative;
    z-index: 2;
    padding-top: 4rem;
    padding-bottom: 3.5rem;
    text-align: center;
}

/* ---- 搜索标题：游戏霓虹发光字 ---- */
.search-bg .search-title {
    color: #fff;
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: 2px;
    text-shadow:
        0 0 20px rgba(139, 92, 246, 0.9),
        0 0 40px rgba(139, 92, 246, 0.5),
        0 2px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.6rem;
    animation: hero-title-fadein 0.7s ease both;
    position: relative;
    display: inline-block;
}

/* 标题装饰线 */
.search-bg .search-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, #ec4899, #8b5cf6, transparent);
    border-radius: 2px;
    animation: hero-title-fadein 0.7s 0.1s ease both;
}

/* ---- 搜索描述 ---- */
.search-bg .search-desc {
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.95rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    margin-top: 1rem;
    letter-spacing: 0.5px;
    animation: hero-title-fadein 0.7s 0.15s ease both;
}

/* ---- 搜索表单容器：游戏终端风格 ---- */
.search-bg .search-form {
    max-width: 680px;
    margin: 0 auto;
    background: transparent;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    animation: hero-title-fadein 0.7s 0.2s ease both;
}

/* ---- 首页搜索字段：完全使用游戏深色风格 ---- */
.search-bg .search-fields {
    background: linear-gradient(145deg,
        rgba(13, 13, 28, 0.96) 0%,
        rgba(22, 22, 42, 0.98) 100%) !important;
    border-radius: 18px !important;
    border: none !important;
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1.5px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 50px rgba(139, 92, 246, 0.12) !important;
}

.search-bg .search-fields:focus-within {
    box-shadow:
        0 20px 60px rgba(139, 92, 246, 0.3),
        0 0 0 2px rgba(139, 92, 246, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 70px rgba(139, 92, 246, 0.25) !important;
    transform: translateY(-3px) !important;
}

/* ---- 热词标签 ---- */
.search-bg .search-hots {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    animation: hero-title-fadein 0.7s 0.5s ease both;
}

.search-bg .search-hots > span:first-child {
    color: rgba(196, 181, 253, 0.8);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: 0.3px;
}

.search-bg .search-hots > span:first-child::before {
    content: '🔥';
    font-size: 0.75rem;
}

.search-bg .search-hots span a {
    display: inline-block;
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    padding: 0.28rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    letter-spacing: 0.2px;
}

.search-bg .search-hots span a:hover {
    background: rgba(139, 92, 246, 0.35);
    color: #f3e8ff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
    text-decoration: none;
}


/* VIP卡片发光边框 */
.price-card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.price-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.price-card .price-header {
    position: relative;
    overflow: hidden;
}

.price-card .price-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: card-shine 4s infinite;
    will-change: transform;
}

@keyframes card-shine {
    0% { transform: translateX(-100%); }
    50%, 100% { transform: translateX(200%); }
}

/* 文章卡片悬停上浮 */
.post-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* ============================================
   16. 移动端专属优化
   ============================================ */

@media (max-width: 767.98px) {
    /* ---- 移动端首页搜索区 ---- */
    .search-bg .search-warp {
        padding-top: 2.5rem;
        padding-bottom: 2.25rem;
    }
    
    .search-bg .search-title {
        font-size: 1.35rem;
    }
    
    .search-bg .search-desc {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }
    
    .search-bg .search-form {
        max-width: 100%;
        padding: 4px;
        border-radius: 50px;
    }
    
    /* 移动端搜索字段高度 */
    .search-bg .search-fields {
        min-height: 46px;
    }
    
    .search-bg .search-fields input[type="text"],
    .search-bg .search-fields input[name="s"] {
        font-size: 16px;      /* 防止 iOS 自动放大 */
        padding: 0 1rem;
        height: 46px;
        line-height: 46px;
    }
    
    /* 移动端搜索按钮 */
    .search-bg .search-fields .search-submit-btn,
    .search-bg .search-fields button[type="submit"] {
        width: 44px;
        height: 44px;
        margin: 2px 2px 2px 0;
    }
    
    /* 移动端热词标签 */
    .search-bg .search-hots {
        margin-top: 1rem;
        gap: 0.4rem;
    }
    
    .search-bg .search-hots span a {
        padding: 0.2rem 0.7rem;
        font-size: 0.72rem;
    }
    
    /* VIP卡片 */
    .price-card {
        margin-bottom: 1rem;
    }
    
    .price-card .price-header {
        padding: 1rem;
    }
    
    .price-card .price-body {
        padding: 1rem;
    }
    
    /* 文章卡片 */
    .post-item {
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }
    
    .post-item .entry-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    /* 用户中心卡片 */
    .user-center-card {
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    /* 徽章移动端优化 */
    .badge {
        font-size: 0.75rem;
        padding: 0.4em 0.8em;
    }
    
    /* 按钮触摸优化 */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    /* 导航栏移动端 */
    .navbar {
        padding: 0.5rem 0;
    }
    
    /* 页脚精简 */
    .site-footer {
        padding: 1.5rem 0;
        text-align: center;
    }
    
    .site-footer .footer-links {
        display: none;
    }
    
    /* ---- 移动端底部导航栏 ---- */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1035;
        padding: 8px 0;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    .mobile-bottom-nav .nav-item {
        flex: 1;
        text-align: center;
        padding: 8px 0;
    }
    
    .mobile-bottom-nav .nav-item i {
        font-size: 1.25rem;
        display: block;
        margin-bottom: 4px;
    }
    
    .mobile-bottom-nav .nav-item span {
        font-size: 0.7rem;
        color: #666;
    }
    
    .mobile-bottom-nav .nav-item.active i,
    .mobile-bottom-nav .nav-item.active span {
        color: var(--bs-primary, #0d6efd);
    }
    
    /* 为页面底部留出空间 */
    body {
        padding-bottom: 70px;
    }
}

/* ============================================
   17. 用户中心美化
   ============================================ */

/* 用户中心卡片 */
.user-center-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.user-center-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* 下载统计卡片 */
.user-center-card .card h4.fw-bold {
    font-size: 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 会员信息卡片 */
.vip-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.vip-info-card .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}


/* ============================================
   18. 搜索框 · 游戏主题终端风格
   ============================================ */

/* ---- 整体包裹 ---- */
.search-form {
    width: 100%;
    position: relative;
}

.search-form-inner {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ---- 搜索字段容器：霓虹终端风格 ---- */
.search-fields {
    display: flex !important;
    align-items: center;
    background: linear-gradient(145deg,
        rgba(18, 18, 35, 0.97) 0%,
        rgba(28, 28, 50, 0.99) 100%);
    border-radius: 18px;
    border: 1.5px solid rgba(139, 92, 246, 0.35);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 0 transparent,
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 30px rgba(139, 92, 246, 0.1);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    min-height: 64px;
    overflow: visible;
}

/* 流光边框 */
.search-fields::before {
    content: '';
    position: absolute;
    inset: -1.5px;
    border-radius: 19.5px;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.5) 0%,
        rgba(59, 130, 246, 0.35) 30%,
        rgba(236, 72, 153, 0.35) 60%,
        rgba(139, 92, 246, 0.5) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
                  linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box,
          linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.search-fields:hover::before,
.search-fields:focus-within::before {
    opacity: 1;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.9) 0%,
        rgba(59, 130, 246, 0.7) 30%,
        rgba(236, 72, 153, 0.7) 60%,
        rgba(139, 92, 246, 0.9) 100%);
}

/* 聚焦时整体发光上浮 */
.search-fields:focus-within {
    box-shadow:
        0 16px 60px rgba(139, 92, 246, 0.3),
        0 0 0 0 transparent,
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 80px rgba(139, 92, 246, 0.2);
    transform: translateY(-3px);
}

/* 扫描光线 */
.search-fields::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(139, 92, 246, 0.08),
        rgba(59, 130, 246, 0.12),
        rgba(139, 92, 246, 0.08),
        transparent);
    transform: translateX(-120%);
    animation: search-scan 5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
    will-change: transform;
}

@keyframes search-scan {
    0%, 100% { transform: translateX(-120%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.8; }
    99% { transform: translateX(330%); opacity: 0; }
}

/* ---- 搜索输入框 ---- */
.search-fields input[type="text"],
.search-fields input[name="s"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #f1f5f9;
    min-width: 0;
    height: 64px;
    line-height: 64px;
    border-radius: 0;
    align-self: stretch;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.search-fields input[type="text"]::placeholder,
.search-fields input[name="s"]::placeholder {
    color: rgba(148, 163, 184, 0.55);
    font-size: 0.92rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.search-fields:focus-within input[type="text"]::placeholder,
.search-fields:focus-within input[name="s"]::placeholder {
    color: rgba(148, 163, 184, 0.4);
}

/* ---- 搜索按钮：菱形渐变水晶 ---- */
.search-fields .search-submit-btn,
.search-fields button[type="submit"] {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin: 6px 6px 6px 0;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg,
        #8b5cf6 0%,
        #3b82f6 50%,
        #ec4899 100%);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow:
        0 4px 20px rgba(139, 92, 246, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    z-index: 1;
}

/* 按钮高光层 */
.search-fields .search-submit-btn::before,
.search-fields button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.22) 0%,
        transparent 100%);
    border-radius: 14px 14px 0 0;
    pointer-events: none;
}

.search-fields .search-submit-btn:hover,
.search-fields button[type="submit"]:hover {
    background: linear-gradient(135deg,
        #a78bfa 0%,
        #60a5fa 50%,
        #f472b6 100%);
    box-shadow:
        0 8px 30px rgba(139, 92, 246, 0.65),
        0 0 25px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    transform: scale(1.1);
}

.search-fields .search-submit-btn:active,
.search-fields button[type="submit"]:active {
    transform: scale(0.94);
    box-shadow:
        0 3px 12px rgba(139, 92, 246, 0.35),
        inset 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

/* 按钮能量脉冲 */
.search-fields .search-submit-btn::after,
.search-fields button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(139, 92, 246, 0.5) 0%,
        transparent 70%);
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    animation: btn-energy-pulse 2.5s ease-out infinite;
    pointer-events: none;
}

@keyframes btn-energy-pulse {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.7; }
    60% { opacity: 0.2; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* ---- 按钮图标 ---- */
.search-btn-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

.search-fields .search-submit-btn:hover .search-btn-icon {
    transform: scale(1.2) rotate(-15deg);
}

/* ---- 水波纹层（点击） ---- */
.search-btn-ripple {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center,
        rgba(255, 255, 255, 0.45) 0%,
        transparent 65%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.search-fields .search-submit-btn:active .search-btn-ripple {
    opacity: 1;
    transform: scale(2.5);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

/* ============================================
   18.1 分类下拉框（霓虹游戏风格）
   ============================================ */

.search-select {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 1rem 0 1.1rem;
    margin: auto 0.4rem auto 0.5rem;
    position: relative;
}

/* 霓虹分隔线 */
.search-select::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5px;
    height: 32px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(139, 92, 246, 0.8) 25%,
        rgba(236, 72, 153, 0.6) 50%,
        rgba(139, 92, 246, 0.8) 75%,
        transparent 100%);
    border-radius: 2px;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.5);
}

/* 下拉框本体 */
.search-select .form-select {
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 10px;
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.12) 0%,
        rgba(59, 130, 246, 0.08) 50%,
        rgba(236, 72, 153, 0.06) 100%);
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 2.1rem 0.5rem 0.9rem;
    cursor: pointer;
    height: auto;
    min-height: 40px;
    line-height: 1.4;
    outline: none;
    transition: all 0.25s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 14px;
    min-width: 82px;
    max-width: 135px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.search-select .form-select:hover {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.22) 0%,
        rgba(59, 130, 246, 0.15) 50%,
        rgba(236, 72, 153, 0.1) 100%);
    color: #e9d5ff;
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.search-select .form-select:focus {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.3) 0%,
        rgba(59, 130, 246, 0.2) 50%,
        rgba(236, 72, 153, 0.12) 100%);
    color: #f3e8ff;
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25), 0 0 20px rgba(139, 92, 246, 0.2);
}

.search-select .form-select option {
    background: #1a1730;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 500;
}

.search-select .form-select option:first-child {
    color: #a78bfa;
    font-weight: 700;
}

/* ============================================
   18.2 首页/搜索页分类选择器补充
   ============================================ */

.search-bg .search-select .form-select,
.search-hero-form .search-select .form-select {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.18) 0%,
        rgba(59, 130, 246, 0.12) 100%);
    color: #ddd6fe;
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.search-bg .search-select .form-select:hover,
.search-hero-form .search-select .form-select:hover {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.3) 0%,
        rgba(59, 130, 246, 0.22) 100%);
    color: #f3e8ff;
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
}

.search-bg .search-select .form-select:focus,
.search-hero-form .search-select .form-select:focus {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.38) 0%,
        rgba(59, 130, 246, 0.28) 100%);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), 0 0 30px rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.8);
}

/* 首页分隔线增强 */
.search-bg .search-select::after,
.search-hero-form .search-select::after {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(139, 92, 246, 1) 25%,
        rgba(236, 72, 153, 0.8) 50%,
        rgba(139, 92, 246, 1) 75%,
        transparent 100%);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* ============================================
   18.3 深色模式适配
   ============================================ */

[data-bs-theme="dark"] .search-fields {
    background: linear-gradient(145deg,
        rgba(8, 8, 18, 0.99) 0%,
        rgba(15, 15, 30, 1) 100%);
    border-color: rgba(139, 92, 246, 0.4);
}

[data-bs-theme="dark"] .search-select .form-select {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.15) 0%,
        rgba(59, 130, 246, 0.1) 100%);
    color: #ddd6fe;
    border-color: rgba(139, 92, 246, 0.25);
}

[data-bs-theme="dark"] .search-select .form-select:hover {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.25) 0%,
        rgba(59, 130, 246, 0.18) 100%);
    color: #f5f3ff;
}

[data-bs-theme="dark"] .search-select .form-select:focus {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.35) 0%,
        rgba(59, 130, 246, 0.25) 100%);
    color: #fff;
}

[data-bs-theme="dark"] .search-select::after {
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(167, 139, 250, 0.6) 50%,
        transparent 100%);
}

/* ============================================
   18.4 响应式适配
   ============================================ */

@media (min-width: 768px) and (max-width: 991.98px) {
    .search-fields {
        min-height: 58px;
        border-radius: 16px;
    }
    .search-fields::before { border-radius: 17.5px; }
    .search-fields input[type="text"],
    .search-fields input[name="s"] {
        height: 58px;
        line-height: 58px;
        font-size: 0.95rem;
        padding: 0 1.25rem;
    }
    .search-select {
        padding: 0 0.8rem 0 0.9rem;
        margin: auto 0.3rem auto 0.4rem;
    }
    .search-select .form-select {
        min-width: 78px;
        max-width: 115px;
        font-size: 0.82rem;
        padding: 0.45rem 1.9rem 0.45rem 0.75rem;
        min-height: 38px;
    }
    .search-select::after { height: 28px; }
    .search-fields .search-submit-btn,
    .search-fields button[type="submit"] {
        width: 48px;
        height: 48px;
        margin: 5px 5px 5px 0;
    }
}

@media (max-width: 767.98px) {
    .search-fields {
        min-height: 58px;
        border-radius: 16px;
    }
    .search-fields::before { border-radius: 17.5px; }
    .search-select { display: none !important; }
    .search-fields input[type="text"],
    .search-fields input[name="s"] {
        height: 58px;
        line-height: 58px;
        padding: 0 1.1rem;
        font-size: 16px;
        color: #f1f5f9;
    }
    .search-fields input[type="text"]::placeholder,
    .search-fields input[name="s"]::placeholder {
        font-size: 0.88rem;
        color: rgba(148, 163, 184, 0.55);
    }
    .search-fields .search-submit-btn,
    .search-fields button[type="submit"] {
        width: 48px;
        height: 48px;
        margin: 5px 5px 5px 0;
        border-radius: 13px;
    }
    .search-fields::after { animation: none; }
    .search-fields:focus-within {
        box-shadow:
            0 10px 40px rgba(139, 92, 246, 0.25),
            0 0 0 0 transparent,
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            0 0 50px rgba(139, 92, 246, 0.15);
    }
}

@media (max-width: 374px) {
    .search-fields {
        min-height: 54px;
        border-radius: 14px;
    }
    .search-fields::before { border-radius: 15.5px; }
    .search-fields input[type="text"],
    .search-fields input[name="s"] {
        height: 54px;
        line-height: 54px;
        padding: 0 0.9rem;
        font-size: 15px;
    }
    .search-fields .search-submit-btn,
    .search-fields button[type="submit"] {
        width: 44px;
        height: 44px;
        margin: 5px 5px 5px 0;
        border-radius: 11px;
    }
}

/* ============================================
   18.5 分类快捷按钮 · 游戏芯片标签
   ============================================ */

.search-quick-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.25rem;
    animation: hero-title-fadein 0.7s 0.3s ease both;
}

/* 游戏芯片按钮 */
.search-quick-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.48rem 1.1rem;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    letter-spacing: 0.3px;
}

/* 扫光 */
.search-quick-cat-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
    transform: translateX(-120%);
    transition: transform 0.5s ease;
    pointer-events: none;
}
.search-quick-cat-btn:hover::before { transform: translateX(120%); }

/* 悬停：霓虹激活 */
.search-quick-cat-btn:hover {
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.35) 0%,
        rgba(59, 130, 246, 0.25) 100%);
    color: #f3e8ff;
    border-color: rgba(139, 92, 246, 0.7);
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.3),
                0 0 20px rgba(139, 92, 246, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.search-quick-cat-btn:hover i {
    color: #a78bfa;
    transform: rotate(-8deg) scale(1.2);
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.6));
}

.search-quick-cat-btn:hover em {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.search-quick-cat-btn:active {
    transform: translateY(-1px) scale(0.97);
    transition: all 0.1s ease;
}

.search-quick-cat-btn i {
    font-size: 0.85rem;
    color: #a78bfa;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-quick-cat-btn span {
    letter-spacing: 0.3px;
    line-height: 1;
}

/* 计数徽章 */
.search-quick-cat-btn em {
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    padding: 0 0.35rem;
    letter-spacing: 0;
    transition: all 0.28s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* 交错入场 */
.search-quick-cat-btn:nth-child(1) { animation-delay: 0.32s; }
.search-quick-cat-btn:nth-child(2) { animation-delay: 0.40s; }
.search-quick-cat-btn:nth-child(3) { animation-delay: 0.48s; }
.search-quick-cat-btn:nth-child(4) { animation-delay: 0.56s; }
.search-quick-cat-btn:nth-child(5) { animation-delay: 0.64s; }
.search-quick-cat-btn:nth-child(6) { animation-delay: 0.72s; }

/* 侧边栏场景 */
.widget .search-quick-cats,
.sidebar .search-quick-cats {
    margin-top: 0.75rem;
    gap: 0.4rem;
}
.widget .search-quick-cat-btn,
.sidebar .search-quick-cat-btn {
    background: rgba(139, 92, 246, 0.06);
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.2);
    font-size: 0.78rem;
    padding: 0.35rem 0.85rem;
}
.widget .search-quick-cat-btn:hover,
.sidebar .search-quick-cat-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.widget .search-quick-cat-btn em,
.sidebar .search-quick-cat-btn em {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}
.widget .search-quick-cat-btn:hover em,
.sidebar .search-quick-cat-btn:hover em {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* 响应式 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .search-quick-cats { gap: 0.5rem; }
    .search-quick-cat-btn { font-size: 0.8rem; padding: 0.42rem 0.9rem; }
    .search-quick-cat-btn em { font-size: 0.65rem; min-width: 18px; height: 18px; line-height: 18px; }
}
@media (max-width: 767.98px) {
    .search-quick-cats { gap: 0.4rem; margin-top: 0.9rem; padding: 0 0.5rem; }
    .search-quick-cat-btn { font-size: 0.76rem; padding: 0.38rem 0.8rem; gap: 0.38rem; }
    .search-quick-cat-btn i { font-size: 0.78rem; }
    .search-quick-cat-btn em { font-size: 0.63rem; min-width: 17px; height: 17px; line-height: 17px; padding: 0 0.28rem; }
}
@media (max-width: 374px) {
    .search-quick-cats { gap: 0.3rem; }
    .search-quick-cat-btn { font-size: 0.72rem; padding: 0.32rem 0.7rem; }
}

/* ============================================
   18.6 教程按钮组 · 游戏霓虹风格
   ============================================ */

.search-tutorial-btns {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1.4rem;
    animation: hero-title-fadein 0.7s 0.4s ease both;
}

.search-tutorial-btns .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

/* 高光层 */
.search-tutorial-btns .btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    pointer-events: none;
}

/* 扫光 */
.search-tutorial-btns .btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.search-tutorial-btns .btn:hover::after { transform: translateX(120%); }

.search-tutorial-btns .btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.22);
    text-decoration: none;
}
.search-tutorial-btns .btn:active {
    transform: translateY(-1px) scale(0.97);
    transition: all 0.1s ease;
}

.search-tutorial-btns .btn i {
    font-size: 0.92rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}
.search-tutorial-btns .btn:hover i {
    transform: scale(1.2) rotate(-8deg);
}

/* 各色按钮 */
.search-tutorial-btns .btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
}
.search-tutorial-btns .btn-primary:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.5);
}

.search-tutorial-btns .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}
.search-tutorial-btns .btn-success:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
}

.search-tutorial-btns .btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
}
.search-tutorial-btns .btn-info:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.5);
}

.search-tutorial-btns .btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}
.search-tutorial-btns .btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 12px 35px rgba(245, 158, 11, 0.5);
}

.search-tutorial-btns .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}
.search-tutorial-btns .btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    box-shadow: 0 12px 35px rgba(239, 68, 68, 0.5);
}

.search-tutorial-btns .btn-secondary {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #e2e8f0;
}
.search-tutorial-btns .btn-secondary:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    box-shadow: 0 12px 35px rgba(71, 85, 105, 0.5);
}

.search-tutorial-btns .btn-light {
    background: rgba(241, 245, 249, 0.15);
    color: #f1f5f9;
    border: 1px solid rgba(241, 245, 249, 0.25);
    backdrop-filter: blur(8px);
}
.search-tutorial-btns .btn-light:hover {
    background: rgba(241, 245, 249, 0.25);
    color: #fff;
    box-shadow: 0 12px 35px rgba(241, 245, 249, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.search-tutorial-btns .btn-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    border: 1px solid rgba(139, 92, 246, 0.25);
}
.search-tutorial-btns .btn-dark:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.5),
                0 0 20px rgba(139, 92, 246, 0.2);
}

/* 响应式 */
@media (max-width: 767.98px) {
    .search-tutorial-btns { margin-top: 1rem; gap: 0.45rem; padding: 0 0.5rem; }
    .search-tutorial-btns .btn { font-size: 0.83rem; padding: 0.5rem 1.2rem; }
    .search-tutorial-btns .btn i { font-size: 0.88rem; }
}
@media (max-width: 374px) {
    .search-tutorial-btns { gap: 0.35rem; }
    .search-tutorial-btns .btn { font-size: 0.78rem; padding: 0.45rem 1rem; }
}


/* ============================================
   19. 搜索结果页 (archive-hero) 专项优化
   ============================================ */

/* 搜索页 hero 容器 */
.search-archive-hero {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

/* 搜索页动态渐变背景层 */
.search-archive-hero .archive-hero-bg {
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e, #0f0c29);
    background-size: 400% 400%;
    animation: search-page-gradient 14s ease infinite;
}

@keyframes search-page-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 半透明渐变覆盖层 */
.search-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(102,126,234,0.25) 0%,
        rgba(168,85,247,0.18) 50%,
        rgba(240,147,251,0.12) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* 粒子画布容器 */
.search-hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.search-hero-particles canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* 搜索页内容层级 */
.search-archive-hero .container {
    position: relative;
    z-index: 3;
}

/* 搜索结果标题 */
.search-archive-hero .archive-title {
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: hero-title-fadein 0.6s ease both;
}

@keyframes hero-title-fadein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 搜索结果描述 */
.search-archive-hero .archive-desc {
    color: rgba(255,255,255,0.80);
    text-shadow: 0 1px 8px rgba(0,0,0,0.25);
    animation: hero-title-fadein 0.6s 0.12s ease both;
}

/* 搜索页内嵌搜索框容器 */
.search-hero-form {
    animation: hero-title-fadein 0.6s 0.24s ease both;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* 外框：游戏深色终端风格 */
.search-hero-form .search-form {
    background: rgba(10, 8, 28, 0.72);
    border-radius: 22px;
    padding: 6px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(139, 92, 246, 0.45);
    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(139, 92, 246, 0.12),
        0 0 70px rgba(139, 92, 246, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* hero 内部搜索字段：游戏深色终端 */
.search-hero-form .search-fields {
    background: linear-gradient(145deg,
        rgba(13, 13, 28, 0.96) 0%,
        rgba(22, 22, 42, 0.98) 100%);
    border-radius: 16px;
    border: none;
    min-height: 58px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* hero 内输入框文字颜色 */
.search-hero-form .search-fields input[type="text"],
.search-hero-form .search-fields input[name="s"] {
    color: #f1f5f9;
    height: 58px;
    line-height: 58px;
}

/* hero 内聚焦：只发光，不上浮 */
.search-hero-form .search-fields:focus-within {
    box-shadow:
        0 0 0 2px rgba(139, 92, 246, 0.55),
        0 0 35px rgba(139, 92, 246, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: none;
    border-color: transparent;
}

/* hero 内搜索按钮尺寸 */
.search-hero-form .search-fields .search-submit-btn,
.search-hero-form .search-fields button[type="submit"] {
    width: 50px;
    height: 50px;
    margin: 4px 4px 4px 0;
    border-radius: 13px;
}

/* hero 内下拉框 */
.search-hero-form .search-select .form-select {
    background: linear-gradient(145deg,
        rgba(139, 92, 246, 0.18) 0%,
        rgba(59, 130, 246, 0.12) 100%);
    color: #ddd6fe;
    border-color: rgba(139, 92, 246, 0.35);
}

/* hero 分隔线 */
.search-hero-form .search-select {
    border-right-color: rgba(139, 92, 246, 0.35);
}

/* 平板端 768–991px */
@media (min-width: 768px) and (max-width: 991.98px) {
    .search-hero-form {
        max-width: 640px;
        padding: 0 0.75rem;
    }
    .search-archive-hero {
        min-height: 260px;
    }
    .search-hero-form .search-form {
        border-radius: 18px;
        padding: 5px;
    }
    .search-hero-form .search-fields {
        border-radius: 14px;
        min-height: 54px;
    }
    .search-hero-form .search-fields input[type="text"],
    .search-hero-form .search-fields input[name="s"] {
        height: 54px;
        line-height: 54px;
    }
    .search-hero-form .search-fields .search-submit-btn,
    .search-hero-form .search-fields button[type="submit"] {
        width: 46px;
        height: 46px;
        margin: 4px 4px 4px 0;
        border-radius: 12px;
    }
}





/* ============================================
   21. 移动端搜索体验专项（游戏主题优化）
   ============================================ */

@media (max-width: 767.98px) {

    /* 搜索页 hero */
    .search-archive-hero {
        min-height: 180px;
    }

    .search-archive-hero .archive-title {
        font-size: 1.4rem;
        text-shadow: 0 2px 20px rgba(139, 92, 246, 0.4);
    }

    /* hero 内嵌搜索框 */
    .search-hero-form {
        max-width: 100%;
        padding: 0 0.75rem;
        width: 100%;
    }

    .search-hero-form .search-form {
        border-radius: 16px;
        padding: 5px;
        background: rgba(10, 8, 28, 0.82);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1.5px solid rgba(139, 92, 246, 0.35);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.12);
    }

    .search-hero-form .search-fields {
        background: linear-gradient(145deg,
            rgba(13, 13, 28, 0.97) 0%,
            rgba(22, 22, 42, 0.99) 100%);
        border-radius: 13px;
        min-height: 52px;
    }

    /* 移动端搜索字段高度 */
    .search-bg .search-fields input[type="text"],
    .search-bg .search-fields input[name="s"],
    .search-hero-form .search-fields input[type="text"],
    .search-hero-form .search-fields input[name="s"] {
        font-size: 16px;    /* 防止 iOS 放大 */
        padding: 0 1rem;
        height: 52px;
        line-height: 52px;
        color: #f1f5f9;
    }

    /* 移动端搜索按钮 */
    .search-bg .search-fields .search-submit-btn,
    .search-bg .search-fields button[type="submit"],
    .search-hero-form .search-fields .search-submit-btn,
    .search-hero-form .search-fields button[type="submit"] {
        width: 46px;
        height: 46px;
        margin: 3px 3px 3px 0;
        border-radius: 12px;
    }

    /* 粒子动画透明度降低节省性能 */
    .search-hero-particles {
        opacity: 0.5;
    }
}

/* 超小屏 */
@media (max-width: 374px) {
    .search-bg .search-fields input[type="text"],
    .search-bg .search-fields input[name="s"],
    .search-hero-form .search-fields input[type="text"],
    .search-hero-form .search-fields input[name="s"] {
        padding: 0 0.875rem;
        height: 48px;
        line-height: 48px;
    }

    .search-bg .search-fields .search-submit-btn,
    .search-bg .search-fields button[type="submit"],
    .search-hero-form .search-fields .search-submit-btn,
    .search-hero-form .search-fields button[type="submit"] {
        width: 42px;
        height: 42px;
        border-radius: 10px;
    }
}

/* 深色模式适配 - 游戏主题已默认深色 */
[data-bs-theme="dark"] .search-bg .search-fields {
    background: linear-gradient(145deg, 
        rgba(10, 10, 20, 0.98) 0%, 
        rgba(20, 20, 35, 0.99) 100%);
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(139, 92, 246, 0.15),
        0 0 30px rgba(139, 92, 246, 0.1);
}

[data-bs-theme="dark"] .search-bg .search-fields input[type="text"],
[data-bs-theme="dark"] .search-bg .search-fields input[name="s"] {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .search-bg .search-fields input[type="text"]::placeholder,
[data-bs-theme="dark"] .search-bg .search-fields input[name="s"]::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* 搜索页 hero 深色模式 */
[data-bs-theme="dark"] .search-hero-form .search-fields {
    background: linear-gradient(145deg, 
        rgba(15, 15, 30, 0.95) 0%, 
        rgba(25, 25, 45, 0.98) 100%);
}


/* ============================================
   22. 搜索按钮全局可见性兜底（游戏主题风格）
   ============================================ */

/* 保证按钮在所有 search-fields 内强制可见 */
.search-fields .search-submit-btn,
.search-fields button[type="submit"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 侧边栏 / widget 内的搜索框按钮 – 游戏风格兜底 */
.widget .search-fields .search-submit-btn,
.widget .search-fields button[type="submit"],
.sidebar .search-fields .search-submit-btn,
.sidebar .search-fields button[type="submit"] {
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin: 3px 3px 3px 0;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.95) 0%, 
        rgba(59, 130, 246, 0.95) 50%,
        rgba(236, 72, 153, 0.95) 100%);
    color: #fff;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.widget .search-fields .search-submit-btn::before,
.widget .search-fields button[type="submit"]::before,
.sidebar .search-fields .search-submit-btn::before,
.sidebar .search-fields button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 11px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 50%,
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
}

.widget .search-fields .search-submit-btn:hover,
.widget .search-fields button[type="submit"]:hover,
.sidebar .search-fields .search-submit-btn:hover,
.sidebar .search-fields button[type="submit"]:hover {
    background: linear-gradient(135deg, 
        rgba(167, 139, 250, 0.98) 0%, 
        rgba(96, 165, 250, 0.98) 50%,
        rgba(244, 114, 182, 0.98) 100%);
    box-shadow: 
        0 6px 25px rgba(139, 92, 246, 0.55),
        0 0 20px rgba(139, 92, 246, 0.3);
    transform: scale(1.08);
}

/* navbar / header 内嵌搜索框兜底 */
.site-header .search-fields .search-submit-btn,
.site-header .search-fields button[type="submit"],
.navbar .search-fields .search-submit-btn,
.navbar .search-fields button[type="submit"] {
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin: 2px 2px 2px 0;
    border-radius: 10px;
}

/* 深色模式下搜索按钮保持游戏风格 */
[data-bs-theme="dark"] .search-fields .search-submit-btn,
[data-bs-theme="dark"] .search-fields button[type="submit"] {
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.95) 0%, 
        rgba(59, 130, 246, 0.95) 50%,
        rgba(236, 72, 153, 0.95) 100%) !important;
    color: #fff !important;
    box-shadow: 
        0 4px 15px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 搜索按钮图标（.search-btn-icon）强制可见 */
.search-btn-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: inherit;
    line-height: 1;
    pointer-events: none;
}

/* 首页搜索框放大镜图标 - 强制高可见度样式 */
.search-btn-icon i,
.search-btn-icon .fa-search,
.search-submit-btn i,
.search-submit-btn .fa-search,
.search-bg .search-btn-icon i,
.search-bg .fa-search,
.search-hero-form .search-btn-icon i,
.search-hero-form .fa-search,
.search-fields button i,
.search-fields button .fa-search {
    color: #fff !important;
    opacity: 1 !important;
    font-size: 1.25em !important;
    font-weight: 900 !important;
    text-shadow: 
        0 0 1px rgba(0,0,0,0.8),
        0 1px 2px rgba(0,0,0,0.6),
        0 0 8px rgba(255,255,255,0.4) !important;
    -webkit-text-stroke: 0.5px rgba(0,0,0,0.3);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* 深色模式下搜索图标保持高可见度 */
[data-bs-theme="dark"] .search-btn-icon i,
[data-bs-theme="dark"] .search-submit-btn i,
[data-bs-theme="dark"] .search-fields button i {
    color: #fff !important;
    text-shadow: 
        0 0 2px rgba(255,255,255,0.8),
        0 0 10px rgba(102,126,234,0.6) !important;
}


/* ============================================
   23. 320px 超窄屏幕溢出修复 & 全站弹窗移动保护
   ============================================ */

/* 320px 超窄屏容器防溢出 */
@media (max-width: 360px) {
    .container,
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .card-body {
        padding: .75rem !important;
    }
    .price-card {
        margin-bottom: 1rem;
    }
    /* 防止固定宽度组件溢出 */
    .price-ammount {
        font-size: 1.75rem !important;
    }
    .rihide-vip-gate {
        padding: .75rem !important;
    }
}

/* Bootstrap 模态框移动端保护 */
@media (max-width: 600px) {
    .modal-dialog {
        max-width: 90vw !important;
        margin: 5vh auto !important;
    }
    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
    }
    /* 表单控件最小触摸目标 */
    .modal-body .form-control,
    .modal-body .btn,
    .modal-footer .btn {
        min-height: 44px !important;
    }
    .modal-body .form-control {
        font-size: 16px !important; /* 防 iOS 自动缩放 */
    }
}

/* ============================================
   24. 移动端补充优化（游戏主题）
   ============================================ */

@media (max-width: 767.98px) {

    /* 热词标签移动端紧凑 */
    .search-bg .search-hots {
        margin-top: 1rem;
        gap: 0.45rem;
        padding: 0 0.5rem;
    }

    .search-bg .search-hots span a {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }

    .search-bg .search-hots > span:first-child {
        font-size: 0.75rem;
    }

    /* 侧边栏/widget 搜索框移动端 */
    .widget .search-fields,
    .sidebar .search-fields {
        min-height: 52px;
    }

    .widget .search-fields input[type="text"],
    .widget .search-fields input[name="s"],
    .sidebar .search-fields input[type="text"],
    .sidebar .search-fields input[name="s"] {
        height: 52px;
        line-height: 52px;
        font-size: 16px;
        padding: 0 1rem;
    }

    .widget .search-fields .search-submit-btn,
    .widget .search-fields button[type="submit"],
    .sidebar .search-fields .search-submit-btn,
    .sidebar .search-fields button[type="submit"] {
        width: 44px;
        height: 44px;
        margin: 4px 4px 4px 0;
    }
}

@media (max-width: 374px) {
    .search-bg .search-hots span a {
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }

    .widget .search-fields,
    .sidebar .search-fields {
        min-height: 48px;
    }

    .widget .search-fields input[type="text"],
    .widget .search-fields input[name="s"],
    .sidebar .search-fields input[type="text"],
    .sidebar .search-fields input[name="s"] {
        height: 48px;
        line-height: 48px;
        font-size: 15px;
        padding: 0 0.875rem;
    }

    .widget .search-fields .search-submit-btn,
    .widget .search-fields button[type="submit"],
    .sidebar .search-fields .search-submit-btn,
    .sidebar .search-fields button[type="submit"] {
        width: 40px;
        height: 40px;
        margin: 4px 4px 4px 0;
    }
}


/* ============================================
   25. 热门排行榜模块（home-hot-posts）- XDGAME风格重制版
   ============================================ */

/* ---- 整体布局：左50% 分类导航 + 右50% 三榜水平并排 ---- */
.ri-hot-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #e4e7f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 14px rgba(0,0,0,.07);
}
[data-bs-theme="dark"] .ri-hot-wrap {
    background: #1a1b2e;
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 2px 14px rgba(0,0,0,.4);
}

/* ---- 左侧分类导航 - 50% ---- */
.ri-hot-sidenav {
    flex: 0 0 50%;
    max-width: 50%;
    border-right: 1px solid #e4e7f0;
    background: linear-gradient(160deg, #f9fafc 0%, #f5f7fc 100%);
    display: flex;
    flex-direction: column;
}
[data-bs-theme="dark"] .ri-hot-sidenav {
    background: linear-gradient(160deg, #111827 0%, #0f172a 100%);
    border-right-color: rgba(255,255,255,.08);
}

.ri-hot-sidenav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 1px solid #e4e7f0;
    background: linear-gradient(135deg, #edf0f7 0%, #e3e8f5 100%);
    letter-spacing: .4px;
    flex-shrink: 0;
}
[data-bs-theme="dark"] .ri-hot-sidenav-title {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom-color: rgba(255,255,255,.08);
    color: #e2e8f0;
}
.ri-hot-sidenav-title i {
    color: #667eea;
    font-size: 0.85rem;
}

/* ---- 顶部单排分类标签 ---- */
.ri-sidenav-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow: hidden;          /* 只显示一排，多余隐藏 */
    gap: 4px;
    padding: 7px 10px 6px;
    border-bottom: 1px solid #e4e7f0;
    background: rgba(249,250,252,.9);
    flex-shrink: 0;
    align-items: center;
}
[data-bs-theme="dark"] .ri-sidenav-tabs {
    background: rgba(15,23,42,.5);
    border-bottom-color: rgba(255,255,255,.07);
}

.ri-sidenav-tab {
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    padding: 3px 9px;
    border-radius: 20px;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ri-sidenav-tab:hover {
    color: #4f46e5;
    background: rgba(79,70,229,.07);
    text-decoration: none;
}
.ri-sidenav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 2px 6px rgba(102,126,234,.3);
}
[data-bs-theme="dark"] .ri-sidenav-tab {
    color: #64748b;
}
[data-bs-theme="dark"] .ri-sidenav-tab:hover {
    color: #a78bfa;
    background: rgba(139,92,246,.1);
}
[data-bs-theme="dark"] .ri-sidenav-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

/* ---- 分类内容面板区域 ---- */
.ri-sidenav-panels {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}
.ri-sidenav-panel {
    display: none;
    animation: riHotFadeIn .28s ease;
}
.ri-sidenav-panel.active {
    display: block;
}

/* ---- 分类面板条目（列表模式备用） ---- */
.ri-sidenav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 5px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .14s ease;
}
.ri-sidenav-item:last-child { border-bottom: none; }
.ri-sidenav-item:hover { background: #fafbff; }
[data-bs-theme="dark"] .ri-sidenav-item { border-bottom-color: rgba(255,255,255,.05); }
[data-bs-theme="dark"] .ri-sidenav-item:hover { background: rgba(139,92,246,.06); }

.ri-sidenav-item-body {
    flex: 1;
    min-width: 0;
}

/* ============================================
   左侧分类封面网格卡片（ri-cat-grid）
   ============================================ */

/* 网格容器 */
.ri-cat-grid {
    display: grid;
    gap: 7px;
    padding: 8px 9px;
}
.ri-cat-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ri-cat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ri-cat-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 卡片主体 */
.ri-cat-card {
    display: block;
    text-decoration: none;
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eaecf0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    cursor: pointer;
}
.ri-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,.14);
    border-color: rgba(102,126,234,.35);
    text-decoration: none;
}
[data-bs-theme="dark"] .ri-cat-card {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.07);
}
[data-bs-theme="dark"] .ri-cat-card:hover {
    border-color: rgba(139,92,246,.4);
    box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

/* 封面图区域：4:3 横向比例 */
.ri-cat-card-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 75%;    /* 4:3 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #dde4f5 0%, #c8d4f0 100%);
    flex-shrink: 0;
}
[data-bs-theme="dark"] .ri-cat-card-thumb {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}
.ri-cat-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .32s ease;
}
.ri-cat-card:hover .ri-cat-card-thumb img {
    transform: scale(1.1);
}

/* 无封面时的占位图标 */
.ri-cat-card-nothumb {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: rgba(99,102,241,.35);
}

/* 悬浮星级覆盖层 */
.ri-cat-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 5px 4px;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .22s ease, transform .22s ease;
}
.ri-cat-card:hover .ri-cat-card-overlay {
    opacity: 1;
    transform: translateY(0);
}
/* 覆盖层内星级颜色 */
.ri-cat-card-overlay .ri-stars .ri-star-filled,
.ri-cat-card-overlay .ri-stars .fas.fa-star {
    color: #fbbf24;
    font-size: .62rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.ri-cat-card-overlay .ri-stars .ri-star-empty,
.ri-cat-card-overlay .ri-stars .far.fa-star {
    color: rgba(255,255,255,.35);
    font-size: .62rem;
}

/* 游戏标题 */
.ri-cat-card-title {
    padding: 4px 5px 5px;
    font-size: .68rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    background: #fff;
    transition: color .16s ease;
}
.ri-cat-card:hover .ri-cat-card-title { color: #4f46e5; }
[data-bs-theme="dark"] .ri-cat-card-title {
    background: transparent;
    color: #cbd5e1;
}
[data-bs-theme="dark"] .ri-cat-card:hover .ri-cat-card-title { color: #a78bfa; }

/* 暂无数据（网格模式） */
.ri-sidenav-panel .ri-rank-empty {
    padding: 1.5rem 0.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: .82rem;
}

/* ============================================
   左侧分类圆形头像列表（ri-cat-avatar-list）
   ============================================ */

/* 列表容器 */
.ri-cat-avatar-list {
    display: flex;
    flex-direction: column;
    padding: 5px 0;
}

/* 列表条目 */
.ri-cat-avatar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 6px;
    margin: 1px 4px;
    transition: background .14s ease;
}
.ri-cat-avatar-item:hover {
    background: rgba(99,102,241,.07);
    text-decoration: none;
}
[data-bs-theme="dark"] .ri-cat-avatar-item:hover {
    background: rgba(139,92,246,.1);
}

/* 圆形头像 */
.ri-cat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.ri-cat-avatar-item:hover .ri-cat-avatar {
    border-color: #a78bfa;
    transform: scale(1.06);
    box-shadow: 0 2px 10px rgba(167,139,250,.3);
}
.ri-cat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .22s ease;
}
.ri-cat-avatar-item:hover .ri-cat-avatar img {
    transform: scale(1.12);
}

/* 头像无图占位图标 */
.ri-cat-avatar.ri-cat-avatar-empty {
    background: linear-gradient(135deg, #e8ecf8 0%, #d8e2f8 100%);
}
.ri-cat-avatar-empty i {
    color: rgba(99,102,241,.4);
    font-size: 0.9rem;
}
[data-bs-theme="dark"] .ri-cat-avatar {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.1);
}
[data-bs-theme="dark"] .ri-cat-avatar-item:hover .ri-cat-avatar {
    border-color: rgba(167,139,250,.55);
    box-shadow: 0 2px 10px rgba(139,92,246,.25);
}
[data-bs-theme="dark"] .ri-cat-avatar.ri-cat-avatar-empty {
    background: rgba(99,102,241,.1);
}
[data-bs-theme="dark"] .ri-cat-avatar-empty i {
    color: rgba(139,92,246,.5);
}

/* 内容区：标题 + 星级 */
.ri-cat-avatar-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ri-cat-avatar-title {
    display: block;
    font-size: 0.77rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    transition: color .16s ease;
}
.ri-cat-avatar-item:hover .ri-cat-avatar-title {
    color: #4f46e5;
}
[data-bs-theme="dark"] .ri-cat-avatar-title {
    color: #cbd5e1;
}
[data-bs-theme="dark"] .ri-cat-avatar-item:hover .ri-cat-avatar-title {
    color: #a78bfa;
}

/* 星级行 */
.ri-cat-avatar-stars .ri-stars { gap: 1px; }
.ri-cat-avatar-stars .ri-stars .fas.fa-star {
    color: #f59e0b;
    font-size: .55rem;
}
.ri-cat-avatar-stars .ri-stars .far.fa-star {
    color: #d1d5db;
    font-size: .55rem;
}
[data-bs-theme="dark"] .ri-cat-avatar-stars .ri-stars .far.fa-star {
    color: rgba(255,255,255,.18);
}

/* 响应式：小屏尿头像稍小 */
@media (max-width: 640px) {
    .ri-cat-avatar {
        width: 34px;
        height: 34px;
    }
    .ri-cat-avatar-title {
        font-size: 0.72rem;
    }
}
@media (max-width: 480px) {
    .ri-cat-avatar {
        width: 30px;
        height: 30px;
    }
    .ri-cat-avatar-item {
        padding: 4px 8px;
        gap: 7px;
    }
}

/* ---- 右侧排行榜容器 - Tab 切换布局 ---- */
.ri-hot-boards {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    flex-direction: column;
}

/* ---- Tab 导航栏 ---- */
.ri-hot-tab-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 11px 12px 10px;
    border-bottom: 2px solid #e4e7f0;
    background: linear-gradient(135deg, #f9fafc 0%, #f3f6fc 100%);
}
[data-bs-theme="dark"] .ri-hot-tab-nav {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-bottom-color: rgba(255,255,255,.08);
}

.ri-hot-tab {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s ease;
    letter-spacing: .3px;
    position: relative;
}
.ri-hot-tab:hover {
    color: #4f46e5;
    background: rgba(79,70,229,.06);
    text-decoration: none;
}
.ri-hot-tab.active {
    color: #4f46e5;
    background: rgba(79,70,229,.1);
}
.ri-hot-tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}
[data-bs-theme="dark"] .ri-hot-tab {
    color: #94a3b8;
}
[data-bs-theme="dark"] .ri-hot-tab:hover {
    color: #a78bfa;
    background: rgba(139,92,246,.1);
}
[data-bs-theme="dark"] .ri-hot-tab.active {
    color: #a78bfa;
    background: rgba(139,92,246,.15);
}

.ri-hot-tab-sep {
    color: #d1d5db;
    font-size: 0.8rem;
    font-weight: 300;
    user-select: none;
}
[data-bs-theme="dark"] .ri-hot-tab-sep {
    color: rgba(255,255,255,.15);
}

/* ---- Tab 面板切换 ---- */
.ri-hot-tab-panel {
    display: none;
    flex: 1;
}
.ri-hot-tab-panel.active {
    display: block;
    animation: riHotFadeIn .32s ease;
}
@keyframes riHotFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- 排行榜列表 ---- */
.ri-hot-rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ri-rank-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px 6px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .14s ease;
}
.ri-rank-item:last-child { border-bottom: none; }
.ri-rank-item:hover { background: #fafbff; }
[data-bs-theme="dark"] .ri-rank-item { border-bottom-color: rgba(255,255,255,.05); }
[data-bs-theme="dark"] .ri-rank-item:hover { background: rgba(139,92,246,.06); }

/* ---- 排行内容区 ---- */
.ri-rank-content {
    flex: 1;
    min-width: 0;
}

/* ---- 特色卡片（带缩略图详情） ---- */
.ri-rank-featured .ri-rank-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 5px;
}

/* ---- 排行条目星级行 ---- */
.ri-rank-stars {
    display: flex;
    align-items: center;
    margin-top: 2px;
}
.ri-rank-stars .ri-stars {
    gap: 2px;
}
.ri-rank-stars .ri-stars .ri-star-filled,
.ri-rank-stars .ri-stars .fas.fa-star {
    color: #f59e0b;
    font-size: .6rem;
}
.ri-rank-stars .ri-stars .ri-star-empty,
.ri-rank-stars .ri-stars .far.fa-star {
    color: #d1d5db;
    font-size: .6rem;
}
[data-bs-theme="dark"] .ri-rank-stars .ri-stars .ri-star-empty,
[data-bs-theme="dark"] .ri-rank-stars .ri-stars .far.fa-star {
    color: rgba(255,255,255,.18);
}

/* ---- 五角星评分（通用） ---- */
.ri-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    vertical-align: middle;
}
.ri-stars .fas.fa-star {
    color: #f59e0b;
    font-size: .65rem;
}
.ri-stars .far.fa-star {
    color: #d1d5db;
    font-size: .65rem;
}
[data-bs-theme="dark"] .ri-stars .far.fa-star {
    color: rgba(255,255,255,.2);
}

/* ---- 暂无数据 ---- */
.ri-rank-empty {
    padding: 2rem 0.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: .82rem;
    list-style: none;
}

/* 序号徽章 */
.ri-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: .7rem;
    font-style: normal;
    font-weight: 700;
    background: #e5e7eb;
    color: #6b7280;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}
.ri-rank-1 { background: linear-gradient(135deg,#ef4444,#dc2626) !important; color: #fff !important; box-shadow: 0 1px 4px rgba(239,68,68,.4); }
.ri-rank-2 { background: linear-gradient(135deg,#f97316,#ea580c) !important; color: #fff !important; box-shadow: 0 1px 4px rgba(249,115,22,.4); }
.ri-rank-3 { background: linear-gradient(135deg,#eab308,#ca8a04) !important; color: #fff !important; box-shadow: 0 1px 4px rgba(234,179,8,.4); }
[data-bs-theme="dark"] .ri-rank-num {
    background: rgba(255,255,255,.08);
    color: #94a3b8;
}

/* 圆形封面头像 */
.ri-rank-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e5e7eb;
    transition: border-color .18s ease;
}
.ri-rank-item:hover .ri-rank-avatar {
    border-color: #a78bfa;
}
.ri-rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .22s ease;
}
.ri-rank-item:hover .ri-rank-avatar img {
    transform: scale(1.1);
}
.ri-rank-avatar-empty {
    color: #c0c4cf;
    font-size: 0.82rem;
}
[data-bs-theme="dark"] .ri-rank-avatar {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.1);
}
[data-bs-theme="dark"] .ri-rank-item:hover .ri-rank-avatar {
    border-color: rgba(167,139,250,.5);
}
[data-bs-theme="dark"] .ri-rank-avatar-empty {
    color: rgba(255,255,255,.25);
}

/* 标题（单行截断） */
.ri-board-tit {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
    transition: color .16s ease;
    vertical-align: middle;
}
.ri-board-tit:hover { 
    color: #ef4444; 
    text-decoration: none;
}
[data-bs-theme="dark"] .ri-board-tit { color: #e2e8f0; }
[data-bs-theme="dark"] .ri-board-tit:hover { color: #f87171; }

/* 缩略图 */
.ri-board-thumb {
    flex-shrink: 0;
    display: block;
    width: 54px;
    height: 36px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.07);
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
}
.ri-board-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .28s ease;
}
.ri-rank-item:hover .ri-board-thumb img { transform: scale(1.09); }

/* 分类+星级+查看 */
.ri-board-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ri-board-cat {
    font-style: normal;
    font-size: .72rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
[data-bs-theme="dark"] .ri-board-cat { color: #94a3b8; }

/* 查看按钮 */
.ri-board-view {
    display: inline-block;
    font-size: .68rem;
    padding: 2px 7px;
    border-radius: 3px;
    background: #f1f2f5;
    color: #374151;
    text-decoration: none;
    transition: all .16s ease;
    width: fit-content;
    font-weight: 500;
    border: 1px solid rgba(0,0,0,.06);
}
.ri-board-view:hover { background: #ef4444; color: #fff; text-decoration: none; border-color: #ef4444; }
[data-bs-theme="dark"] .ri-board-view { background: rgba(255,255,255,.07); color: #cbd5e1; border-color: rgba(255,255,255,.08); }
[data-bs-theme="dark"] .ri-board-view:hover { background: #f87171; color: #fff; border-color: #f87171; }

/* ---- 响应式适配 ---- */

/* 小屏幕：分类导航缩小到 38% */
@media (max-width: 1024px) {
    .ri-hot-sidenav { flex: 0 0 38%; max-width: 38%; }
    .ri-hot-boards  { flex: 0 0 62%; max-width: 62%; }
    .ri-cat-grid { gap: 5px; padding: 6px 7px; }
}

/* 平板：左右南北 40/60 */
@media (max-width: 860px) {
    .ri-hot-sidenav { flex: 0 0 42%; max-width: 42%; }
    .ri-hot-boards  { flex: 0 0 58%; max-width: 58%; }
    .ri-cat-grid-4  { grid-template-columns: repeat(3, 1fr); }
}

/* 手机：纵向堆叠 */
@media (max-width: 640px) {
    .ri-hot-wrap { flex-direction: column; }
    .ri-hot-sidenav { flex: none; max-width: 100%; width: 100%; border-right: none; border-bottom: 1px solid #e4e7f0; }
    [data-bs-theme="dark"] .ri-hot-sidenav { border-bottom-color: rgba(255,255,255,.08); }
    .ri-hot-boards  { flex: none; max-width: 100%; width: 100%; }
    .ri-sidenav-tabs { padding: 5px 8px; gap: 3px; }
    .ri-sidenav-tab { font-size: 0.7rem; padding: 2px 7px; }
    .ri-hot-tab { font-size: 0.72rem; padding: 3px 8px; }
    /* 手机上网格最多 3 列 */
    .ri-cat-grid-4  { grid-template-columns: repeat(3, 1fr); }
    .ri-cat-grid    { gap: 5px; padding: 6px 7px; }
}

@media (max-width: 480px) {
    /* 小手机网格最多 2 列 */
    .ri-cat-grid-3,
    .ri-cat-grid-4  { grid-template-columns: repeat(2, 1fr); }
    .ri-board-tit { font-size: 0.78rem; }
    .ri-hot-tab-nav { gap: 2px; padding: 9px 8px; }
    .ri-hot-tab { font-size: 0.7rem; padding: 3px 6px; }
    .ri-sidenav-tab { font-size: 0.67rem; padding: 2px 6px; }
    .ri-cat-card-title { font-size: .63rem; }
}

@media (max-width: 360px) {
    /* 超小屏幕 2 列 */
    .ri-cat-grid-2,
    .ri-cat-grid-3,
    .ri-cat-grid-4  { grid-template-columns: repeat(2, 1fr); }
    .ri-cat-grid    { gap: 4px; padding: 5px 6px; }
}


/* ============================================
   26. 性能优化：will-change + contain 隔离
   ============================================ */

/* 关键动画元素预提示 GPU 合成 */
.post-item.item-grid,
.post-item.item-list,
.price-card,
.user-center-card {
    will-change: transform;
}
/* 鼠标离开后释放 will-change，避免长期占用显存 */
.post-item.item-grid:not(:hover),
.post-item.item-list:not(:hover),
.price-card:not(:hover) {
    will-change: auto;
}

/* 搜索区域 contain 隔离，阻止溢出重排扩散 */
.search-bg {
    contain: layout style;
}

/* 热门榜单 contain 隔离 */
.ri-hot-section {
    contain: layout style;
}

/* 首页 widget 容器隔离，防止内部变化影响外部布局 */
.home-widget {
    contain: layout style;
}


/* ============================================
   27. 无障碍：尊重用户减少动效偏好
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    /* 禁用所有自定义动画 */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    /* VIP 按钮保留静态渐变，移除动画 */
    .btn-vip-permanent {
        animation: none !important;
    }
    .btn-vip-permanent::before {
        animation: none !important;
        display: none;
    }

    /* 移除卡片 shine 效果 */
    .price-card .price-header::after {
        animation: none !important;
        display: none;
    }

    /* 移除卡片上浮动效 */
    .post-item.item-grid:hover,
    .post-item.item-list:hover,
    .price-card:hover {
        transform: none !important;
    }

    /* 保留骨架屏背景色，移除闪烁动画 */
    .post-item .entry-media .media-img:not(.loaded) {
        animation: none !important;
        background-image: none !important;
    }

    /* 搜索区标题保持显示，取消 fadein 动画 */
    .search-bg .search-title,
    .search-bg .search-title::after,
    .search-bg .search-desc,
    .search-bg .search-form,
    .search-bg .search-hots {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}


/* ============================================
   28. 键盘导航可访问性（focus-visible）
   ============================================ */

/* 移除全局默认 outline，改用 :focus-visible 提供更好键盘蒱焦样式 */
:focus {
    outline: none;
}
:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.7);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 按鈕 focus-visible */
.btn:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.8);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.15);
}

/* 表单控件 focus-visible */
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.6);
    outline-offset: 1px;
}

/* 链接 focus-visible */
a:focus-visible {
    outline: 2px solid rgba(102, 126, 234, 0.8);
    outline-offset: 3px;
    border-radius: 3px;
}

/* 搜索按鈕 focus-visible */
.search-fields .search-submit-btn:focus-visible,
.search-fields button[type="submit"]:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

/* 深色模式下提亮焦点轮廓 */
[data-bs-theme="dark"] :focus-visible {
    outline-color: rgba(139, 92, 246, 0.9);
}
[data-bs-theme="dark"] .btn:focus-visible {
    outline-color: rgba(139, 92, 246, 0.9);
    box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.2);
}


/* ============================================
   29. 深色模式滚动条岛屏适配
   ============================================ */

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #1e293b;
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed 0%, #4f46e5 100%);
}
[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #8b5cf6 0%, #6366f1 100%);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}
[data-bs-theme="dark"] * {
    scrollbar-color: #7c3aed #1e293b;
}


/* ============================================
   30. 全局打印优化
   ============================================ */

@media print {
    /* 打印时隐藏动效和游戏次要元素 */
    .search-bg .search-bg-overlay,
    .search-hero-particles,
    #ri-read-progress,
    .btn-vip-permanent::before,
    .price-card .price-header::after {
        display: none !important;
    }

    /* 打印内容黑白化 */
    .search-bg .search-title,
    .search-bg .search-desc,
    .ri-board-tit,
    .ri-board-cat {
        color: #000 !important;
        text-shadow: none !important;
    }

    /* 打印隐藏滚动条 */
    ::-webkit-scrollbar {
        display: none;
    }
}



/* ============================================
   31. Category Filter Bar (archive-filter) Enhancement
        Reference: Horizontal tabs with blue underline highlight
   ============================================ */

.filter-warp {
    background: #fff;
    border-bottom: 1px solid #eaedf3;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    margin-bottom: 1.5rem;
    position: relative;
}

[data-bs-theme="dark"] .filter-warp {
    background: #1a1b2e;
    border-bottom-color: rgba(255,255,255,.08);
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.filter-warp .filter-item {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid #f0f2f7;
}

.filter-warp .filter-item::-webkit-scrollbar {
    display: none;
}

.filter-warp .filter-item:last-child {
    border-bottom: none;
}

[data-bs-theme="dark"] .filter-warp .filter-item {
    border-bottom-color: rgba(255,255,255,.06);
}

.filter-warp .filter-item .filter-name {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    font-weight: 700;
    color: #9ca3af;
    padding: 10px 14px 10px 16px;
    white-space: nowrap;
    border-right: 1px solid #f0f2f7;
    background: #fafbfc;
}

[data-bs-theme="dark"] .filter-warp .filter-item .filter-name {
    color: #64748b;
    border-right-color: rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
}

.filter-warp .filter-item .filter-link {
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
}

.filter-warp .filter-item .filter-link a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    font-size: .84rem;
    color: #4b5563;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color .18s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    line-height: 1;
}

.filter-warp .filter-item .filter-link a:hover {
    color: #2563eb;
    text-decoration: none;
}

.filter-warp .filter-item .filter-link.active a {
    color: #2563eb;
    font-weight: 600;
    border-bottom-color: #2563eb;
}

[data-bs-theme="dark"] .filter-warp .filter-item .filter-link a {
    color: #94a3b8;
}

[data-bs-theme="dark"] .filter-warp .filter-item .filter-link a:hover {
    color: #818cf8;
}

[data-bs-theme="dark"] .filter-warp .filter-item .filter-link.active a {
    color: #818cf8;
    border-bottom-color: #818cf8;
}

@media (max-width: 767.98px) {
    .filter-warp .filter-item .filter-name {
        padding: 9px 10px 9px 12px;
        font-size: .74rem;
    }
    .filter-warp .filter-item .filter-link a {
        padding: 9px 10px;
        font-size: .8rem;
    }
}


/* ============================================
   32. Sidebar Ranking List Enhancement
        Reference: Colored number badges 1=orange 2=gold 3=green 4=blue 5+=gray
   ============================================ */

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 4px;
    border-radius: 8px;
    transition: background .15s ease;
}

.ranking-item:hover {
    background: rgba(37, 99, 235, .04);
}

[data-bs-theme="dark"] .ranking-item:hover {
    background: rgba(139,92,246,.06);
}

.ranking-item .ranking-num {
    flex-shrink: 0;
    min-width: 24px;
    height: 24px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 6px !important;
    font-size: .76rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 0 !important;
    opacity: 1 !important;
}

.ranking-item .ranking-num.bg-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(249,115,22,.45);
}

.ranking-item .ranking-num.bg-success {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(234,179,8,.45);
}

.ranking-item .ranking-num.bg-warning {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(34,197,94,.4);
}

.ranking-item .ranking-num.bg-info {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
    box-shadow: none;
}

.ranking-item .ranking-num.bg-secondary {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    box-shadow: none;
}

[data-bs-theme="dark"] .ranking-item .ranking-num.bg-info {
    background: rgba(129, 140, 248, .15) !important;
    color: #818cf8 !important;
}

[data-bs-theme="dark"] .ranking-item .ranking-num.bg-secondary {
    background: rgba(255,255,255,.08) !important;
    color: #64748b !important;
}

.ranking-title {
    flex: 1;
    min-width: 0;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.45;
    margin: 0;
}

.ranking-title a {
    color: #1f2937;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .16s ease;
}

.ranking-title a:hover {
    color: #2563eb;
    text-decoration: none;
}

[data-bs-theme="dark"] .ranking-title a {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .ranking-title a:hover {
    color: #818cf8;
}


/* ============================================
   33. Hot Posts "View" Button -> Blue Pill Style
        Reference: Solid blue rounded button
   ============================================ */

.ri-board-view {
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 4px 14px !important;
    font-size: .72rem !important;
    font-weight: 600 !important;
    letter-spacing: .3px;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

.ri-board-view:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37,99,235,.4);
}

[data-bs-theme="dark"] .ri-board-view {
    background: rgba(37,99,235,.85) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(37,99,235,.2);
}

[data-bs-theme="dark"] .ri-board-view:hover {
    background: #2563eb !important;
    color: #fff !important;
}


/* ============================================
   34. Section Title Module Header Optimization
        Reference: Left-aligned bold title + blue bottom indicator line
   ============================================ */

.section-title {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 1.25rem !important;
    text-align: left !important;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #eaedf3;
}

.section-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}

.section-title h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 2px;
}

.section-title h3 a {
    color: inherit;
    text-decoration: none;
    transition: color .18s ease;
}

.section-title h3 a:hover {
    color: #2563eb;
}

.section-title .text-muted {
    font-size: .85rem;
    margin-top: 4px;
}

[data-bs-theme="dark"] .section-title::after {
    background: rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .section-title h3 {
    color: #f1f5f9;
}


/* ============================================
   35. Login / Register Page (lar = login-and-register)
   ============================================ */

/* Full-page wrapper */
.login-and-register {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    position: relative;
}

.login-and-register.bg-type-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.42);
    pointer-events: none;
}

/* Card container */
.lar-container {
    width: 100%;
    max-width: 440px;
    margin: auto;
    position: relative;
    z-index: 1;
}

/* Entrance animation */
@keyframes lar-fadein {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card */
.lar-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 64px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.1);
    overflow: hidden;
    animation: lar-fadein .38s ease;
}

[data-bs-theme="dark"] .lar-card {
    background: #1e2028;
    box-shadow: 0 20px 64px rgba(0,0,0,.55);
}

/* Head */
.lar-head {
    padding: 32px 36px 0;
    text-align: center;
}

.lar-logo-link {
    display: inline-block;
    margin-bottom: 10px;
}

.lar-logo {
    max-height: 54px;
    max-width: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

.lar-text-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    margin-bottom: 10px;
}

.lar-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #111827;
    margin: 4px 0 5px;
    letter-spacing: -.3px;
}

[data-bs-theme="dark"] .lar-title { color: #f1f5f9; }

.lar-subtitle {
    font-size: .855rem;
    color: #6b7280;
    margin: 0 0 0;
}

/* Tabs */
.lar-tabs {
    display: flex;
    padding: 0 36px;
    margin-top: 20px;
    border-bottom: 2px solid #f0f2f5;
}

[data-bs-theme="dark"] .lar-tabs {
    border-bottom-color: rgba(255,255,255,.08);
}

.lar-tab {
    flex: 1;
    padding: 10px 6px;
    text-align: center;
    font-size: .875rem;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none !important;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.lar-tab.active,
.lar-tab:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Body */
.lar-body {
    padding: 22px 36px 28px;
}

/* Form labels */
.lar-body .account-from .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    display: block;
}

[data-bs-theme="dark"] .lar-body .account-from .form-label { color: #d1d5db; }

/* Input wrapper with icon */
.lar-input-wrap {
    position: relative;
}

.lar-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: .85rem;
    pointer-events: none;
    z-index: 2;
    transition: color .2s;
}

.lar-input-wrap .form-control {
    padding-left: 36px !important;
    padding-right: 40px !important;
    height: 44px;
    border-radius: 10px !important;
    border: 1.5px solid #e5e7eb !important;
    font-size: .875rem;
    background: #f9fafb;
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-shadow: none !important;
}

[data-bs-theme="dark"] .lar-input-wrap .form-control {
    background: #2a2d38;
    border-color: #3d4152 !important;
    color: #f1f5f9;
}

.lar-input-wrap .form-control:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
    background: #fff;
    outline: none;
}

[data-bs-theme="dark"] .lar-input-wrap .form-control:focus {
    background: #2a2d38;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15) !important;
}

.lar-input-wrap:focus-within .lar-input-icon { color: #2563eb; }

/* Password visibility toggle */
.lar-pwd-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 5px;
    border-radius: 6px;
    transition: color .2s;
    z-index: 3;
    line-height: 1;
    font-size: .9rem;
}

.lar-pwd-toggle:hover { color: #2563eb; }

/* Input-group (email captcha & img captcha) inside .lar-body */
.lar-body .input-group .form-control {
    border-radius: 10px 0 0 10px !important;
    border-right: none !important;
    height: 44px;
    border: 1.5px solid #e5e7eb !important;
}

.lar-body .input-group-append .btn,
.lar-body .input-group > .btn:last-child {
    border-radius: 0 10px 10px 0 !important;
    height: 44px;
    font-size: .82rem;
    padding: 0 14px;
    border: 1.5px solid #e5e7eb !important;
    border-left: none !important;
}

#captcha-img {
    height: 44px;
    border-radius: 0 10px 10px 0 !important;
    cursor: pointer;
    border: 1.5px solid #e5e7eb;
    border-left: none;
    object-fit: cover;
    flex-shrink: 0;
}

[data-bs-theme="dark"] #captcha-img {
    border-color: #3d4152;
}

/* Remember me row */
.lar-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.lar-remember-row .form-check-label {
    font-size: .83rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.lar-forgot-link {
    font-size: .82rem;
    color: #2563eb;
    text-decoration: none;
}

.lar-forgot-link:hover { text-decoration: underline; }

/* Submit button */
.lar-btn-submit {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lar-btn-submit-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(37,99,235,.3);
}

.lar-btn-submit-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,99,235,.45);
    color: #fff;
}

.lar-btn-submit-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37,99,235,.3);
}

.lar-btn-submit-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    color: #fff;
    box-shadow: 0 4px 18px rgba(239,68,68,.28);
}

.lar-btn-submit-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239,68,68,.4);
    color: #fff;
}

/* Link rows (already have account / register) */
.lar-link-row {
    font-size: .83rem;
    color: #6b7280;
}

.lar-link-row a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.lar-link-row a:hover { text-decoration: underline; }

/* Social login divider */
.lar-divider {
    position: relative;
    text-align: center;
    margin: 18px 0;
}

.lar-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

[data-bs-theme="dark"] .lar-divider::before { background: rgba(255,255,255,.1); }

.lar-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px;
    font-size: .78rem;
    color: #9ca3af;
    letter-spacing: .5px;
}

[data-bs-theme="dark"] .lar-divider span { background: #1e2028; }

/* Social login buttons */
.lar-social {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 8px;
}

.lar-social-btn {
    flex: 1;
    max-width: 180px;
    height: 42px;
    border: none;
    border-radius: 10px;
    font-size: .855rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none !important;
    transition: all .22s ease;
}

.lar-social-qq {
    background: linear-gradient(135deg, #12b7f5, #0ea5e9);
    color: #fff !important;
}

.lar-social-qq:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(18,183,245,.4);
    color: #fff !important;
}

.lar-social-wx {
    background: linear-gradient(135deg, #07c160, #05a74f);
    color: #fff !important;
}

.lar-social-wx:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(7,193,96,.4);
    color: #fff !important;
}

/* Reset password hint box */
.lar-reset-hint {
    font-size: .82rem;
    color: #ef4444;
    text-align: left;
    padding: 9px 14px;
    background: rgba(239,68,68,.07);
    border-radius: 8px;
    border-left: 3px solid #ef4444;
    margin-bottom: 14px;
    line-height: 1.55;
}

/* Disabled notice */
.lar-disabled-notice {
    text-align: center;
    padding: 20px 0 10px;
}

.lar-disabled-notice i {
    font-size: 2.5rem;
    color: #d1d5db;
    margin-bottom: 10px;
    display: block;
}

.lar-disabled-notice p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Footer (agreement + copyright) inside form */
.lar-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f2f5;
    text-align: center;
}

[data-bs-theme="dark"] .lar-foot { border-top-color: rgba(255,255,255,.07); }

.lar-foot p {
    font-size: .76rem;
    color: #9ca3af;
    margin: 0 0 2px;
    line-height: 1.7;
}

.lar-foot a {
    color: #9ca3af;
    text-decoration: none;
}

.lar-foot a:hover { color: #2563eb; }

/* Fixed back-to-home button */
.lar-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0,0,0,.28);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all .2s ease;
}

.lar-back-home:hover {
    color: #fff;
    background: rgba(0,0,0,.46);
}

/* Responsive */
@media (max-width: 520px) {
    .lar-container { max-width: 100%; }
    .lar-head { padding: 24px 20px 0; }
    .lar-body { padding: 20px 20px 22px; }
    .lar-tabs { padding: 0 20px; }
    .lar-social { flex-direction: column; align-items: stretch; }
    .lar-social-btn { max-width: 100%; }
}

