/* ==========================================
   通用样式 - TikTok Shop H5
   ========================================== */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    position: relative;
    overflow-x: hidden;
    /* 确保不会影响 fixed 定位 */
    transform: none !important;
    perspective: none !important;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 确保 fixed 定位正常工作 */
    transform: none !important;
    perspective: none !important;
    will-change: auto;
}

body {
    padding-bottom: env(safe-area-inset-bottom);
    position: relative;
    overflow-x: hidden;
    /* 页面加载优化 - 立即显示，不等待动画 */
    opacity: 1 !important;
    visibility: visible !important;
    /* 注意：transform 会影响 fixed 定位，所以只在过渡时使用，完成后移除 */
    transition: none; /* 禁用默认过渡，减少空白 */
    will-change: auto;
}

/* 翻译加载前隐藏页面内容，避免显示中文后切换为英文 */
body:not(.translations-loaded) {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

body.translations-loaded {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 页面过渡动画时临时添加 transform */
body.page-transition-out {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateX(20px);
}

body.page-transition-in {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateX(-20px);
}

/* 页面加载状态 */
body.page-loading {
    opacity: 0.8;
}

body.page-loaded {
    opacity: 1;
}

/* 页面过渡动画 - 已移到上面，避免重复 */

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

button, input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ==========================================
   顶部导航
   ========================================== */
/* 全局强制固定头部（为页面 header 添加 .amz-fixed 启用） */
.amz-fixed { position: fixed !important; top: 0; left: 0; right: 0; z-index: 10000 !important; background:#131921 !important; }
/* 防止祖先 transform 影响 fixed */
html, body { transform: none !important; perspective: none !important; }
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left, .header-right {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
}

/* 返回按钮美化 - 商业化设计 */
.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    -webkit-tap-highlight-color: transparent;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.back-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.back-btn:hover::before,
.back-btn:active::before {
    width: 100%;
    height: 100%;
}

.back-btn:hover::after {
    opacity: 1;
}

.back-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.25) 100%);
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.back-btn:active {
    transform: scale(0.98) translateY(0);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.35) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.back-btn:hover svg {
    transform: translateX(-3px);
}

.back-btn:active svg {
    transform: translateX(-5px);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .back-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    
    .back-btn:hover {
        transform: scale(1.02);
    }
}

.header .logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.header-center h1 {
    font-size: 18px;
    color: #fff;
    font-weight: 600;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header .notice-btn img {
    width: 24px;
    height: 24px;
}

/* ==========================================
   底部导航栏 - 华丽版（仅图标）
   ========================================== */
.tabbar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 1) 0%, 
        rgba(255, 255, 255, 0.98) 50%,
        rgba(255, 255, 255, 0.95) 100%) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    padding-bottom: env(safe-area-inset-bottom, 0) !important;
    padding-top: 8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    z-index: 999999 !important;
    box-shadow: 
        0 -8px 32px rgba(102, 126, 234, 0.15),
        0 -4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border-radius: 24px 24px 0 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    clip-path: none !important;
    /* 移动端优化 - 使用 backface-visibility 创建独立层，但不使用 transform（会影响 fixed 定位） */
    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
    /* 不使用 transform，因为会影响 fixed 定位 */
    transform: none !important;
    /* 允许子元素溢出显示 */
    isolation: auto !important;
    /* iOS Safari 优化 */
    -webkit-overflow-scrolling: touch;
    /* 确保不被父元素影响 */
    top: auto !important;
}

.tabbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #667eea 20%,
        #764ba2 50%,
        #667eea 80%,
        transparent 100%);
    opacity: 0.6;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(-100%);
    }
    50% {
        opacity: 0.8;
        transform: translateX(100%);
    }
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    position: relative;
    padding: 8px 12px !important;
    -webkit-tap-highlight-color: transparent;
    border-radius: 16px;
    overflow: visible;
}

/* 隐藏文字 */
.tabbar-item span {
    display: none !important;
}

.tabbar-item::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 48px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 0 0 4px 4px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    box-shadow: 
        0 2px 8px rgba(102, 126, 234, 0.4),
        0 0 12px rgba(118, 75, 162, 0.3);
}

