/* ===== Apple风格数字游民工具UI设计系统 v3.0 ===== */
/* 采用Apple Human Interface Guidelines设计原则 */
/* 专为8个数字游民工具打造的高端界面体验 */

/* ===== Apple设计系统基础变量 ===== */
:root {
    /* 导航栏设置 */
    --navbar-base-height: 80px;
    --navbar-safe-margin: 40px;
    --navbar-total-offset: calc(var(--navbar-base-height) + var(--navbar-safe-margin));
    
    /* Apple风格色彩系统 */
    --apple-blue: #007AFF;
    --apple-red: #FF3B30;
    --apple-orange: #FF9500;
    --apple-yellow: #FFCC00;
    --apple-green: #34C759;
    --apple-teal: #5AC8FA;
    --apple-purple: #AF52DE;
    --apple-pink: #FF2D92;
    
    /* 数字游民主题色 - 基于现有红色主题优化 */
    --primary-gradient: linear-gradient(135deg, #FF4742 0%, #E73C47 50%, #FF3B30 100%);
    --primary-shadow: rgba(255, 71, 66, 0.25);
    --primary-glow: rgba(255, 71, 66, 0.15);
    
    /* Apple风格灰色系统 */
    --system-gray-1: #F2F2F7;
    --system-gray-2: #E5E5EA;
    --system-gray-3: #D1D1D6;
    --system-gray-4: #C7C7CC;
    --system-gray-5: #AEAEB2;
    --system-gray-6: #8E8E93;
    
    /* 语义化颜色 */
    --background-primary: rgba(255, 255, 255, 0.98);
    --background-secondary: rgba(248, 248, 248, 0.95);
    --background-elevated: rgba(255, 255, 255, 0.9);
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #6D6D70;
    
    /* Apple风格圆角系统 */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    --radius-xlarge: 20px;
    --radius-continuous: 24px;
    
    /* 阴影系统 */
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.16);
    --shadow-elevated: 0 16px 40px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.16);
    
    /* 毛玻璃效果 */
    --glass-blur: blur(20px);
    --glass-saturation: saturate(1.8);
    
    /* 动画时间 */
    --animation-swift: 0.35s;
    --animation-smooth: 0.5s;
    --animation-gentle: 0.7s;
    --bezier-apple: cubic-bezier(0.25, 0.1, 0.25, 1.0);
    --bezier-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== 工具页面整体布局 - Apple风格 ===== */
.tools-section {
    padding-top: var(--navbar-total-offset) !important;
    padding-bottom: 100px !important;
    min-height: calc(100vh - var(--navbar-total-offset)) !important;
    position: relative !important;
    background: linear-gradient(180deg, 
        rgba(248, 248, 248, 0.4) 0%, 
        rgba(255, 255, 255, 0.6) 30%,
        rgba(248, 248, 248, 0.3) 100%) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
}

/* 确保标题完全可见的额外保护 */
.tools-section::before {
    content: '' !important;
    display: block !important;
    height: var(--navbar-total-offset) !important;
    margin-top: calc(-1 * var(--navbar-total-offset)) !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* 标题容器优化 */
.tools-section .container {
    position: relative !important;
    z-index: 1 !important;
}

.tools-section h2 {
    scroll-margin-top: var(--navbar-total-offset) !important;
    position: relative !important;
    z-index: 2 !important;
}

/* ===== Apple风格工具网格系统 ===== */
.tools-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 20px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 网格背景装饰 */
.tools-grid::before {
    content: '' !important;
    position: absolute !important;
    top: -40px !important;
    left: -40px !important;
    right: -40px !important;
    bottom: -40px !important;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 71, 66, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(52, 199, 89, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 0%, rgba(0, 122, 255, 0.02) 0%, transparent 50%) !important;
    border-radius: var(--radius-xlarge) !important;
    z-index: -1 !important;
    opacity: 0.6 !important;
}

/* ===== Apple风格工具卡片设计 ===== */
.tool-card {
    background: var(--background-elevated) !important;
    backdrop-filter: var(--glass-blur) var(--glass-saturation) !important;
    -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturation) !important;
    border-radius: var(--radius-continuous) !important;
    padding: 28px !important;
    border: 0.5px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: var(--shadow-medium) !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    will-change: transform !important;
    
    /* Apple Card风格的细微边框 */
    background-clip: padding-box !important;
}

