/* 全局重置和基本样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 颜色变量 */
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #f093fb;
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-color: #4facfe;
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-color: #43e97b;
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-color: #fa709a;
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --info-color: #a8edea;
    --info-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    
    /* 中性色 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    
    /* 工具页面专用变量 */
    --card-bg: #ffffff;
    --primary-hover: #5a67d8;
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --input-focus: #667eea;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* 间距 */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* ===== Unified Buttons (Neon Future) ===== */
    --btn-height: 40px;

    /* ===== Global Neon Future UI Enhancements (non-breaking) ===== */
    --neon-blue: #4A7BFF;
    --neon-green: #42E6A4;
    --neon-purple: #B56EFF;
    --glass-bg: rgba(0,0,0,0.35);
    --glass-border: rgba(255,255,255,0.18);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* 工具页面专用body样式 */
body.tool-page {
    background: var(--bg-secondary);
    background-attachment: initial;
}

body.loaded {
    opacity: 1;
}

body.page-loaded {
    opacity: 1;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* 使主导航在栅格中居中 */
.header .container .nav { justify-self: center; }

/* 右侧辅助导航靠右，与主导航保持同款样式 */
.header .container .nav-right { justify-self: end; }

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.logo::before {
    content: "🛠️";
    font-size: 1.75rem;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: var(--space-6);
}

.nav ul li a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
}

.nav ul li a:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav ul li a:hover::after {
    width: 80%;
}

/* 主要内容区域 */
.main-content {
    padding: var(--space-16) 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: var(--space-20) var(--space-4);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-6);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.hero-section p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.cta-button {
    background: var(--primary-gradient);
    color: white;
    padding: var(--space-4) var(--space-8);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.cta-button::before {
    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;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.tools-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

/* 工具计数 */
#tool-count {
    text-align: left;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeIn 0.6s ease 0.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 工具区整体布局：左侧分类栏 + 右侧工具网格 */
.tools-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-8);
    align-items: start;
}

/* 默认分类容器样式（顶部横向，作为回退与其他页面复用）*/
.tool-categories-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-12);
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInDown 0.6s ease;
}

/* 左侧侧边栏外观（覆盖默认顶栏样式）*/
.tools-layout .tool-categories-container.sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--space-4);
    padding: var(--space-8);
    margin: 0;
    min-height: 400px;
    border-radius: var(--radius-2xl);
    width: 100%;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--space-3) var(--space-6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(-10px);
    animation: slideInDown 0.6s ease forwards;
}

/* 侧栏按钮拉伸为整行、左对齐 */
.tools-layout .tool-categories-container.sidebar .category-button {
    width: 100%;
    text-align: left;
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
}

.category-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-button.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

/* 工具网格 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-6);
    max-height: none;
    overflow: visible;
    padding: var(--space-4);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    grid-auto-rows: minmax(200px, auto);
    align-items: stretch;
}

/* 放大首页工具区卡片与间距 */
.tools-layout .tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}

.tools-layout .tool-card {
    padding: var(--space-6);
    min-height: 200px;
}

.tools-layout .tool-card h3 {
    font-size: 1.35rem;
}

.tools-layout .tool-card p {
    font-size: 0.95rem;
}

.tools-layout .tool-icon {
    font-size: 2.75rem;
}

.tool-grid::-webkit-scrollbar {
    width: 8px;
}

.tool-grid::-webkit-scrollbar-track {
    background: transparent;
}

.tool-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
}

.tool-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 工具卡片 */
.tool-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

/* SOP字段样式增强：适用场景/技术亮点/限制 */
.tool-card .use-cases {
    margin: 8px 0 4px 0;
    padding-left: 18px;
    color: #333;
}
.tool-card .use-cases li {
    list-style: disc;
}
.tool-card .tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}
.tool-card .tag {
    display: inline-block;
    background: rgba(67,97,238,0.08);
    color: #4361ee;
    border: 1px solid rgba(67,97,238,0.25);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}
.tool-card .limit {
    margin-top: 6px;
    color: #b00020;
    font-size: 12px;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: rgba(102, 126, 234, 0.3);
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    transition: transform 0.3s ease;
    position: relative;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    transition: color 0.3s ease;
    flex-shrink: 0;
    margin: var(--space-4) 0 var(--space-3) 0;
}

.tool-card:hover h3 {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
}

/* 分享工具栏 */
.share-bar {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(102, 126, 234, 0.25);
    width: 100%;
    justify-content: center;
}