.tabbar-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 56px;
    height: 56px;
    background: radial-gradient(circle, 
        rgba(102, 126, 234, 0.15) 0%,
        rgba(118, 75, 162, 0.1) 50%,
        transparent 70%);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    pointer-events: none;
}

.tabbar-item.active::before {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

.tabbar-item.active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.tabbar-item img,
.tabbar-item svg {
    width: 28px !important;
    height: 28px !important;
    object-fit: contain;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
    filter: grayscale(0.4) brightness(0.85);
}

.tabbar-item.active {
    color: #667eea;
}

.tabbar-item.active img,
.tabbar-item.active svg {
    transform: scale(1.25) translateY(-4px);
    filter: 
        grayscale(0) 
        brightness(1.1)
        drop-shadow(0 4px 12px rgba(102, 126, 234, 0.5))
        drop-shadow(0 2px 6px rgba(118, 75, 162, 0.4));
}

/* 为活动状态的图标添加渐变色彩 */
.tabbar-item.active img,
.tabbar-item.active svg {
    position: relative;
}

.tabbar-item.active img::after,
.tabbar-item.active svg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.3;
    border-radius: 50%;
    pointer-events: none;
}

.tabbar-item:hover {
    transform: translateY(-2px);
}

.tabbar-item:hover img,
.tabbar-item:hover svg {
    transform: scale(1.1);
    filter: grayscale(0.2) brightness(0.95);
}

.tabbar-item.active:hover img,
.tabbar-item.active:hover svg {
    transform: scale(1.3) translateY(-4px);
}

.tabbar-item:active {
    transform: translateY(0) scale(0.92);
}

.tabbar-item:active img,
.tabbar-item:active svg {
    transform: scale(0.95);
}

.tabbar-item.active:active img,
.tabbar-item.active:active svg {
    transform: scale(1.15) translateY(-2px);
}

/* ==========================================
   抢单按钮特殊样式 - 突出半圆形
   ========================================== */
.tabbar-grab-btn,
a.tabbar-item[href*="task-claim.html"],
.tabbar-item[href*="task-claim.html"],
a[href*="task-claim.html"].tabbar-item {
    flex: 0 0 auto !important;
    position: relative !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    margin: 0 6px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    background-size: 200% 200% !important;
    box-shadow: 
        0 6px 18px rgba(102, 126, 234, 0.4),
        0 3px 9px rgba(118, 75, 162, 0.3),
        0 0 0 3px rgba(255, 255, 255, 0.9),
        inset 0 2px 4px rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-16px) !important;
    z-index: 1000000 !important;
    animation: grabButtonPulse 2s ease-in-out infinite !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
}

/* 抢单按钮内部容器 - 覆盖原有的 ::before */
.tabbar-grab-btn::before,
a.tabbar-item[href*="task-claim.html"]::before,
.tabbar-item[href*="task-claim.html"]::before,
a[href*="task-claim.html"].tabbar-item::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    background-size: 200% 200% !important;
    z-index: -1 !important;
    animation: gradientShift 3s ease infinite !important;
    /* 重置原有的 ::before 样式 */
    top: 50% !important;
    left: 50% !important;
    width: 46px !important;
    height: 46px !important;
    opacity: 1 !important;
    scale: 1 !important;
    box-shadow: none !important;
}

/* 抢单按钮图标 */
.tabbar-grab-btn svg,
a.tabbar-item[href*="task-claim.html"] svg,
.tabbar-item[href*="task-claim.html"] svg,
a[href*="task-claim.html"].tabbar-item svg {
    width: 26px !important;
    height: 26px !important;
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
    position: relative !important;
    z-index: 2 !important;
    transform: none !important;
}

/* 抢单按钮文字隐藏 */
.tabbar-grab-btn span,
a.tabbar-item[href*="task-claim.html"] span,
.tabbar-item[href*="task-claim.html"] span,
a[href*="task-claim.html"].tabbar-item span {
    display: none !important;
}