/* 卡片内部光效 */
.tool-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        rgba(255, 255, 255, 0.05) 70%,
        transparent 100%) !important;
    border-radius: var(--radius-continuous) !important;
    z-index: 0 !important;
    opacity: 0 !important;
    transition: opacity var(--animation-swift) var(--bezier-apple) !important;
}

/* 工具图标容器 */
.tool-card .tool-icon {
    font-size: 2.5rem !important;
    margin-bottom: 16px !important;
    text-align: center !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, 
        rgba(255, 71, 66, 0.1) 0%,
        rgba(255, 71, 66, 0.05) 100%) !important;
    border-radius: var(--radius-large) !important;
    position: relative !important;
    z-index: 2 !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 0.5px solid rgba(255, 255, 255, 0.2) !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
}

/* Apple风格悬停效果 */
.tool-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: var(--shadow-elevated) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

.tool-card:hover::before {
    opacity: 1 !important;
}

.tool-card:hover .tool-icon {
    transform: scale(1.05) !important;
    background: linear-gradient(135deg, 
        rgba(255, 71, 66, 0.15) 0%,
        rgba(255, 71, 66, 0.08) 100%) !important;
    box-shadow: 0 4px 16px rgba(255, 71, 66, 0.2) !important;
}

/* 按下效果 */
.tool-card:active {
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow: var(--shadow-medium) !important;
    transition: all 0.1s var(--bezier-apple) !important;
}


/* ===== Apple风格卡片文字系统 ===== */
.tool-card h3 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: var(--text-primary) !important;
    line-height: 1.3 !important;
    position: relative !important;
    z-index: 2 !important;
    letter-spacing: -0.01em !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif !important;
}

.tool-card p {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 16px !important;
    position: relative !important;
    z-index: 2 !important;
    font-weight: 400 !important;
    letter-spacing: -0.003em !important;
}

/* 功能标签样式 */
.tool-card .tool-features {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 20px !important;
    position: relative !important;
    z-index: 2 !important;
    flex-wrap: wrap !important;
}

.tool-card .feature-tag {
    background: rgba(0, 122, 255, 0.1) !important;
    color: var(--apple-blue) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    border: 0.5px solid rgba(0, 122, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    letter-spacing: -0.005em !important;
    transition: all 0.2s var(--bezier-apple) !important;
}

.tool-card:hover .feature-tag {
    background: rgba(0, 122, 255, 0.15) !important;
    border-color: rgba(0, 122, 255, 0.25) !important;
    transform: translateY(-1px) !important;
}

/* ===== Apple风格按钮设计 ===== */
.btn-use-tool {
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    padding: 14px 20px !important;
    border-radius: var(--radius-medium) !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    cursor: pointer !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
    box-shadow: 
        0 2px 8px var(--primary-shadow),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    min-height: 48px !important;
    width: 100% !important;
    position: relative !important;
    z-index: 2 !important;
    letter-spacing: -0.01em !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    
    /* Apple风格的细微渐变边框 */
    border: 0.5px solid rgba(255, 255, 255, 0.15) !important;
    background-clip: padding-box !important;
}

.btn-use-tool:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 
        0 6px 20px var(--primary-shadow),
        0 3px 10px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    background: linear-gradient(135deg, #E73C47 0%, #D73847 50%, #FF3B30 100%) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.btn-use-tool:active {
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 
        0 3px 12px var(--primary-shadow),
        0 1px 4px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    background: linear-gradient(135deg, #D73847 0%, #C73447 50%, #E73C47 100%) !important;
    transition: all 0.1s var(--bezier-apple) !important;
}

/* 按钮焦点状态 */
.btn-use-tool:focus {
    outline: none !important;
    box-shadow: 
        0 6px 20px var(--primary-shadow),
        0 0 0 3px rgba(255, 71, 66, 0.3) !important;
}

/* ===== Apple风格弹窗设计系统 ===== */
/* 弹窗容器和遮罩 */
.tool-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    padding: 20px !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    animation: modalFadeIn var(--animation-swift) var(--bezier-apple) forwards !important;
}

.tool-modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(20px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
    animation: overlayFadeIn var(--animation-swift) var(--bezier-apple) forwards !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0 !important;
        transform: scale(0.95) !important;
    }
    to {
        opacity: 1 !important;
        transform: scale(1) !important;
    }
}