.share-btn {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.06);
    background: #fff;
    color: var(--text-primary);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.share-btn:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.share-btn.qq { color: #12B7F5; border-color: rgba(18,183,245,.35); }
.share-btn.wechat { color: #22C55E; border-color: rgba(34,197,94,.35); }
.share-btn.all { color: #6b7280; }

/* 分享二维码弹窗 */
.share-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.45);
    display: none; align-items: center; justify-content: center; z-index: 2000;
}
.share-modal {
    background: #fff; padding: 16px; border-radius: 12px; box-shadow: var(--shadow-xl);
    width: 280px; text-align: center;
}
.share-modal h4 { margin-bottom: 8px; color: var(--text-primary); }
.share-modal img { width: 200px; height: 200px; border-radius: 8px; border: 1px solid var(--border-color); }
.share-modal .close { margin-top: 10px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: 8px; padding: 6px 10px; cursor: pointer; }

/* 底部样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: var(--space-8) 0;
    margin-top: var(--space-16);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tools-header { justify-content: center; }
    .tools-layout {
        grid-template-columns: 1fr;
    }
    .tools-layout .tool-categories-container.sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: var(--space-8);
        padding: var(--space-6);
    }
    .header .container {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .nav ul {
        gap: var(--space-4);
    }
    
    .nav ul li a {
        font-size: 0.875rem;
        padding: var(--space-2);
    }
    
    .hero-section {
        padding: var(--space-12) var(--space-4);
        margin-bottom: var(--space-8);
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        max-height: none;
        overflow-y: visible;
    }
    
    .tool-categories-container {
        gap: var(--space-2);
        padding: var(--space-4);
    }
    
    .category-button {
        font-size: 0.75rem;
        padding: var(--space-2) var(--space-4);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-3);
    }
    
    .hero-section {
        padding: var(--space-8) var(--space-3);
    }
    
    .tool-card {
        padding: var(--space-6);
    }
    
    .tool-icon {
        font-size: 2.5rem;
    }
}

/* 工具计数样式优化 */
#tool-count span[style*='font-size:1.2em'] {
    margin-right: var(--space-2);
}

#tool-count span[style*='font-size:1.3em'] {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 var(--space-2);
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* 工具卡片延迟动画 */
.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }
.tool-card:nth-child(10) { animation-delay: 1.0s; }
.tool-card:nth-child(11) { animation-delay: 1.1s; }
.tool-card:nth-child(12) { animation-delay: 1.2s; }
.tool-card:nth-child(13) { animation-delay: 1.3s; }
.tool-card:nth-child(14) { animation-delay: 1.4s; }
.tool-card:nth-child(15) { animation-delay: 1.5s; }
.tool-card:nth-child(16) { animation-delay: 1.6s; }
.tool-card:nth-child(17) { animation-delay: 1.7s; }
.tool-card:nth-child(18) { animation-delay: 1.8s; }
.tool-card:nth-child(19) { animation-delay: 1.9s; }
.tool-card:nth-child(20) { animation-delay: 2.0s; }

/* 屏幕阅读器支持 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 底部链接样式 */
.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-links {
    display: flex;
    gap: var(--space-6);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
}

.footer-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* CTA按钮图标动画 */
.cta-button svg {
    margin-left: var(--space-2);
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* 智能卡片组件样式 */
.auto-size-card {
    position: absolute;
    min-width: 300px;
    max-width: 600px;
    min-height: 200px;
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 10000;
}

.auto-size-card:focus-within, .auto-size-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
    user-select: none;
    -webkit-user-select: none;
    cursor: move;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.card-body {
    flex-grow: 1;
    padding-top: var(--space-4);
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    min-height: 100px;
    line-height: 1.6;
}

.close-btn {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: none;
    border: none;
    transition: all 0.3s ease;
    line-height: 1;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
}

.close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* 焦点样式 */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --border-color: #000000;
    }
    
    .tool-card {
        border: 2px solid var(--border-color);
    }
    
    .category-button {
        border: 2px solid white;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-tertiary: #4a5568;
        --border-color: #4a5568;
        /* 适配深色模式下的输入控件背景与边框，避免白底白字 */
        --input-bg: #2d3748;
        --input-border: #4a5568;
        --input-focus: #667eea;
        /* 卡片/面板背景，避免文字与背景同为白色 */
        --card-bg: #1f2937;
    }
    
    .tool-card {
        background: rgba(26, 32, 44, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .footer {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* 打印样式 */
@media print {
    .header,
    .footer,
    .cta-button,
    .tool-categories-container {
        display: none !important;
    }
    
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        background: white !important;
        color: black !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc;
    }
    
    .hero-section h1,
    .hero-section p {
        color: black !important;
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 选择文本样式 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* 加载状态 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 错误状态 */
.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.error::before {
    content: "⚠️";
    font-size: 1.25rem;
}

/* 成功状态 */
.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.success::before {
    content: "✅";
    font-size: 1.25rem;
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* 代码块样式 */
code {
    background: var(--bg-tertiary);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
}

pre {
    background: var(--bg-tertiary);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin: var(--space-4) 0;
}

pre code {
    background: none;
    padding: 0;
}

/* 页面加载动画 */
body.loading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

body.page-loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

/* 悬停效果增强 */
.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, center) var(--mouse-y, center), rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: var(--radius-xl);
}

.tool-card:hover::after {
    opacity: 1;
}

/* 鼠标跟随效果 */
.tool-card {
    position: relative;
}

/* 响应式优化 */
@media (max-width: 1024px) {
    .tool-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .tool-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .hero-section {
        padding: var(--space-10) var(--space-4);
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .footer .container {
        flex-direction: column;
        text-align: center;
        gap: var(--space-4);
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* 性能优化 */
.tool-card {
    will-change: transform, box-shadow;
}

.category-button {
    will-change: transform, background-color;
}

/* 无障碍优化 */
@media (prefers-reduced-motion: no-preference) {
    .tool-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .category-button:hover {
        transform: translateY(-2px);
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tool-card {
        border-width: 0.5px;
    }
}

/* 打印优化 */
@media print {
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        background: white !important;
        color: black !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc;
    }
    
    .hero-section h1,
    .hero-section p {
        color: black !important;
    }
}

/* 焦点可见性 */
.tool-card:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    transform: translateY(-4px);
}

.category-button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* 加载状态优化 */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* 工具提示优化 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    text-align: center;
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-primary) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 自定义滚动条 */
.tool-grid::-webkit-scrollbar {
    width: 6px;
}

.tool-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.tool-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    transition: background 0.3s ease;
}

.tool-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 工具卡片状态指示器 */
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

/* 工具图标动画增强 */
.tool-icon {
    position: relative;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* 分类按钮状态指示器 */
.category-button {
    position: relative;
    overflow: hidden;
}

.category-button::before {
    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;
}

.category-button:hover::before {
    left: 100%;
}

/* 响应式字体大小 */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .tool-card h3 {
        font-size: 1.125rem;
    }
    
    .tool-card p {
        font-size: 0.8125rem;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .tool-card:hover {
        transform: none;
    }
    
    .tool-card:active {
        transform: scale(0.98);
    }
    
    .category-button:hover {
        transform: none;
    }
    
    .category-button:active {
        transform: scale(0.95);
    }
}

/* 动画性能优化 */
.tool-card,
.category-button,
.cta-button {
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 工具卡片内容布局优化 */
.tool-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.tool-card .tool-icon {
    flex-shrink: 0;
}

.tool-card h3 {
    flex-shrink: 0;
    margin: var(--space-4) 0 var(--space-3) 0;
}

.tool-card p {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.5;
}

/* 工具计数样式增强 */
#tool-count {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    margin: var(--space-8) auto;
}

/* 页面加载进度条 */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-gradient);
    z-index: 10001;
    transition: width 0.3s ease;
}

/* 工具卡片网格布局优化 */
.tool-grid {
    grid-auto-rows: minmax(200px, auto);
    align-items: stretch;
}

/* 工具卡片响应式高度 */
@media (min-width: 768px) {
    .tool-card {
        min-height: 190px;
    }
}

@media (min-width: 1024px) {
    .tool-card {
        min-height: 200px;
    }
}

/* 工具卡片内容垂直居中 */
.tool-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--space-8);
}