/* 抢单按钮悬停效果 */
.tabbar-grab-btn:hover,
a.tabbar-item[href*="task-claim.html"]:hover,
.tabbar-item[href*="task-claim.html"]:hover,
a[href*="task-claim.html"].tabbar-item:hover {
    transform: translateY(-18px) scale(1.08) !important;
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.5),
        0 4px 12px rgba(118, 75, 162, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.95),
        inset 0 2px 4px rgba(255, 255, 255, 0.4) !important;
}

.tabbar-grab-btn:hover svg,
a.tabbar-item[href*="task-claim.html"]:hover svg,
.tabbar-item[href*="task-claim.html"]:hover svg,
a[href*="task-claim.html"].tabbar-item:hover svg {
    transform: scale(1.1) !important;
}

/* 抢单按钮点击效果 */
.tabbar-grab-btn:active,
a.tabbar-item[href*="task-claim.html"]:active,
.tabbar-item[href*="task-claim.html"]:active,
a[href*="task-claim.html"].tabbar-item:active {
    transform: translateY(-14px) scale(0.95) !important;
}

/* 抢单按钮激活状态 */
.tabbar-grab-btn.active,
a.tabbar-item[href*="task-claim.html"].active,
.tabbar-item[href*="task-claim.html"].active,
a[href*="task-claim.html"].tabbar-item.active {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%) !important;
    box-shadow: 
        0 8px 22px rgba(102, 126, 234, 0.5),
        0 4px 11px rgba(118, 75, 162, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.95),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 0 16px rgba(102, 126, 234, 0.6) !important;
    animation: grabButtonActive 1.5s ease-in-out infinite !important;
}

/* 激活状态动画 */
@keyframes grabButtonActive {
    0%, 100% {
        box-shadow: 
            0 8px 22px rgba(102, 126, 234, 0.5),
            0 4px 11px rgba(118, 75, 162, 0.4),
            0 0 0 4px rgba(255, 255, 255, 0.95),
            inset 0 2px 4px rgba(255, 255, 255, 0.4),
            0 0 16px rgba(102, 126, 234, 0.6);
    }
    50% {
        box-shadow: 
            0 10px 26px rgba(102, 126, 234, 0.6),
            0 5px 13px rgba(118, 75, 162, 0.5),
            0 0 0 5px rgba(255, 255, 255, 0.95),
            inset 0 2px 4px rgba(255, 255, 255, 0.4),
            0 0 24px rgba(102, 126, 234, 0.8);
    }
}

/* 渐变动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 脉冲动画 */
@keyframes grabButtonPulse {
    0%, 100% {
        box-shadow: 
            0 6px 18px rgba(102, 126, 234, 0.4),
            0 3px 9px rgba(118, 75, 162, 0.3),
            0 0 0 3px rgba(255, 255, 255, 0.9),
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            0 0 0 rgba(102, 126, 234, 0);
    }
    50% {
        box-shadow: 
            0 6px 18px rgba(102, 126, 234, 0.4),
            0 3px 9px rgba(118, 75, 162, 0.3),
            0 0 0 3px rgba(255, 255, 255, 0.9),
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            0 0 16px rgba(102, 126, 234, 0.4);
    }
}

/* 确保导航栏有足够空间显示突出的按钮 */
.tabbar {
    padding-bottom: calc(env(safe-area-inset-bottom, 0) + 20px) !important;
    overflow: visible !important;
}

/* 抢单按钮的光环效果 */
.tabbar-grab-btn::after,
a.tabbar-item[href*="task-claim.html"]::after,
.tabbar-item[href*="task-claim.html"]::after,
a[href*="task-claim.html"].tabbar-item::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 68px !important;
    height: 68px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle, 
        rgba(102, 126, 234, 0.2) 0%,
        rgba(118, 75, 162, 0.15) 40%,
        transparent 70%) !important;
    z-index: -2 !important;
    animation: ripple 2s ease-out infinite !important;
    pointer-events: none !important;
}

/* 涟漪动画 */
@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

/* ==========================================
   内容区域
   ========================================== */
body {
    padding-top: 50px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 10px);
}

/* 个人中心页面特殊处理 */
body.profile-page,
.profile-page body {
    padding-top: 0;
    padding-bottom: 80px;
}

/* ==========================================
   加载动画
   ========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   弹窗
   ========================================== */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999 !important; /* 高于导航栏 (999999) */
}