@keyframes overlayFadeIn {
    from {
        opacity: 0 !important;
    }
    to {
        opacity: 1 !important;
    }
}

.tool-modal-content {
    background: var(--background-elevated) !important;
    backdrop-filter: blur(40px) saturate(1.8) !important;
    -webkit-backdrop-filter: blur(40px) saturate(1.8) !important;
    border-radius: var(--radius-continuous) !important;
    max-width: 900px !important;
    width: 100% !important;
    max-height: 85vh !important;
    position: relative !important;
    z-index: 1 !important;
    
    /* Apple风格阴影系统 */
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.08),
        0 16px 32px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.2) !important;
    
    /* 细微边框 */
    border: 0.5px solid rgba(255, 255, 255, 0.18) !important;
    background-clip: padding-box !important;
    
    /* 动画 */
    animation: contentSlideIn var(--animation-smooth) var(--bezier-bounce) forwards !important;
    transform-origin: center center !important;
}

@keyframes contentSlideIn {
    from {
        opacity: 0 !important;
        transform: scale(0.9) translateY(20px) !important;
    }
    to {
        opacity: 1 !important;
        transform: scale(1) translateY(0) !important;
    }
}

.tool-modal-header {
    padding: 24px 32px !important;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 248, 248, 0.8) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: var(--radius-continuous) var(--radius-continuous) 0 0 !important;
    min-height: 80px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
}

.tool-modal-header::after {
    content: '' !important;
    position: absolute !important;
    bottom: -0.5px !important;
    left: 0 !important;
    right: 0 !important;
    height: 0.5px !important;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(0, 0, 0, 0.1) 50%,
        transparent 100%) !important;
}

.tool-modal-header h2 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    background: var(--primary-gradient) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif !important;
    flex: 1 !important;
}

/* ===== Apple风格关闭按钮 ===== */
.tool-modal-close {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    background: rgba(142, 142, 147, 0.12) !important;
    border: none !important;
    border-radius: 50% !important;
    color: var(--text-secondary) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    position: relative !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    
    /* Apple风格的关闭按钮样式 */
    font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.tool-modal-close:hover {
    background: rgba(142, 142, 147, 0.18) !important;
    color: var(--text-primary) !important;
    transform: scale(1.1) !important;
}

.tool-modal-close:active {
    transform: scale(0.95) !important;
    background: rgba(142, 142, 147, 0.25) !important;
    transition: all 0.1s var(--bezier-apple) !important;
}

/* 关闭按钮焦点状态 */
.tool-modal-close:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3) !important;
}

/* ===== 弹窗内容区域 ===== */
.tool-modal-body {
    padding: 32px !important;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(142, 142, 147, 0.3) transparent !important;
    max-height: calc(85vh - 120px) !important;
    background: var(--background-primary) !important;
    border-radius: 0 0 var(--radius-continuous) var(--radius-continuous) !important;
}

/* Apple风格滚动条 */
.tool-modal-body::-webkit-scrollbar {
    width: 8px !important;
}

.tool-modal-body::-webkit-scrollbar-track {
    background: var(--system-gray-1) !important;
    border-radius: 4px !important;
}

.tool-modal-body::-webkit-scrollbar-thumb {
    background: var(--system-gray-5) !important;
    border-radius: 4px !important;
    border: 1px solid transparent !important;
    background-clip: content-box !important;
    transition: all 0.2s ease !important;
}