/* 工具图标大小响应式 */
@media (max-width: 480px) {
    .tool-icon {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .tool-icon {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .tool-icon {
        font-size: 4rem;
    }
} /*
 工具页面基础样式 */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
    margin-bottom: 20px;
}

.tool-container h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.input-area {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.input-area label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.input-area input,
.input-area textarea,
.input-area select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.input-area input:focus,
.input-area textarea:focus,
.input-area select:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-area textarea {
    min-height: 120px;
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.result-area {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.result-area h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.result-area #result {
    min-height: 100px;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.back-button:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(-2px);
}

/* 工具页面响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
        margin: 10px;
        border-radius: var(--radius-lg);
    }
    
    .tool-container h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .input-area,
    .result-area {
        padding: 1.5rem;
    }
    
    .input-area label {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .tool-container {
        padding: 0.75rem;
        margin: 5px;
    }
    
    .tool-container h1 {
        font-size: 1.75rem;
    }
    
    .input-area,
    .result-area {
        padding: 1rem;
    }
}
/* 工具页面立即显示，覆盖默认的 opacity 设置 */
body.tool-page {
    opacity: 1 !important;
    background: var(--bg-secondary) !important;
}

/* 统一：所有工具页标题在工具容器内使用实色，避免某些深色主题或缩放下渐变文字不可见 */
/* 统一工具页标题色为主题蓝色 */
body.tool-page .tool-container h1,
body.tool-page header .header-content h1 {
    background: none !important;
    -webkit-text-fill-color: var(--primary-color) !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    color: var(--primary-color) !important;
}

/* 所有层级标题在工具页内统一为主题蓝色 */
body.tool-page h1,
body.tool-page h2,
body.tool-page h3,
body.tool-page h4 {
    color: var(--primary-color) !important;
}

/* 统一：工具页内输入控件默认采用深色友好的背景与文字颜色 */
body.tool-page input,
body.tool-page select,
body.tool-page textarea {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--input-border) !important;
}

body.tool-page input::placeholder,
body.tool-page textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

/* 统一表单标签颜色为主题蓝色 */
body.tool-page label {
    color: var(--primary-color) !important;
}
/* 工具面板
增强样式 */
.tool-panel {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tool-panel .uploader {
    margin-bottom: 2rem;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.tool-panel .uploader:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.tool-panel .uploader input[type="file"] {
    padding: 1rem;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.tool-panel .uploader input[type="file"]:hover {
    background: var(--primary-hover);
}

/* 画布容器样式 */
.canvas-wrap {
    margin: 2rem 0;
}

.canvas-wrap.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.canvas-wrap h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.canvas-wrap canvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
}

/* 控制面板样式 */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.controls.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.controls label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.controls input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.controls input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.controls .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.controls .btn-primary {
    background: var(--primary-color);
    color: white;
}

.controls .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.controls .btn:not(.btn-primary) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.controls .btn:not(.btn-primary):hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* 输入组样式 */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--input-border);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* 结果显示样式 */
.result-section {
    margin-top: 2rem;
}

.result-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 200px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.result-display .no-result,
.result-display .no-match {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.result-display .error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid #ef4444;
}

.result-display .match-count {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.result-display .match-item {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

.result-display .match-position {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: 1rem;
}

.result-display .capture-groups {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-display .group {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-right: 0.5rem;
    font-family: monospace;
}

/* 元数据显示样式 */
.meta-wrap {
    margin-top: 2rem;
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* 工具页面响应式设计 */
@media (max-width: 768px) {
    .canvas-wrap.two-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls.grid {
        grid-template-columns: 1fr;
    }
    
    .controls label {
        margin-bottom: 1rem;
    }
}

/* Responsive tweak for sidebar on small screens */
@media (max-width: 768px) {
	.tools-layout {
		grid-template-columns: 1fr;
	}
	.tools-layout .tool-categories-container.sidebar {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		margin-bottom: var(--space-8);
		padding: var(--space-6);
	}
}

/* ================= Neon Future Theme (首页专用) ================= */
body.neon-future {
	/* palette */
	--space-gray: #1E2027;
	--slate-blue: #252836;
	--quantum-blue: #4A7BFF;
	--energy-green: #42E6A4;
	--spectrum-purple: #B56EFF;

	/* override tokens */
	--text-primary: #E6E9EF;
	--text-secondary: #A9B1C6;
	--text-muted: #7F8596;
	--bg-primary: rgba(255,255,255,0.06);
	--bg-secondary: rgba(255,255,255,0.04);
	--bg-tertiary: rgba(255,255,255,0.08);
	--border-color: rgba(255,255,255,0.12);
	--card-bg: rgba(255,255,255,0.08);
}

body.neon-future {
	background: radial-gradient(1200px 600px at 20% -10%, rgba(74,123,255,0.25) 0%, transparent 60%),
				radial-gradient(1000px 700px at 120% 20%, rgba(66,230,164,0.15) 0%, transparent 60%),
				linear-gradient(135deg, var(--space-gray) 0%, var(--slate-blue) 100%);
}

/* 蜂窝/流线叠层背景 */
body.neon-future::before,
body.neon-future::after {
	content: '';
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}
body.neon-future::before {
	background:
		radial-gradient(circle at 15% 25%, rgba(74,123,255,.10) 0%, transparent 45%),
		radial-gradient(circle at 85% 75%, rgba(66,230,164,.10) 0%, transparent 45%);
	filter: blur(0.2px);
	animation: bg-drift 30s ease-in-out infinite;
}
body.neon-future::after {
	background-image:
		repeating-linear-gradient(60deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 24px),
		repeating-linear-gradient(-60deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 24px);
	opacity: .35;
}
@keyframes bg-drift { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }

/* Header/Nav */
.neon-future .header {
	background: rgba(0,0,0,0.35);
	border-bottom: 1px solid var(--border-color);
}
.neon-future .nav ul li a:hover {
	color: var(--text-primary);
	background: rgba(255,255,255,0.06);
}
.neon-future .nav ul li a::after {
	background: linear-gradient(90deg, var(--quantum-blue), var(--energy-green));
}

/* Hero */
.neon-future .hero-section {
	background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
	border: 1px solid var(--border-color);
}
.neon-future .cta-button {
	background: radial-gradient(120px 80px at 20% 40%, rgba(255,255,255,0.25) 0%, transparent 60%),
				linear-gradient(135deg, var(--quantum-blue), var(--spectrum-purple));
	box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 24px rgba(74,123,255,.35);
}

/* 分类侧栏 */
.neon-future .tool-categories-container {
	background: rgba(0,0,0,0.35);
	border: 1px solid var(--border-color);
	box-shadow: 0 10px 30px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.neon-future .category-button {
	color: var(--text-primary);
	border: 1px solid rgba(255,255,255,0.18);
}
.neon-future .category-button.active {
	background: linear-gradient(135deg, rgba(74,123,255,0.25), rgba(66,230,164,0.25));
	border-color: rgba(255,255,255,0.25);
	animation: holoShift 6s linear infinite;
}
@keyframes holoShift { 0%{filter:hue-rotate(0)} 50%{filter:hue-rotate(140deg)} 100%{filter:hue-rotate(0)} }

/* 工具网格与卡片 */
.neon-future .tool-grid {
	max-height: none;
	overflow: visible;
}
.neon-future .tool-card {
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.08);
}
.neon-future .tool-card::before {
	background: linear-gradient(90deg, var(--quantum-blue), var(--spectrum-purple), var(--energy-green));
}
.neon-future .tool-card:hover {
	box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(74,123,255,0.25);
	border-color: rgba(74,123,255,0.25);
}
.neon-future .tool-card:hover h3 {
	background: linear-gradient(90deg, var(--quantum-blue), var(--energy-green));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.neon-future .share-bar { border-top-color: rgba(255,255,255,0.12); }
.neon-future .share-btn { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }

/* Footer */
.neon-future .footer { background: rgba(0,0,0,0.85); }

/* Neon Future full-width enhancements */
.neon-future .container {
	max-width: 100%;
	padding-left: clamp(16px, 3vw, 32px);
	padding-right: clamp(16px, 3vw, 32px);
}
.neon-future .header .container {
	max-width: 100%;
}
.neon-future .tools-layout {
	grid-template-columns: 320px minmax(0, 1fr);
}
.neon-future .tool-grid {
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Subtle fiber lines for tech vibe */
.neon-future .main-content { position: relative; }
.neon-future .main-content::before {
	content: '';
	position: absolute;
	inset: -40px 0 -40px 0;
	pointer-events: none;
	z-index: 0;
	background:
		repeating-linear-gradient(100deg, rgba(74,123,255,0.06), rgba(74,123,255,0.06) 1px, transparent 1px, transparent 14px),
		repeating-linear-gradient(-80deg, rgba(66,230,164,0.05), rgba(66,230,164,0.05) 1px, transparent 1px, transparent 18px);
	animation: fiberMove 18s linear infinite;
}
@keyframes fiberMove {
	0% { transform: translateX(0); }
	100% { transform: translateX(-60px); }
}

/* Keep content above fiber layer */
.neon-future .main-content > .container { position: relative; z-index: 1; }

/* Neon Future: compact hero banner for better balance */
.neon-future .hero-section {
	padding: var(--space-12) var(--space-4);
	margin-bottom: var(--space-8);
}
.neon-future .hero-section h1 {
	font-size: clamp(2rem, 3.8vw, 3rem);
}
.neon-future .hero-section p {
	font-size: 1rem;
	margin-bottom: var(--space-6);
}
.neon-future .cta-button {
	padding: var(--space-3) var(--space-6);
	font-size: 1rem;
	border-radius: var(--radius-lg);
}

/* Neon Future: coordinated spacing and section styling */
.neon-future .main-content {
	padding: var(--space-12) 0;
}
.neon-future .tools-section {
	margin-top: var(--space-8);
	padding: var(--space-6);
	background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.035));
	border: 1px solid var(--border-color);
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
}
.neon-future .tools-section .tools-layout { margin-top: var(--space-2); }
.neon-future .tool-card { border-radius: 14px; }
.neon-future .tool-card p { color: var(--text-secondary); }

/* ===== Hero Slider (4 页轮播) ===== */
.hero-slider { position: relative; overflow: hidden; border-radius: 20px; }
.hero-slider .slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; transition: transform .6s ease; will-change: transform; }
.hero-slide { min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; padding: clamp(20px, 6vw, 48px); text-align: center; }
.hero-slide h1 { font-size: clamp(2rem, 3.8vw, 3rem); color: #fff; }
.hero-slide p { font-size: 1rem; color: rgba(255,255,255,.9); max-width: 720px; }
.hero-dots { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.hero-dots .dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: transparent; cursor: pointer; transition: all .2s; }
.hero-dots .dot:hover { transform: scale(1.15); }
.hero-dots .dot.active { background: linear-gradient(135deg, var(--quantum-blue, #4A7BFF), var(--energy-green, #42E6A4)); border-color: transparent; box-shadow: 0 0 0 3px rgba(74,123,255,.25); }
@media (max-width: 768px){ .hero-slide { min-height: 180px; } }

/* Hero slider compact overrides */
.neon-future .hero-slide { min-height: 160px; padding: clamp(16px, 4.5vw, 36px); }
.neon-future .hero-slide h1 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
.neon-future .hero-slide p { font-size: .95rem; }
.neon-future .hero-dots .dot { width: 8px; height: 8px; }

/* ===== Settings Page (Neon Future) ===== */
.settings-page { position: relative; }
.settings-page .container { position: relative; z-index: 1; }
.settings-page::before { /* 蜂窝透明层叠背景 + 光纤流线 */
	content: '';
	position: fixed; inset: 0; pointer-events: none; z-index: 0;
	background:
		repeating-linear-gradient(60deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 24px),
		repeating-linear-gradient(-60deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 24px),
		radial-gradient(800px 400px at 20% -10%, rgba(74,123,255,0.18) 0%, transparent 60%),
		radial-gradient(700px 500px at 120% 20%, rgba(66,230,164,0.12) 0%, transparent 60%);
	animation: settings-fiber 24s linear infinite;
}
@keyframes settings-fiber { 0% { transform: translateX(0);} 100% { transform: translateX(-60px);} }

.settings-hero { margin-bottom: 24px; padding: 20px 16px; border: 1px solid var(--border-color); border-radius: 16px; background: rgba(255,255,255,0.06); backdrop-filter: blur(10px); }
.settings-hero h1 { color: #fff; font-size: 1.8rem; margin: 0 0 6px 0; }
.settings-hero p { color: var(--text-secondary); margin: 0; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.setting-card { position: relative; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 16px; backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(255,255,255,0.04); overflow: hidden; }
.setting-card::after { /* 虹彩微光边框 */
	content: ''; position: absolute; inset: 0; border-radius: 12px; padding: 1px;
	background: linear-gradient(135deg, rgba(74,123,255,.4), rgba(66,230,164,.4), rgba(181,110,255,.4));
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: .35;
}
.setting-card:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.35); }

.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { margin: 0; color: #fff; font-size: 1rem; letter-spacing: .5px; }
.badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: var(--text-secondary); }
.desc { color: var(--text-secondary); margin: 0 0 12px 0; font-size: 0.92rem; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }

/* 分子结构按钮 */
.molecule-btn { position: relative; border: none; border-radius: 10px; padding: 10px 16px; font-weight: 700; letter-spacing: .3px; color: #fff; cursor: pointer; transition: transform .2s, box-shadow .2s; background: linear-gradient(135deg, var(--quantum-blue, #4A7BFF), var(--spectrum-purple, #B56EFF)); box-shadow: 0 8px 22px rgba(74,123,255,.35);
}
.molecule-btn::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.25), transparent 60%); border-radius: inherit; opacity: .6; }
.molecule-btn[data-variant="danger"] { background: linear-gradient(135deg, #ff6b6b, #b91c1c); box-shadow: 0 8px 22px rgba(185,28,28,.35); }
.molecule-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(74,123,255,.45); }

/* 开关与选择 */
.switch { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); border-radius: 8px; padding: 8px 10px; color: var(--text-primary); }
.switch input { width: 16px; height: 16px; accent-color: var(--quantum-blue, #4A7BFF); }
.select { background: rgba(0,0,0,0.35); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 10px 12px; min-width: 160px; }

@media (max-width: 640px) {
	.settings-hero { padding: 16px 12px; }
	.settings-grid { grid-template-columns: 1fr; }
}

/* ===== About Page (Neon Future) ===== */
.about-page { position: relative; }
.about-page .container { position: relative; z-index: 1; }
.about-page::before {
	content: '';
	position: fixed; inset: 0; pointer-events: none; z-index: 0;
	background:
		repeating-linear-gradient(60deg, rgba(255,255,255,.035) 0 1px, transparent 1px 24px),
		repeating-linear-gradient(-60deg, rgba(255,255,255,.03) 0 1px, transparent 1px 24px),
		radial-gradient(900px 500px at 15% -10%, rgba(74,123,255,.2) 0%, transparent 60%),
		radial-gradient(800px 600px at 120% 10%, rgba(181,110,255,.12) 0%, transparent 60%);
	animation: about-fiber 28s linear infinite;
}
@keyframes about-fiber { 0% { transform: translateY(0);} 100% { transform: translateY(-60px);} }

.about-hero { margin-bottom: 20px; padding: 20px 16px; border: 1px solid var(--border-color); border-radius: 16px; background: rgba(255,255,255,0.06); backdrop-filter: blur(10px); }
.about-hero h1 { color:#fff; font-size: 1.8rem; margin: 0 0 6px 0; }
.about-hero p { color: var(--text-secondary); margin: 0; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.about-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 16px; backdrop-filter: blur(12px); position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.04); }
.about-card::after { content:''; position:absolute; inset:0; border-radius:12px; padding:1px; background: linear-gradient(135deg, rgba(74,123,255,.4), rgba(66,230,164,.4), rgba(181,110,255,.4)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity:.35; pointer-events:none; }
.card-icon { font-size: 28px; margin-bottom: 8px; filter: drop-shadow(0 0 8px rgba(74,123,255,.6)); }
.about-card h3 { margin: 0 0 6px 0; color:#fff; font-size: 1rem; }
.about-card p { margin: 0; color: var(--text-secondary); }

.about-cta { display:flex; justify-content:center; margin-top: 18px; }

/* ===== Global layout: sticky footer ===== */
html, body { height: 100%; }
body { display: flex; flex-direction: column; }
.main-content { flex: 1 0 auto; }
.footer { flex: 0 0 auto; margin-top: auto; }

/* ===== Settings Page (Neon Future) - enhancements ===== */
/* 卡片冷白投影 + 霓虹边框动态 */
.settings-page .setting-card { box-shadow: 0 14px 44px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.04) inset; }
.settings-page .setting-card:hover::after { opacity: .55; }

/* 分子结构按钮：粒子浮升 + 漩涡填充 */
@keyframes particleRise { 0%{ transform: translateY(0) scale(1); opacity:.8;} 100%{ transform: translateY(-8px) scale(1.05); opacity:0;} }
@keyframes swirlFill { 0%{ background-position: 0% 50%; } 100%{ background-position: 100% 50%; } }
.molecule-btn {
	position: relative;
	background-image: linear-gradient(135deg, var(--quantum-blue, #4A7BFF), var(--spectrum-purple, #B56EFF));
	background-size: 200% 200%;
	animation: swirlFill 6s linear infinite;
}
.molecule-btn::after { /* 粒子 */
	content: '';
	position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%;
	background: rgba(255,255,255,.9); filter: blur(1px);
	transform: translate(-50%,-50%);
	opacity: 0; pointer-events: none;
}
.molecule-btn:hover::after { animation: particleRise .8s ease-out forwards; }

/* 选择与开关交互：冷白光效聚焦 */
.settings-page .select:focus, .settings-page .switch:focus-within {
	outline: none;
	box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 0 24px rgba(74,123,255,.25);
	border-color: rgba(255,255,255,.35);
}

/* 抽象波形图标基线（可用于未来加入svg）*/
.settings-page .card-head h3 { letter-spacing: .6px; }

/* 蜂窝背景轻微强度，保证可读性 */
.settings-page::before { opacity: .9; }

/* ===== Unified Buttons (Neon Future) ===== */
:root { --btn-height: 40px; }
.neon-future .btn,
.neon-future .molecule-btn,
.neon-future .share-btn,
.neon-future .search-btn,
.neon-future .controls .btn {
	min-height: var(--btn-height);
	padding: 0 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	font-weight: 700;
	letter-spacing: .3px;
	line-height: 1;
}

/* Primary: 量子蓝→光谱紫 渐变，与首页一致 */
.neon-future .btn-primary,
.neon-future .molecule-btn,
.neon-future .search-btn {
	background: linear-gradient(135deg, var(--quantum-blue, #4A7BFF), var(--spectrum-purple, #B56EFF));
	color: #fff;
	border: none;
	box-shadow: 0 10px 24px rgba(74,123,255,.35);
}
.neon-future .btn-primary:hover,
.neon-future .molecule-btn:hover,
.neon-future .search-btn:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 14px 32px rgba(74,123,255,.45); }

/* Secondary: 玻璃态冷白 */
.neon-future .btn,
.neon-future .controls .btn:not(.btn-primary) {
	background: rgba(255,255,255,0.06);
	border: 1px solid rgba(255,255,255,0.18);
	color: #E6E9EF;
}
.neon-future .btn:hover,
.neon-future .controls .btn:not(.btn-primary):hover { box-shadow: 0 8px 20px rgba(0,0,0,.25); transform: translateY(-1px); }

/* Danger 保留红色，但统一高度与动效 */
.neon-future .btn-danger,
.neon-future .molecule-btn[data-variant="danger"] {
	background: linear-gradient(135deg, #ff6b6b, #b91c1c);
	color:#fff; border: none; box-shadow: 0 10px 24px rgba(185,28,28,.35);
}

/* Focus ring */
.neon-future .btn:focus,
.neon-future .molecule-btn:focus,
.neon-future .share-btn:focus,
.neon-future .search-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 0 24px rgba(74,123,255,.25); }

/* ===== Global Neon Future UI Enhancements (non-breaking) ===== */
:root {
	--neon-blue: #4A7BFF;
	--neon-green: #42E6A4;
	--neon-purple: #B56EFF;
	--glass-bg: rgba(0,0,0,0.35);
	--glass-border: rgba(255,255,255,0.18);
}

/* Motion preference from Settings (html[data-motion]) */
html[data-motion='0'] * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
html[data-reducedMotion='1'] * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }

/* Shared glass card polish */
.neon-future .tool-card,
.neon-future .setting-card,
.neon-future .about-card {
	border-radius: 14px;
	background: rgba(255,255,255,0.08);
	border: 1px solid var(--glass-border);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 12px 30px rgba(0,0,0,.25), inset 0 0 0 1px rgba(255,255,255,.04);
}

/* Inputs and selects */
.neon-future input[type='text'],
.neon-future input[type='number'],
.neon-future input[type='email'],
.neon-future input[type='url'],
.neon-future input[type='search'],
.neon-future select,
.neon-future textarea {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	color: #E6E9EF;
	border-radius: 10px;
	padding: 10px 12px;
	outline: none;
}
.neon-future input::placeholder,
.neon-future textarea::placeholder { color: #9aa0ae; }
.neon-future input:focus,
.neon-future select:focus,
.neon-future textarea:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 0 24px rgba(74,123,255,.25); }

/* Checkbox/radio (keep semantics; no JS) */
.neon-future input[type='checkbox'],
.neon-future input[type='radio'] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--glass-border); background: var(--glass-bg); display: inline-grid; place-content: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); cursor: pointer; }
.neon-future input[type='checkbox']::after { content: ''; width: 10px; height: 10px; border-radius: 2px; transform: scale(0); transition: transform .15s ease; background: linear-gradient(135deg, var(--neon-blue), var(--neon-green)); box-shadow: 0 0 12px rgba(74,123,255,.45); }
.neon-future input[type='checkbox']:checked::after { transform: scale(1); }

/* Tool tags / chips */
.neon-future .tag,
.neon-future .tool-category { background: rgba(74,123,255,.12); border: 1px solid rgba(74,123,255,.25); color: #9db6ff; border-radius: 999px; padding: 3px 10px; font-size: 11px; letter-spacing: .3px; }

/* Modal overlay glass */
.neon-future .share-modal-overlay { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(0,0,0,.45); }

/* Header nav hover glow */
.neon-future .nav ul li a:hover { box-shadow: 0 6px 18px rgba(0,0,0,.15); }

/* Scrollbar – dark neon */
.neon-future ::-webkit-scrollbar { width: 8px; height: 8px; }
.neon-future ::-webkit-scrollbar-track { background: rgba(255,255,255,0.06); border-radius: 6px; }
.neon-future ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); border-radius: 6px; border: 1px solid rgba(255,255,255,0.18); }
.neon-future ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.32); }

/* Selection */
.neon-future ::selection { background: var(--neon-blue); color: #fff; }
.neon-future ::-moz-selection { background: var(--neon-blue); color: #fff; }

/* 个人介绍和个人名片样式 */
.profile-section {
    margin: var(--space-16) 0;
    padding: var(--space-8) 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-12);
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(74, 123, 255, 0.3);
}

.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    max-width: 1200px;
    margin: 0 auto;
}

.profile-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    -moz-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-green));
    opacity: 0.8;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* 个人介绍卡片样式 */
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-6);
}

.profile-avatar {
    position: relative;
    margin-right: var(--space-6);
}

.avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 3px solid var(--neon-blue);
    box-shadow: 0 0 20px rgba(74, 123, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.avatar-img:hover {
    transform: scale(1.05);
    border-color: var(--neon-purple);
    box-shadow: 0 0 30px rgba(181, 110, 255, 0.6);
}

.avatar-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: var(--neon-green);
    border-radius: 50%;
    border: 3px solid var(--glass-bg);
    box-shadow: 0 0 10px rgba(66, 230, 164, 0.6);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--space-2);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.profile-title {
    font-size: 1.1rem;
    color: var(--neon-blue);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.profile-location {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
}

.profile-bio {
    margin-bottom: var(--space-6);
}

.profile-bio p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

.profile-skills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.skill-tag {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: white;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(181, 110, 255, 0.3);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(181, 110, 255, 0.5);
}

/* 个人名片卡片样式 */
.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.card-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* 联系介绍样式 */
.contact-intro {
    margin-bottom: var(--space-6);
    text-align: center;
}

.contact-intro p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info {
    margin-bottom: var(--space-6);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-3);
    color: rgba(255, 255, 255, 0.9);
}

.contact-item i {
    width: 20px;
    margin-right: var(--space-3);
    color: var(--neon-green);
    font-size: 0.9rem;
}

.contact-item span {
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    margin-top: var(--space-4);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(74, 123, 255, 0.3);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(74, 123, 255, 0.5);
    color: white;
}

.social-link i {
    font-size: 1.1rem;
}

.work-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.work-item h4 {
    font-size: 0.85rem;
    color: var(--neon-green);
    margin-bottom: var(--space-1);
    font-weight: 500;
}

.work-item p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: var(--space-8);
    }
    
    .profile-card {
        padding: var(--space-6);
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: var(--space-4);
    }
    
    .profile-avatar {
        margin-right: 0;
        margin-bottom: var(--space-4);
    }
    
    .work-info {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
}

@media (max-width: 480px) {
    .profile-section {
        margin: var(--space-8) 0;
        padding: var(--space-4) 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .profile-card {
        padding: var(--space-4);
    }
    
    .avatar-img {
        width: 60px;
        height: 60px;
    }
    
    .profile-name {
        font-size: 1.3rem;
    }
    
    .profile-title {
        font-size: 1rem;
    }
}

/* 个人名片模态框样式 */
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(10px);
    -moz-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: auto;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    -moz-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.profile-modal.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.modal-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-content {
    padding: var(--space-8);
}

.modal-profile {
    text-align: center;
}

.modal-avatar {
    margin-bottom: var(--space-8);
}

.modal-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(74, 123, 255, 0.5);
    margin-bottom: var(--space-4);
}

.modal-name {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.modal-qr {
    margin-bottom: var(--space-6);
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--space-6);
    background: #ffffff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.qr-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: var(--space-4) auto;
    }
    
    .modal-header {
        padding: var(--space-4);
    }
    
    .modal-content {
        padding: var(--space-6);
    }
    
    .modal-avatar-img {
        width: 80px;
        height: 80px;
    }
    
    .modal-name {
        font-size: 1.8rem;
    }
    
    .qr-code {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .modal-container {
        width: 98%;
        margin: var(--space-2) auto;
    }
    
    .modal-header {
        padding: var(--space-3);
    }
    
    .modal-content {
        padding: var(--space-4);
    }
    
    .modal-avatar-img {
        width: 70px;
        height: 70px;
    }
    
    .modal-name {
        font-size: 1.6rem;
    }
    
    .qr-code {
        width: 160px;
        height: 160px;
    }
}

/* 浏览器兼容性降级样式 */
@supports not (backdrop-filter: blur(1px)) {
    .profile-card,
    .modal-container,
    .modal-overlay {
        background: rgba(0, 0, 0, 0.9) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        -moz-backdrop-filter: none !important;
    }
    
    .profile-card::before {
        background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-green)) !important;
        opacity: 1 !important;
    }
}

/* Edge浏览器特定样式 */
@supports (-ms-ime-align: auto) {
    .profile-card,
    .modal-container,
    .modal-overlay {
        background: rgba(0, 0, 0, 0.85) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        -moz-backdrop-filter: none !important;
    }
    
    .profile-card::before {
        background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple), var(--neon-green)) !important;
        opacity: 1 !important;
    }
}

/* Firefox浏览器特定样式 */
@supports (-moz-appearance: none) {
    .profile-card,
    .modal-container,
    .modal-overlay {
        background: rgba(0, 0, 0, 0.88) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        -moz-backdrop-filter: none !important;
    }
}

/* Safari浏览器特定样式 */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .profile-card,
    .modal-container,
    .modal-overlay {
        -webkit-backdrop-filter: blur(20px);
    }
    
    .section-title,
    .modal-title {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}