.popup-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.popup-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.popup-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f5;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* ==========================================
   通用卡片样式 - 商业高端风格
   ========================================== */
.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 28px rgba(102, 126, 234, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.card-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    letter-spacing: 0.1px;
}

/* 按钮样式 */
.btn {
    padding: 8px 18px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 
        0 6px 16px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::after {
    left: 100%;
}

.btn:active {
    transform: scale(0.96);
}

/* 标签样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.badge-success {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #1b5e20;
    border: 1.5px solid rgba(27, 94, 32, 0.3);
    box-shadow: 
        0 3px 10px rgba(27, 94, 32, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.badge-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #b8860b;
    border: 1.5px solid rgba(184, 134, 11, 0.3);
    box-shadow: 
        0 3px 10px rgba(184, 134, 11, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.badge-danger {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
    color: #b71c1c;
    border: 1.5px solid rgba(183, 28, 28, 0.3);
    box-shadow: 
        0 3px 10px rgba(183, 28, 28, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* 数值显示 */
.value-large {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Mono', 'Monaco', 'Consolas', monospace;
    line-height: 1.2;
}

.value-medium {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.5px;
}

/* ==========================================
   工具类
   ========================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mt-10 { margin-top: 10px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }

.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

.p-15 { padding: 15px; }
.p-20 { padding: 20px; }

/* 颜色 */
.color-primary { color: #667eea; }
.color-success { color: #52c41a; }
.color-danger { color: #ff4d4f; }
.color-warning { color: #faad14; }
.color-gray { color: #999; }

/* ==========================================
   响应式设计 - 移动端优先
   ========================================== */

/* 超小屏幕 (320px - 479px) */
@media screen and (max-width: 479px) {
    body {
        font-size: 13px;
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }
    
    .header {
        height: 48px;
        padding: 0 12px;
    }
    
    .header-center h1 {
        font-size: 16px;
    }
    
    .tabbar {
        height: 56px !important;
        padding-top: 6px !important;
    }

    
    .tabbar-item img,
    .tabbar-item svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* 小屏幕抢单按钮样式调整 */
    .tabbar-grab-btn,
    .tabbar-item[href*="task-claim.html"] {
        width: 46px !important;
        height: 46px !important;
        transform: translateY(-12px) !important;
        margin: 0 4px !important;
    }
    
    .tabbar-grab-btn::before,
    .tabbar-item[href*="task-claim.html"]::before {
        width: 40px !important;
        height: 40px !important;
    }
    
    .tabbar-grab-btn svg,
    .tabbar-item[href*="task-claim.html"] svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .tabbar-grab-btn:hover,
    .tabbar-item[href*="task-claim.html"]:hover {
        transform: translateY(-14px) scale(1.05) !important;
    }
}

/* 小屏幕 (480px - 767px) - 标准手机 */
@media screen and (min-width: 480px) and (max-width: 767px) {
    body {
        font-size: 14px;
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }
    
    .header {
        height: 50px;
        padding: 0 15px;
    }
    
    .header-center h1 {
        font-size: 18px;
    }
    
    .tabbar {
        height: 60px !important;
        padding-top: 8px !important;
    }
    
    .tabbar-item img,
    .tabbar-item svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    /* 中等屏幕抢单按钮样式调整 */
    .tabbar-grab-btn,
    .tabbar-item[href*="task-claim.html"] {
        width: 50px !important;
        height: 50px !important;
        transform: translateY(-14px) !important;
        margin: 0 5px !important;
    }
    
    .tabbar-grab-btn::before,
    .tabbar-item[href*="task-claim.html"]::before {
        width: 44px !important;
        height: 44px !important;
    }
    
    .tabbar-grab-btn svg,
    .tabbar-item[href*="task-claim.html"] svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .tabbar-grab-btn:hover,
    .tabbar-item[href*="task-claim.html"]:hover {
        transform: translateY(-16px) scale(1.08) !important;
    }
}

/* 平板设备 (768px - 1023px) */
@media screen and (min-width: 768px) and (max-width: 1023px) {
    body {
        font-size: 15px;
        padding-top: 60px;
        padding-bottom: 80px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .header {
        height: 60px;
        padding: 0 20px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
    }
    
    .header-center h1 {
        font-size: 20px;
    }
    
    .tabbar {
        height: 70px !important;
        padding-top: 10px !important;
        bottom: 0 !important;
        position: fixed !important;
    }
    
    .tabbar-item img,
    .tabbar-item svg {
        width: 32px !important;
        height: 32px !important;
    }
    
    /* 平板上显示文字 */
    .tabbar-item span {
        display: block !important;
        font-size: 11px;
        margin-top: 4px;
    }
}

/* 桌面设备 (1024px - 1439px) */
@media screen and (min-width: 1024px) and (max-width: 1439px) {
    body {
        font-size: 15px;
        padding-top: 70px;
        padding-bottom: 100px;
        max-width: 1200px;
        margin: 0 auto;
        background: linear-gradient(to right, #f5f5f5 0%, #ffffff 50%, #f5f5f5 100%);
    }
    
    .header {
        height: 70px;
        padding: 0 30px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: linear-gradient(135deg, #131921 0%, #1a1f2e 100%);
    }
    
    .header-center h1 {
        font-size: 22px;
    }
    
    .tabbar {
        height: 80px !important;
        padding-top: 12px !important;
        bottom: 0 !important;
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 1200px !important;
        max-width: calc(100% - 40px) !important;
        border-radius: 20px 20px 0 0 !important;
        margin: 0 auto !important;
    }
    
    .tabbar-item {
        padding: 10px 20px !important;
    }
    
    .tabbar-item img,
    .tabbar-item svg {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* 桌面上显示文字 */
    .tabbar-item span {
        display: block !important;
        font-size: 12px;
        margin-top: 6px;
    }
    
    /* 桌面端抢单按钮样式调整 */
    .tabbar-grab-btn,
    .tabbar-item[href*="task-claim.html"] {
        width: 58px !important;
        height: 58px !important;
        transform: translateY(-18px) !important;
    }
    
    .tabbar-grab-btn::before,
    .tabbar-item[href*="task-claim.html"]::before {
        width: 52px !important;
        height: 52px !important;
    }
    
    .tabbar-grab-btn svg,
    .tabbar-item[href*="task-claim.html"] svg {
        width: 28px !important;
        height: 28px !important;
    }
    
    .tabbar-grab-btn:hover,
    .tabbar-item[href*="task-claim.html"]:hover {
        transform: translateY(-20px) scale(1.1) !important;
    }
}

/* 大屏幕 (1440px+) */
@media screen and (min-width: 1440px) {
    body {
        font-size: 16px;
        padding-top: 80px;
        padding-bottom: 120px;
        max-width: 1400px;
        margin: 0 auto;
        background: linear-gradient(to right, #f5f5f5 0%, #ffffff 50%, #f5f5f5 100%);
    }
    
    .header {
        height: 80px;
        padding: 0 40px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: linear-gradient(135deg, #131921 0%, #1a1f2e 100%);
    }
    
    .header-center h1 {
        font-size: 24px;
    }
    
    .tabbar {
        height: 90px !important;
        padding-top: 14px !important;
        bottom: 0 !important;
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 1400px !important;
        max-width: calc(100% - 60px) !important;
        border-radius: 24px 24px 0 0 !important;
        margin: 0 auto !important;
    }
    
    .tabbar-item {
        padding: 12px 30px !important;
    }
    
    .tabbar-item img,
    .tabbar-item svg {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* 大屏幕上显示文字 */
    .tabbar-item span {
        display: block !important;
        font-size: 13px;
        margin-top: 8px;
    }
}

/* 横屏模式 */
@media screen and (orientation: landscape) and (max-height: 500px) {
    body {
        padding-top: 45px;
        padding-bottom: 50px;
    }
    
    .header {
        height: 45px;
    }
    
    .tabbar {
        height: 50px !important;
        padding-top: 4px !important;
    }
    
    .tabbar-item img,
    .tabbar-item svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .tabbar-item span {
        display: none !important;
    }
}

/* 打印样式 */
@media print {
    .header,
    .tabbar,
    .back-btn {
        display: none !important;
    }
    
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
}