.tool-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--system-gray-6) !important;
    background-clip: content-box !important;
}

/* ===== Apple风格工具界面 ===== */
.tool-interface {
    max-width: 100% !important;
    margin: 0 auto !important;
    background: transparent !important;
}

.tool-interface h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 24px !important;
    text-align: center !important;
    letter-spacing: -0.02em !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif !important;
}

.tool-interface .form-group {
    margin-bottom: 20px !important;
}

.tool-interface label {
    display: block !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    margin-bottom: 8px !important;
    font-size: 0.9375rem !important;
    letter-spacing: -0.01em !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif !important;
}

.tool-interface input,
.tool-interface select,
.tool-interface textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 0.5px solid var(--system-gray-3) !important;
    border-radius: var(--radius-medium) !important;
    font-size: 1rem !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
    background: var(--background-elevated) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    min-height: 48px !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif !important;
    letter-spacing: -0.003em !important;
    
    /* Apple风格的细微边框和阴影 */
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.06),
        inset 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    background-clip: padding-box !important;
}

.tool-interface input:focus,
.tool-interface select:focus,
.tool-interface textarea:focus {
    outline: none !important;
    border-color: var(--apple-blue) !important;
    box-shadow: 
        0 0 0 3px rgba(0, 122, 255, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    transform: translateY(-1px) !important;
}

.tool-interface input::placeholder,
.tool-interface select::placeholder,
.tool-interface textarea::placeholder {
    color: var(--text-tertiary) !important;
    font-weight: 400 !important;
}

/* ===== Apple风格按钮系统 ===== */
.btn-primary {
    background: var(--primary-gradient) !important;
    color: white !important;
    border: none !important;
    padding: 14px 24px !important;
    border-radius: var(--radius-medium) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
    box-shadow: 
        0 4px 16px var(--primary-shadow),
        0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif !important;
    letter-spacing: -0.01em !important;
    border: 0.5px solid rgba(255, 255, 255, 0.15) !important;
    background-clip: padding-box !important;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 
        0 8px 24px var(--primary-shadow),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    background: linear-gradient(135deg, #E73C47 0%, #D73847 50%, #FF3B30 100%) !important;
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 
        0 4px 12px var(--primary-shadow),
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.1s var(--bezier-apple) !important;
}

.btn-secondary {
    background: var(--system-gray-1) !important;
    color: var(--text-primary) !important;
    border: 0.5px solid var(--system-gray-3) !important;
    padding: 14px 24px !important;
    border-radius: var(--radius-medium) !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all var(--animation-swift) var(--bezier-apple) !important;
    min-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif !important;
    letter-spacing: -0.01em !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    background-clip: padding-box !important;
}

.btn-secondary:hover {
    background: var(--system-gray-2) !important;
    border-color: var(--system-gray-4) !important;
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.btn-secondary:active {
    transform: translateY(0) scale(1.01) !important;
    background: var(--system-gray-3) !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.1s var(--bezier-apple) !important;
}

/* ===== Apple风格深色模式 ===== */
/* 深色模式列颜色变量 */
[data-theme="dark"] {
    --background-primary: rgba(28, 28, 30, 0.98);
    --background-secondary: rgba(44, 44, 46, 0.95);
    --background-elevated: rgba(58, 58, 60, 0.9);
    --text-primary: #F2F2F7;
    --text-secondary: #AEAEB2;
    --text-tertiary: #8E8E93;
    --system-gray-1: rgba(58, 58, 60, 0.6);
    --system-gray-2: rgba(72, 72, 74, 0.7);
    --system-gray-3: rgba(99, 99, 102, 0.8);
    --system-gray-4: rgba(116, 116, 118, 0.9);
}

/* 深色模式下的工具区域 */
[data-theme="dark"] .tools-section {
    background: linear-gradient(180deg, 
        rgba(28, 28, 30, 0.4) 0%, 
        rgba(44, 44, 46, 0.6) 30%,
        rgba(28, 28, 30, 0.3) 100%) !important;
}

/* 深色模式下的工具卡片 */
[data-theme="dark"] .tool-card {
    background: var(--background-elevated) !important;
    border-color: rgba(99, 99, 102, 0.2) !important;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .tool-card:hover {
    background: rgba(72, 72, 74, 0.9) !important;
    border-color: rgba(99, 99, 102, 0.3) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* 深色模式下的弹窗 */
[data-theme="dark"] .tool-modal-content {
    background: var(--background-elevated) !important;
    border-color: rgba(99, 99, 102, 0.2) !important;
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.6),
        0 16px 32px rgba(0, 0, 0, 0.3),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 0.5px rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .tool-modal-header {
    background: linear-gradient(135deg, 
        rgba(58, 58, 60, 0.95) 0%,
        rgba(44, 44, 46, 0.8) 100%) !important;
    border-bottom-color: rgba(99, 99, 102, 0.2) !important;
}

[data-theme="dark"] .tool-modal-body {
    background: var(--background-secondary) !important;
}

/* 深色模式下的表单元素 */
[data-theme="dark"] .tool-interface input,
[data-theme="dark"] .tool-interface select,
[data-theme="dark"] .tool-interface textarea {
    background: var(--background-elevated) !important;
    border-color: rgba(99, 99, 102, 0.3) !important;
    color: var(--text-primary) !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .tool-interface input:focus,
[data-theme="dark"] .tool-interface select:focus,
[data-theme="dark"] .tool-interface textarea:focus {
    background: rgba(72, 72, 74, 0.95) !important;
    border-color: var(--apple-blue) !important;
    box-shadow: 
        0 0 0 3px rgba(0, 122, 255, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.08) !important;
}

/* 深色模式下的按钮 */
[data-theme="dark"] .btn-secondary {
    background: var(--system-gray-1) !important;
    border-color: rgba(99, 99, 102, 0.4) !important;
    color: var(--text-primary) !important;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--system-gray-2) !important;
    border-color: rgba(99, 99, 102, 0.5) !important;
}

/* ===== Apple风格响应式设计 ===== */

/* 大屏幕设备 (1200px+) */
@media (min-width: 1200px) {
    :root {
        --navbar-base-height: 85px;
        --navbar-safe-margin: 45px;
    }
}

/* 中等屏幕 (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    :root {
        --navbar-base-height: 82px;
        --navbar-safe-margin: 43px;
    }
}

/* 平板设备 (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    :root {
        --navbar-base-height: 80px;
        --navbar-safe-margin: 40px;
    }
}

/* Apple风格移动端优化 */
@media (max-width: 768px) {
    :root {
        --navbar-base-height: 75px;
        --navbar-safe-margin: 35px;
        --radius-continuous: 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 0 16px !important;
    }
    
    .tool-card {
        padding: 24px !important;
    }
    
    .tool-card .tool-icon {
        font-size: 2.2rem !important;
        height: 56px !important;
    }
    
    .btn-use-tool {
        padding: 12px 20px !important;
        font-size: 0.9375rem !important;
    }
    
    /* 移动端弹窗优化 */
    .tool-modal {
        padding: 16px !important;
        align-items: flex-end !important;
    }
    
    .tool-modal-content {
        margin: 0 !important;
        max-height: 90vh !important;
        max-height: 90dvh !important;
        border-radius: var(--radius-continuous) var(--radius-continuous) 0 0 !important;
        width: 100% !important;
        animation: mobileSlideUp var(--animation-smooth) var(--bezier-bounce) forwards !important;
    }
    
    .tool-modal-header {
        padding: 20px 24px !important;
        min-height: 64px !important;
    }
    
    .tool-modal-header h2 {
        font-size: 1.5rem !important;
    }
    
    .tool-modal-body {
        padding: 24px !important;
        max-height: calc(90vh - 120px) !important;
        max-height: calc(90dvh - 120px) !important;
    }
    
    /* 移动端标题额外保护 */
    .tools-section {
        padding-top: calc(var(--navbar-total-offset) + 16px) !important;
    }
    
    .tools-section h2 {
        margin-bottom: 24px !important;
        text-align: center !important;
        font-size: 2rem !important;
    }
}

/* 移动端上滑动画 */
@keyframes mobileSlideUp {
    from {
        opacity: 0 !important;
        transform: translateY(100%) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* 超小屏幕设备优化 */
@media (max-width: 480px) {
    :root {
        --navbar-base-height: 70px;
        --navbar-safe-margin: 30px;
        --radius-continuous: 16px;
    }
    
    .tools-section {
        padding-top: calc(var(--navbar-total-offset) + 20px) !important;
    }
    
    .tool-card {
        padding: 20px !important;
    }
    
    .tool-card .tool-icon {
        font-size: 2rem !important;
        height: 48px !important;
    }
    
    .tool-card h3 {
        font-size: 1.125rem !important;
    }
    
    .tool-card p {
        font-size: 0.8125rem !important;
    }
    
    .btn-use-tool {
        padding: 10px 16px !important;
        font-size: 0.875rem !important;
        min-height: 44px !important;
    }
    
    .tool-modal-content {
        border-radius: var(--radius-large) var(--radius-large) 0 0 !important;
    }
    
    .tool-modal-header {
        padding: 16px 20px !important;
    }
    
    .tool-modal-header h2 {
        font-size: 1.375rem !important;
    }
    
    .tool-modal-body {
        padding: 20px !important;
    }
}

/* ===== Apple风格微交互动画 ===== */

/* 卡片按下波纹效果 */
@keyframes rippleEffect {
    0% {
        transform: scale(0) !important;
        opacity: 1 !important;
    }
    100% {
        transform: scale(4) !important;
        opacity: 0 !important;
    }
}

.tool-card::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 20px !important;
    height: 20px !important;
    background: var(--primary-glow) !important;
    border-radius: 50% !important;
    transform: translate(-50%, -50%) scale(0) !important;
    opacity: 0 !important;
    transition: all 0.6s ease !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.tool-card:active::after {
    animation: rippleEffect 0.6s ease !important;
}

/* 加载状态动画 */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--primary-glow) !important;
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 71, 66, 0) !important;
    }
}

.tool-card.loading {
    animation: pulseGlow 2s infinite !important;
    pointer-events: none !important;
}

/* 按钮点击反馈 */
.btn-use-tool:active {
    animation: buttonPress 0.15s ease !important;
}

@keyframes buttonPress {
    0% { transform: translateY(-2px) scale(1.02) !important; }
    50% { transform: translateY(0) scale(0.98) !important; }
    100% { transform: translateY(-1px) scale(1.01) !important; }
}

/* 页面进入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0 !important;
        transform: translateY(30px) !important;
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.tool-card {
    animation: fadeInUp 0.6s var(--bezier-apple) forwards !important;
}

/* 错开动画 */
.tool-card:nth-child(1) { animation-delay: 0.1s !important; }
.tool-card:nth-child(2) { animation-delay: 0.2s !important; }
.tool-card:nth-child(3) { animation-delay: 0.3s !important; }
.tool-card:nth-child(4) { animation-delay: 0.4s !important; }
.tool-card:nth-child(5) { animation-delay: 0.5s !important; }
.tool-card:nth-child(6) { animation-delay: 0.6s !important; }
.tool-card:nth-child(7) { animation-delay: 0.7s !important; }
.tool-card:nth-child(8) { animation-delay: 0.8s !important; }

/* ===== 深色模式下的标题可见性增强 ===== */
[data-theme="dark"] .tools-section h2 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
    background: linear-gradient(135deg, #ff6b66, #ff4742) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    position: relative !important;
}

[data-theme="dark"] .tools-section h2::after {
    content: attr(data-i18n) !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    color: rgba(255, 255, 255, 0.1) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.1) !important;
    z-index: -1 !important;
    transform: translate(2px, 2px) !important;
}

/* ===== Apple风格可访问性优化 ===== */

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --primary-gradient: linear-gradient(135deg, #000000 0%, #333333 100%) !important;
        --background-elevated: #FFFFFF !important;
        --text-primary: #000000 !important;
        --text-secondary: #333333 !important;
    }
    
    [data-theme="dark"] {
        --background-elevated: #000000 !important;
        --text-primary: #FFFFFF !important;
        --text-secondary: #CCCCCC !important;
    }
    
    .tool-card {
        border: 2px solid var(--text-primary) !important;
        box-shadow: none !important;
    }
    
    .btn-use-tool {
        background: var(--text-primary) !important;
        color: var(--background-elevated) !important;
        border: 2px solid var(--text-primary) !important;
    }
}

/* 减少动效模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .tool-card:nth-child(n) {
        animation-delay: 0s !important;
    }
}

/* Apple风格Focus状态 */
.tool-card:focus-within {
    outline: 3px solid var(--apple-blue) !important;
    outline-offset: 4px !important;
    border-radius: calc(var(--radius-continuous) + 4px) !important;
}

.btn-use-tool:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8) !important;
    outline-offset: 2px !important;
}

