/* ================================================
   VIP页面搜狗浏览器和低版本浏览器兼容性样式
   ================================================ */

/* 浏览器检测类 - 当检测到搜狗浏览器或低版本浏览器时添加到body */
.sogou-browser,
.legacy-browser {
    /* 禁用所有动画和过渡效果 */
    * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* 搜狗浏览器和低版本浏览器的VIP容器样式简化 */
.sogou-browser .tools-container.vip-container,
.legacy-browser .tools-container.vip-container {
    background: #f8f9fa !important;
    position: static !important;
}

/* 移除动态背景效果 */
.sogou-browser .tools-container.vip-container::before,
.legacy-browser .tools-container.vip-container::before {
    display: none !important;
}

/* VIP标题简化 */
.sogou-browser .vip-title,
.legacy-browser .vip-title {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: #4a9c01 !important;
    text-shadow: none !important;
    animation: none !important;
}

.sogou-browser .vip-title i,
.legacy-browser .vip-title i {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    color: #ffd700 !important;
    filter: none !important;
    animation: none !important;
}

/* 表格容器简化 */
.sogou-browser .table-container,
.legacy-browser .table-container {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    animation: none !important;
}

/* 表头简化 */
.sogou-browser .membership-table thead,
.legacy-browser .membership-table thead {
    background: #4a9c01 !important;
    backdrop-filter: none !important;
}

.sogou-browser .membership-table thead::before,
.legacy-browser .membership-table thead::before {
    display: none !important;
}

/* 等级徽章简化 */
.sogou-browser .level-badge,
.legacy-browser .level-badge {
    animation: none !important;
    position: static !important;
    display: inline-block !important;
    margin-left: 8px !important;
    margin-top: 4px !important;
}

/* 表格行简化 */
.sogou-browser .membership-table tbody tr,
.legacy-browser .membership-table tbody tr {
    background: #ffffff !important;
    backdrop-filter: none !important;
    transition: none !important;
}

.sogou-browser .membership-table tbody tr:nth-child(even),
.legacy-browser .membership-table tbody tr:nth-child(even) {
    background: #f8f9fa !important;
}

.sogou-browser .membership-table tbody tr:hover,
.legacy-browser .membership-table tbody tr:hover {
    background: #e8f5e8 !important;
    transform: none !important;
    box-shadow: none !important;
}

/* 支持图标简化 */
.sogou-browser .support-icon,
.legacy-browser .support-icon {
    transition: none !important;
    position: static !important;
}

.sogou-browser .support-icon:hover,
.legacy-browser .support-icon:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 无限制值样式简化 */
.sogou-browser .unlimited,
.legacy-browser .unlimited {
    background: #e8f5e8 !important;
    animation: none !important;
    box-shadow: none !important;
}

/* VIP操作按钮简化 */
.sogou-browser .vip-content .action-btn,
.legacy-browser .vip-content .action-btn {
    backdrop-filter: none !important;
    transition: none !important;
    position: static !important;
    overflow: visible !important;
}

.sogou-browser .vip-content .action-btn::before,
.legacy-browser .vip-content .action-btn::before {
    display: none !important;
}

.sogou-browser .vip-content .action-btn:hover,
.legacy-browser .vip-content .action-btn:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* VIP提示信息简化 */
.sogou-browser .vip-notice,
.legacy-browser .vip-notice {
    background: #fff3cd !important;
    backdrop-filter: none !important;
    border: 1px solid #ffeaa7 !important;
    box-shadow: none !important;
    position: static !important;
    overflow: visible !important;
}

.sogou-browser .vip-notice::before,
.legacy-browser .vip-notice::before {
    display: none !important;
}

.sogou-browser .vip-notice i,
.legacy-browser .vip-notice i {
    filter: none !important;
}

/* 活动提醒简化 */
.sogou-browser .promotion-notice,
.legacy-browser .promotion-notice {
    background: #f8d7da !important;
    backdrop-filter: none !important;
    border: 1px solid #f5c6cb !important;
    box-shadow: none !important;
    position: static !important;
    overflow: visible !important;
}

.sogou-browser .promotion-notice::before,
.legacy-browser .promotion-notice::before {
    display: none !important;
}

.sogou-browser .promotion-notice i,
.legacy-browser .promotion-notice i {
    filter: none !important;
}

.sogou-browser .copy-invite-btn,
.legacy-browser .copy-invite-btn {
    backdrop-filter: none !important;
    position: static !important;
    overflow: visible !important;
    transition: none !important;
}

.sogou-browser .copy-invite-btn::before,
.legacy-browser .copy-invite-btn::before {
    display: none !important;
}

.sogou-browser .copy-invite-btn:hover,
.legacy-browser .copy-invite-btn:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* 支付弹窗简化 */
.sogou-browser .payment-modal,
.legacy-browser .payment-modal {
    backdrop-filter: none !important;
    animation: none !important;
}

.sogou-browser .payment-content,
.legacy-browser .payment-content {
    background: #ffffff !important;
    backdrop-filter: none !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    animation: none !important;
    transform: none !important;
}

/* 升级说明简化 */
.sogou-browser .upgrade-notice,
.legacy-browser .upgrade-notice {
    background: #e8f5e8 !important;
    animation: none !important;
    box-shadow: none !important;
}

/* 支付按钮简化 */
.sogou-browser .payment-btn,
.legacy-browser .payment-btn {
    transition: none !important;
}

.sogou-browser .payment-btn:hover,
.legacy-browser .payment-btn:hover {
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* QR码相关简化 */
.sogou-browser .qr-code-wrapper,
.legacy-browser .qr-code-wrapper {
    background-clip: padding-box !important;
    position: static !important;
}

.sogou-browser .qr-code-wrapper::before,
.legacy-browser .qr-code-wrapper::before {
    display: none !important;
}

.sogou-browser .status-indicator,
.legacy-browser .status-indicator {
    animation: none !important;
}

.sogou-browser .status-indicator i,
.legacy-browser .status-indicator i {
    animation: none !important;
}

.sogou-browser .countdown-timer,
.legacy-browser .countdown-timer {
    background: #f8f9fa !important;
    box-shadow: none !important;
}

/* 手机支付提示简化 */
.sogou-browser .mobile-payment-tip,
.legacy-browser .mobile-payment-tip {
    backdrop-filter: none !important;
    animation: none !important;
}

.sogou-browser .tip-content,
.legacy-browser .tip-content {
    animation: none !important;
    transform: none !important;
}

.sogou-browser .tip-content i,
.legacy-browser .tip-content i {
    animation: none !important;
}

/* 支付方式选择简化 */
.sogou-browser .payment-method,
.legacy-browser .payment-method {
    transition: none !important;
}

.sogou-browser .payment-method:hover,
.legacy-browser .payment-method:hover {
    transform: none !important;
}

.sogou-browser .payment-mode,
.legacy-browser .payment-mode {
    transition: none !important;
}

.sogou-browser .payment-mode:hover,
.legacy-browser .payment-mode:hover {
    transform: none !important;
}

/* 自定义弹窗简化 */
.sogou-browser .custom-modal-overlay,
.legacy-browser .custom-modal-overlay {
    backdrop-filter: none !important;
}

.sogou-browser .custom-modal-content,
.legacy-browser .custom-modal-content {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    position: static !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.sogou-browser .custom-modal-content::before,
.legacy-browser .custom-modal-content::before {
    display: none !important;
}

.sogou-browser .modal-icon-wrapper,
.legacy-browser .modal-icon-wrapper {
    animation: none !important;
    position: static !important;
}

.sogou-browser .modal-icon-wrapper i,
.legacy-browser .modal-icon-wrapper i {
    filter: none !important;
}

.sogou-browser .modal-confirm-btn,
.legacy-browser .modal-confirm-btn {
    transition: none !important;
    position: static !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.sogou-browser .modal-confirm-btn::before,
.legacy-browser .modal-confirm-btn::before {
    display: none !important;
}

.sogou-browser .modal-confirm-btn:hover,
.legacy-browser .modal-confirm-btn:hover {
    transform: none !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15) !important;
}

/* 微信授权确认卡片简化 */
.sogou-browser .wechat-auth-overlay,
.legacy-browser .wechat-auth-overlay {
    backdrop-filter: none !important;
    transition: none !important;
}

.sogou-browser .wechat-auth-card,
.legacy-browser .wechat-auth-card {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: none !important;
    transition: none !important;
    position: static !important;
    overflow: visible !important;
}

.sogou-browser .auth-icon,
.legacy-browser .auth-icon {
    box-shadow: 0 2px 6px rgba(7, 193, 96, 0.2) !important;
}

.sogou-browser .auth-close-btn,
.legacy-browser .auth-close-btn {
    transition: none !important;
}

.sogou-browser .auth-close-btn:hover,
.legacy-browser .auth-close-btn:hover {
    background: #e9ecef !important;
}

.sogou-browser .auth-btn,
.legacy-browser .auth-btn {
    transition: none !important;
    position: static !important;
    overflow: visible !important;
}

.sogou-browser .auth-btn-confirm:hover,
.legacy-browser .auth-btn-confirm:hover {
    transform: none !important;
    box-shadow: 0 3px 8px rgba(7, 193, 96, 0.3) !important;
}

/* 微信支付提示弹窗简化 */
.sogou-browser .wechat-notice-overlay,
.legacy-browser .wechat-notice-overlay {
    backdrop-filter: none !important;
}

.sogou-browser .wechat-notice-box,
.legacy-browser .wechat-notice-box {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: none !important;
    transition: none !important;
}

.sogou-browser .wechat-notice-icon,
.legacy-browser .wechat-notice-icon {
    box-shadow: 0 2px 6px rgba(255, 87, 34, 0.2) !important;
    animation: none !important;
}

.sogou-browser .wechat-notice-btn,
.legacy-browser .wechat-notice-btn {
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.2) !important;
    position: static !important;
    overflow: visible !important;
    transition: none !important;
}

.sogou-browser .wechat-notice-btn::before,
.legacy-browser .wechat-notice-btn::before {
    display: none !important;
}

.sogou-browser .wechat-notice-btn:hover,
.legacy-browser .wechat-notice-btn:hover {
    transform: none !important;
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.3) !important;
}

/* 通用降级样式 */
.sogou-browser [style*="backdrop-filter"],
.legacy-browser [style*="backdrop-filter"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.sogou-browser [style*="background-clip: text"],
.legacy-browser [style*="background-clip: text"] {
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
}

/* 渐变背景降级 */
.sogou-browser [style*="linear-gradient"],
.legacy-browser [style*="linear-gradient"] {
    background: #4a9c01 !important;
}

/* 阴影效果降级 */
.sogou-browser [style*="drop-shadow"],
.legacy-browser [style*="drop-shadow"] {
    filter: none !important;
}

/* 打印样式保持不变 */
@media print {
    .sogou-browser *,
    .legacy-browser * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}

/* 针对IE浏览器的特殊处理 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .tools-container.vip-container {
        background: #f8f9fa;
    }
    
    .vip-title {
        color: #4a9c01;
    }
    
    .table-container {
        background: #ffffff;
        border: 1px solid #e0e0e0;
    }
    
    .membership-table thead {
        background: #4a9c01;
    }
    
    .vip-notice {
        background: #fff3cd;
        border: 1px solid #ffeaa7;
    }
    
    .promotion-notice {
        background: #f8d7da;
        border: 1px solid #f5c6cb;
    }
}

/* 针对旧版Safari的处理 */
@supports not (backdrop-filter: blur(10px)) {
    .table-container {
        background: rgba(255, 255, 255, 0.95) !important;
    }
    
    .payment-content {
        background: rgba(255, 255, 255, 0.98) !important;
    }
    
    .custom-modal-content {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* 针对不支持CSS Grid的浏览器 */
@supports not (display: grid) {
    .payment-methods,
    .payment-modes {
        display: flex;
        flex-wrap: wrap;
    }
}

/* 针对不支持Flexbox的浏览器 */
@supports not (display: flex) {
    .header-content,
    .brand-area,
    .header-actions,
    .user-info,
    .payment-methods,
    .payment-modes,
    .payment-actions {
        display: block;
    }
    
    .header-content > * {
        float: left;
        margin-right: 10px;
    }
    
    .header-actions {
        float: right;
        margin-right: 0;
    }
}