.tool-modal-close:focus-visible {
    outline: 3px solid var(--apple-blue) !important;
    outline-offset: 2px !important;
}

/* 触摸设备优化 */
@media (pointer: coarse) {
    .btn-use-tool {
        min-height: 48px !important;
        padding: 14px 24px !important;
    }
    
    .tool-modal-close {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .tool-card {
        padding: 32px !important;
    }
}

/* 语音辅助支持 */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===== Apple风格浏览器兼容性 ===== */

/* Safari特殊优化 */
@supports (-webkit-backdrop-filter: blur(1px)) {
    .tool-card {
        backdrop-filter: var(--glass-blur) var(--glass-saturation) !important;
        -webkit-backdrop-filter: var(--glass-blur) var(--glass-saturation) !important;
    }
    
    .tool-modal-content {
        backdrop-filter: blur(40px) saturate(1.8) !important;
        -webkit-backdrop-filter: blur(40px) saturate(1.8) !important;
    }
}

/* Firefox特殊处理 */
@-moz-document url-prefix() {
    .tool-card {
        background: rgba(255, 255, 255, 0.95) !important;
    }
    
    [data-theme="dark"] .tool-card {
        background: rgba(58, 58, 60, 0.95) !important;
    }
}

/* 旧版本浏览器降级支持 */
@supports not (backdrop-filter: blur(1px)) {
    .tool-card {
        background: rgba(255, 255, 255, 0.98) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
    }
    
    [data-theme="dark"] .tool-card {
        background: rgba(58, 58, 60, 0.98) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .tool-modal-overlay {
        background: rgba(0, 0, 0, 0.6) !important;
    }
}

/* Internet Explorer 11降级支持 */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .tool-card {
        background: #FFFFFF !important;
        border: 1px solid #E5E5E5 !important;
        filter: none !important;
    }
    
    .btn-use-tool {
        background: #FF4742 !important;
        filter: none !important;
    }
}

/* ===== Apple风格性能优化 ===== */

/* GPU加速优化 */
.tool-card,
.btn-use-tool,
.tool-modal-content {
    will-change: transform !important;
    transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* 图像懒加载支持 */
.tool-icon[data-src] {
    background-image: none !important;
    transition: background-image 0.3s ease !important;
}

.tool-icon[data-loaded="true"] {
    background-image: attr(data-src) !important;
}

/* 预加载关键资源 */
.tool-modal-content {
    contain: layout style paint !important;
}

/* 内存优化 */
@media (max-width: 768px) {
    .tool-card {
        contain: layout style !important;
    }
    
    .tool-modal-body {
        contain: layout !important;
    }
}

/* ===== 结束标记 ===== */
/* Apple风格数字游民工具UI设计系统 v3.0 */
/* 专业级用户界面设计，遵循Apple Human Interface Guidelines */
/* 支持深色模式、响应式设计、可访问性优化 */