/* Tool Download Website - Main Stylesheet */
/* Inspired by vmpsoft.com design */

/* CSS Variables for Light/Dark Mode - Minimalist Color Scheme */
:root {
    /* Light Mode Colors - Modern Professional */
    --primary: #1e293b;           /* 深蓝灰 - 主色调，专业大气 */
    --primary-light: #334155;     /* 中蓝灰 */
    --primary-dark: #0f172a;      /* 极深蓝灰 */
    --accent: #3b82f6;            /* 现代蓝 - 专业强调色 */
    --accent-light: #60a5fa;      /* 亮蓝 */
    --accent-dark: #1d4ed8;       /* 深蓝 */
    
    --bg-primary: #ffffff;        /* 纯白背景 */
    --bg-secondary: #f8fafc;      /* 极浅灰背景 */
    --bg-card: #ffffff;           /* 卡片背景 */
    --bg-hover: #f1f5f9;          /* 悬停背景 */
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 渐变背景 */
    
    --text-primary: #1e293b;      /* 主文本 - 深蓝灰 */
    --text-secondary: #475569;    /* 次要文本 - 中蓝灰 */
    --text-tertiary: #64748b;     /* 三级文本 - 浅蓝灰 */
    --text-muted: #475569;        /* B1: 静音文本 - slate-600，与白底对比 ≥4.5:1（WCAG AA） */
    
    --border-color: #e2e8f0;      /* 边框色 - 浅灰 */
    --border-light: #f1f5f9;      /* 浅边框 */
    --border-dark: #cbd5e1;       /* 深边框 */
    
    --shadow: rgba(30, 41, 59, 0.1);     /* 主阴影 */
    --shadow-hover: rgba(30, 41, 59, 0.15); /* 悬停阴影 */
    --shadow-card: rgba(30, 41, 59, 0.08);  /* 卡片阴影 */
    --shadow-lg: rgba(30, 41, 59, 0.2);     /* 大阴影 */
    
    --success: #10b981;           /* 成功色 - 现代绿 */
    --warning: #f59e0b;           /* 警告色 - 现代橙 */
    --error: #ef4444;             /* 错误色 - 现代红 */

    /* C4: 卡片/列表间距统一变量 */
    --space-card: 1.5rem;
    --space-list: 1rem;
    --space-section: 2rem;
    /* C5: 容器最大宽度 */
    --container-max-width: 1200px;
}

[data-theme="dark"] {
    /* Dark Mode Colors - Modern Dark Professional */
    --primary: #f1f5f9;           /* 浅灰白 - 主色调 */
    --primary-light: #ffffff;     /* 纯白 */
    --primary-dark: #e2e8f0;      /* 中灰白 */
    --accent: #60a5fa;            /* 亮蓝色 - 现代强调色 */
    --accent-light: #93c5fd;      /* 浅蓝色 */
    --accent-dark: #3b82f6;       /* 深蓝色 */
    
    --bg-primary: #0f172a;        /* 极深蓝黑背景 */
    --bg-secondary: #1e293b;      /* 深蓝灰背景 */
    --bg-card: #1e293b;           /* 卡片背景 */
    --bg-hover: #334155;          /* 悬停背景 */
    --bg-gradient: linear-gradient(135deg, #1e293b 0%, #334155 100%); /* 暗色渐变 */
    
    --text-primary: #f1f5f9;      /* 主文本 - 浅灰白 */
    --text-secondary: #cbd5e1;    /* 次要文本 - 中灰白 */
    --text-tertiary: #94a3b8;     /* 三级文本 - 浅灰 */
    --text-muted: #94a3b8;        /* B2: 静音文本 - slate-400，深色底上可读，对比度达标 */
    
    --border-color: #334155;      /* 边框色 - 深蓝灰 */
    --border-light: #1e293b;      /* 浅边框 */
    --border-dark: #475569;       /* 深边框 */
    
    --shadow: rgba(0, 0, 0, 0.3);         /* 主阴影 */
    --shadow-hover: rgba(0, 0, 0, 0.4);   /* 悬停阴影 */
    --shadow-card: rgba(0, 0, 0, 0.2);    /* 卡片阴影 */
    --shadow-lg: rgba(0, 0, 0, 0.5);      /* 大阴影 */
    
    --success: #10b981;           /* 成功色 - 现代绿 */
    --warning: #f59e0b;           /* 警告色 - 现代橙 */
    --error: #ef4444;             /* 错误色 - 现代红 */
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    /* 与 header 浮动留白一致：顶部露出渐变，避免白条 */
    background: var(--bg-gradient);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* D1: 可点击元素统一手型（无障碍与体验） */
a[href], button, [role="button"], .nav a, select[onchange],
.card-hover, .product-card, .news-card, .dropdown-item, .docs-article-card, .docs-category-item a {
    cursor: pointer;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 768px) {
    .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}


/* Header Styles - Modern Professional (C2: 浮动留白) */
.header {
    background: var(--bg-gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
    position: sticky;
    top: 1rem;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem;
    border-radius: 12px;
}
@media (max-width: 767px) {
    .header {
        margin: 0;
        top: 0;
        border-radius: 0;
    }
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 60px;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    perspective: 1000px;
    cursor: pointer;
}

.logo:focus,
.logo:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.9), 0 0 0 4px var(--accent);
}

.logo:hover {
    color: white;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo:hover:not(.tilt-active) {
    opacity: 0.95;
}

.logo .site-logo {
    height: 50px;
    max-width: 200px;
    object-fit: contain;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(-10px);
    /* 加载时的占位背景 - 使用渐变，与header协调 */
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 8px;
    padding: 5px;
    animation: logoFadeIn 0.8s ease forwards;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    transform-style: preserve-3d;
    will-change: transform;
}

.logo.tilt-active .site-logo {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Logo淡入动画 */
@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Logo加载完成后的状态 */
.logo .site-logo.loaded {
    background: transparent;
    padding: 0;
}

.logo:hover .site-logo {
    opacity: 0.95;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.logo .logo-text {
    white-space: nowrap;
}

.company-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

.company-icons .company-icon {
    height: 35px;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.company-icons .company-icon:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* 响应式设计：移动端调整Logo和图标 */
@media (max-width: 768px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .logo .site-logo {
        height: 40px;
        max-width: 150px;
        /* 移动端也保持动画效果 */
        background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
        border-radius: 6px;
        padding: 4px;
    }
    
    .logo .site-logo.loaded {
        background: transparent;
        padding: 0;
    }
    
    .company-icons {
        display: none; /* 移动端隐藏公司图标，或可以放在页脚 */
    }
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.875rem 1.5rem; /* 稍微增加 padding 以确保触摸目标 */
    border-radius: 8px;
    opacity: 0.9;
    min-height: 44px; /* 确保触摸目标至少 44px */
    display: flex;
    align-items: center;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.15);
    color: white;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hero Section - Modern Professional（C1: 响应式内边距） */
.hero {
    background: var(--bg-gradient);
    color: white;
    padding: 4rem 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (min-width: 768px) {
    .hero { padding: 5rem 0; }
}
@media (min-width: 1024px) {
    .hero { padding: 6rem 0; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,100 1000,0 1000,100"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hero 3D Card Styles */
.hero-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: left;
}

.hero-card-container {
    position: relative;
    perspective: 1000px;
}

.hero-card {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.hero-card-inner,
.hero-card-main {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-card-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transform-style: preserve-3d;
    width: 35%;
    height: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
    opacity: 1;
    pointer-events: none;
}

.hero-card-main {
    position: relative;
    z-index: 0;
    transform-style: preserve-3d;
    width: 100%;
    height: auto;
    display: block;
}

/* 确保inner图片正确叠加在main图片上 */
.hero-card {
    position: relative;
    display: inline-block;
}

/* Feature Cards 3D Styles (vmpsoft style) */
.feature-cards-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.feature-card {
    position: relative;
    display: inline-block;
    width: 320px;
    height: 240px;
    cursor: pointer;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 12px;
}

.feature-card .card-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
    z-index: 0;
    display: block;
    border-radius: 12px;
}

/* 确保所有卡片不拉伸，保持原始比例 */
.feature-card .card-main {
    height: auto;
    width: 100%;
    max-height: 100%;
}

.feature-card .card-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transform-style: preserve-3d;
    width: 35%;
    height: auto;
    max-width: 150px;
    object-fit: contain;
    display: block;
    opacity: 1;
    pointer-events: none;
    transition: transform 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 968px) {
    .feature-cards-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .feature-card {
        width: 280px;
        height: 210px;
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .feature-card {
        width: 220px;
        height: 165px;
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    .feature-cards-container {
        flex-direction: column;
    }
    
    .feature-card {
        width: 280px;
        height: 210px;
        flex: none;
        margin: 0 auto;
    }
}


/* 响应式设计 */
@media (max-width: 968px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center !important;
    }
    
    .stat-item {
        text-align: center !important;
    }
    
    .hero-card-container {
        order: -1;
    }
    
    .hero-card {
        max-width: 400px;
    }
}

/* Products Grid - Minimalist */
.products-section {
    padding: 4rem 0;
    background: var(--bg-primary);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* 确保产品区域在小屏幕上正常显示 */
@media (max-width: 768px) {
    .products-section {
        padding: 3rem 0;
    }
    
    .product-card {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    
    @media (hover: hover) {
        .product-card:hover {
            transform: translateY(-4px);
        }
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--text-primary);
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-section);
    margin-top: 3rem;
    width: 100%;
    box-sizing: border-box;
}

/* 确保产品网格在小屏幕上能够自适应 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
}

/* 在超小屏幕上进一步优化 */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }
}

/* 中等屏幕优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0; /* 防止flex/grid项目溢出 */
    cursor: pointer;
    will-change: transform;
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px var(--shadow-hover);
    }
}

.product-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--accent);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-content {
    padding: 2rem;
    box-sizing: border-box;
    width: 100%;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.95rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    align-items: stretch;
}

.product-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    text-align: center;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    border-radius: 12px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-tertiary);
}

.product-version {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.product-size {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.product-download-options {
    background: rgba(102, 126, 234, 0.1);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 0.9rem;
}

/* Modern Professional Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--bg-gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    border: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-height: 52px;
    user-select: none;
}

.btn::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.3s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #9f7aea 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent);
}
/* F2: 可点击卡片/链接焦点环 */
.card-hover:focus-visible,
.product-card:focus-visible,
.news-card:focus-visible,
a.product-card:focus-visible,
a.news-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--accent);
}

/* Button Variants - Modern Professional */
.btn-secondary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 41, 59, 0.3);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 41, 59, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-outline:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Button Sizes */
.btn-sm {
    padding: 0.75rem 1.25rem; /* 增加 padding 以确保触摸目标至少 44px */
    font-size: 0.85rem;
    min-height: 44px; /* 提升到 44px 以满足可访问性标准 */
    border-radius: 8px;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    min-height: 56px;
    border-radius: 14px;
}

/* Button with Icon */
.btn i {
    margin-right: 0.5rem;
    font-size: 1em;
    transition: transform 0.25s ease;
}

@media (hover: hover) {
    .btn:hover i {
        transform: scale(1.05);
    }
}

/* Ripple Effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Glow Effect for Special Buttons */
.btn-glow {
    position: relative;
    overflow: visible;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate 3s linear infinite;
}

.btn-glow:hover::before {
    opacity: 1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Button Adjustments */
[data-theme="dark"] .btn {
    box-shadow: 
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn:hover {
    box-shadow: 
        0 12px 25px rgba(102, 126, 234, 0.5),
        0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .btn-outline {
    background: rgba(30, 30, 46, 0.8);
    border-color: var(--accent);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* Product Detail Page */
.product-detail {
    padding: 2rem 0;
    background: white;
    min-height: 80vh;
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-detail-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.product-detail-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 2rem;
}

.download-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.download-section h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.download-link:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    color: inherit;
    text-decoration: none;
}

.download-link-text {
    font-weight: 500;
    color: var(--text-primary);
}

.download-link-icon {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--primary-light);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

/* Message Styles */
.message {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-wrapper {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    
    .hero-content {
        text-align: center !important;
    }
    
    .hero-stats {
        justify-content: center !important;
    }
    
    .stat-item {
        text-align: center !important;
    }
    
    .hero-card-container {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-content {
        padding: 1.5rem;
    }
    
    .product-title {
        font-size: 1.2rem;
    }
    
    .product-image {
        height: 180px;
        font-size: 2.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .products-section p {
        padding: 0 1rem;
    }
    
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 超小屏幕优化（480px以下） */
@media (max-width: 480px) {
    .products-section {
        padding: 2rem 0;
    }
    
    .products-grid {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-description {
        font-size: 0.85rem;
    }
    
    .product-image {
        height: 160px;
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    /* 确保精选标签在小屏幕上正常显示 */
    .featured-badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.6rem !important;
        top: 5px !important;
        right: 5px !important;
    }
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
    .card-hover:hover {
        transform: translateY(-4px);
        box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    }
}

/* Smooth transitions */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    pointer-events: auto; /* Ensure modal can receive events */
}

/* Fix for bp5 button accessibility issues */
.bp5-button {
    position: relative;
}

.bp5-button .btn-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
}

.bp5-button:not([title]):not([aria-label]) {
    position: relative;
}

.bp5-button:not([title]):not([aria-label])::after {
    content: "按钮";
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Fix for hidden elements with focusable content */
.bp5-collapse-body[aria-hidden="true"] {
    display: none !important;
}

.bp5-collapse-body[aria-hidden="true"] * {
    visibility: hidden !important;
    pointer-events: none !important;
}

.modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, color 0.3s ease;
    pointer-events: auto;
    z-index: 10001; /* Ensure content is above background */
}

/* 暗黑模式下的弹窗样式 */
[data-theme="dark"] .modal-content {
    background: var(--bg-card) !important;
    color: var(--text-primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .modal-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .qr-label {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .modal-close {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-close:hover {
    background: var(--border-color) !important;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.qr-code-container {
    text-align: center;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 1rem;
    border: 3px solid #f0f0f0;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.qr-code img {
    width: 100%;
    height: 100%;
}

.qr-label {
    font-size: 1.1rem;
    color: #666;
    margin-top: 0.5rem;
    font-weight: 500;
}

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

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

/* A4: 尊重用户“减少动效”偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
    .logo .site-logo,
    .btn-glow::before,
    .modal-content {
        animation: none !important;
    }
    .logo .site-logo {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    .header { transform: none !important; }
    .hero-card,
    .hero-card-inner,
    .hero-card-main,
    .card-hover,
    .product-card,
    .news-card {
        transition: none !important;
        transform: none !important;
    }
    .card-hover:hover,
    .product-card:hover,
    .news-card:hover {
        transform: none !important;
    }
}

/* Product Template Styles */
.product-template-classic .product-detail-content {
    display: block;
}

.product-template-classic .product-detail-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.product-template-modern .product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.product-template-minimal .product-detail-content {
    max-width: 800px;
    margin: 0 auto;
}

.product-template-minimal .product-detail-image {
    width: 100%;
    margin-bottom: 2rem;
}

.product-template-wide .product-detail-content {
    display: block;
}

.product-template-wide .product-detail-image {
    width: 100%;
    margin-bottom: 2rem;
}

.product-template-wide .download-section {
    max-width: 100%;
}

/* ========================================
   Dark Mode Styles
   ======================================== */

/* Apply theme variables to components */
.card, .product-card {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .card:hover, .product-card:hover {
        box-shadow: 0 8px 30px var(--shadow-hover);
    }
}

/* Hero section in dark mode（覆盖各页 hero 内联 background） */
[data-theme="dark"] .hero,
[data-theme="dark"] .news-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
}

/* Product sections */
[data-theme="dark"] section {
    background: var(--bg-secondary);
}

[data-theme="dark"] .product-description,
[data-theme="dark"] .product-content p {
    color: var(--text-secondary);
}

/* Footer in dark mode */
[data-theme="dark"] footer {
    background: #0a0a0a;
    border-top: 1px solid var(--border-color);
}

/* Forms in dark mode */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Theme Toggle in Header */
.theme-toggle-container {
    margin-left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 1rem;
    height: 100%;
}

.theme-switch {
    position: relative;
    width: 60px;
    height: 30px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switch-track {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.theme-switch-thumb {
    position: absolute;
    top: 50%;
    left: 4px;
    width: 22px;
    height: 22px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--shadow);
    transform: translateY(-50%);
}

.theme-switch-thumb .theme-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.theme-switch:hover .theme-switch-track {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-switch:hover .theme-switch-thumb {
    transform: translateY(-50%) scale(1.05);
}

/* Dark mode state */
[data-theme="dark"] .theme-switch-thumb {
    transform: translateX(30px) translateY(-50%);
    background: var(--primary-light);
    color: var(--primary);
}

[data-theme="dark"] .theme-switch-track {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-switch:hover .theme-switch-track {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Icon rotation animation */
.theme-switch .theme-icon {
    transition: transform 0.5s ease;
}

.theme-switch:hover .theme-icon {
    transform: rotate(20deg);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .header {
    background: var(--bg-gradient);
    box-shadow: 0 2px 8px var(--shadow);
}

[data-theme="dark"] .btn-outline {
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

[data-theme="dark"] .product-meta span {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .download-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .download-link {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .download-link:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--accent);
}

/* Smooth theme transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Keep gradient buttons bright in both modes */
.btn, .btn-primary, .btn-download {
    /* These maintain their gradient in both modes */
    opacity: 1;
}

[data-theme="dark"] .btn-secondary {
    background: rgba(102, 126, 234, 0.3);
    color: #e0e0e0;
}

/* Mobile responsive for theme toggle */
@media (max-width: 768px) {
    .theme-toggle-container {
        margin-left: 0.5rem;
    }
    
    .theme-switch {
        width: 50px;
        height: 25px;
    }
    
    .theme-switch-thumb {
        width: 19px;
        height: 19px;
        left: 3px;
    }
    
    .theme-switch-thumb .theme-icon {
        font-size: 10px;
    }
    
    [data-theme="dark"] .theme-switch-thumb {
        transform: translateX(25px) translateY(-50%);
    }
}

/* Product Sub Navigation 样式 */
.product-sub-nav {
    background: #f1f5f9 !important; /* 浅灰色背景，明显区别于白色 */
    z-index: 99 !important; /* 确保小于header的z-index: 1000，不会覆盖header */
}

/* Product Sub Navigation dark mode fix */
[data-theme="dark"] .product-sub-nav {
    background: var(--bg-card) !important;
    border-bottom-color: var(--border-color) !important;
}

/* 暗黑模式下修复产品详情页下载按钮 */
[data-theme="dark"] .download-hero-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .download-hero-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* News and docs pages dark mode */
[data-theme="dark"] .news-item,
[data-theme="dark"] .news-grid article,
[data-theme="dark"] .news-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .filter-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .filter-btn.active {
    background: #667eea;
    color: white;
}

/* 暗黑模式下新闻筛选区域 */
[data-theme="dark"] .news-filters {
    background: var(--bg-secondary) !important;
    border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .news-filters select,
[data-theme="dark"] .news-filters .search-box {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .news-filters select option {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* 暗黑模式下新闻列表区域 */
[data-theme="dark"] .news-section {
    background: var(--bg-secondary) !important;
}

/* 暗黑模式下新闻卡片文字颜色 */
[data-theme="dark"] .news-card-body h3 a {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .news-card-body h3 a:hover {
    color: var(--accent) !important;
}

[data-theme="dark"] .news-excerpt {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .news-date {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .news-card .btn-outline {
    background: var(--bg-card) !important;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

[data-theme="dark"] .news-card .btn-outline:hover {
    background: var(--accent) !important;
    color: white !important;
}

/* Admin panel dark mode support */
[data-theme="dark"] .admin-header,
[data-theme="dark"] .admin-sidebar {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Additional Dark Mode Refinements */

/* Hero section text visibility */
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero p {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Stats section in dark mode */
[data-theme="dark"] .stats-section {
    background: var(--bg-card);
}

[data-theme="dark"] .stat-number {
    color: #ffffff;
}

/* Product grid in dark mode */
[data-theme="dark"] .products-grid {
    background: transparent;
}

/* Product title and text */
[data-theme="dark"] .product-title,
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4 {
    color: var(--text-primary);
}

/* Back to top button in dark mode */
[data-theme="dark"] .back-to-top {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Message boxes in dark mode */
[data-theme="dark"] .message {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Section backgrounds */
[data-theme="dark"] section[style*="background: #f8f9fa"],
[data-theme="dark"] section[style*="background: white"] {
    background: var(--bg-secondary) !important;
}

/* "立即开始"卡片暗黑模式支持 */
.start-card {
    background: white;
    color: #333;
    transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .start-card {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

[data-theme="dark"] .start-card h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .start-card p {
    color: var(--text-secondary) !important;
}

/* 产品卡片图标区域暗黑模式支持 */
[data-theme="dark"] .product-image {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .product-image {
    color: #a0a8ff;
}

/* Keep feature icons vibrant */
[data-theme="dark"] .feature-item [style*="background: linear-gradient"] {
    opacity: 0.9;
}

/* Links in dark mode */
[data-theme="dark"] a:not(.btn):not(.logo):not([class*="nav"]) {
    color: #8fa6ff;
}

[data-theme="dark"] a:not(.btn):not(.logo):not([class*="nav"]):hover {
    color: #b8c7ff;
}

/* Empty state in dark mode */
[data-theme="dark"] .empty-state {
    color: var(--text-secondary);
}

/* Mobile menu in dark mode */
[data-theme="dark"] .mobile-menu {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

/* Version and size badges in dark mode */
[data-theme="dark"] .product-version,
[data-theme="dark"] .product-size,
[data-theme="dark"] .product-download-options {
    background: rgba(102, 126, 234, 0.2) !important;
    color: #a0a8ff !important;
}

/* Pagination in dark mode */
[data-theme="dark"] .pagination .btn-outline {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Featured badge */
[data-theme="dark"] .featured-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Contact section */
[data-theme="dark"] #contact {
    background: var(--bg-secondary) !important;
}

/* About section */
[data-theme="dark"] #about,
[data-theme="dark"] .about-section {
    background: var(--bg-secondary) !important;
}

/* About Section文字颜色暗黑模式支持 */
.about-title {
    color: #333;
    transition: color 0.3s ease;
}

.feature-title {
    color: #333;
    transition: color 0.3s ease;
}

.feature-desc {
    color: #666;
    transition: color 0.3s ease;
}

[data-theme="dark"] .about-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .feature-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .feature-desc {
    color: var(--text-secondary) !important;
}

/* Smooth transitions for theme switching */
.hero, .stats-section, section, .card, .product-card, 
.header, footer, .btn-outline, .download-link {
    transition: all 0.3s ease !important;
}

/* ========================================
   Dropdown Navigation Menu
   ======================================== */

.nav {
    position: relative;
}

.nav-item {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 1rem;
    margin-top: 0.5rem;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem; /* 已经是 16px，足够 44px 触摸目标 */
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    cursor: pointer;
    min-height: 44px; /* 确保触摸目标至少 44px */
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    font-weight: 600;
}

@media (hover: hover) {
    .dropdown-item:hover {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        transform: translateX(5px);
    }
    
    .download-dropdown-item:hover {
        background: var(--bg-hover);
        transform: translateX(3px);
    }
}

.download-dropdown-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.75rem 1rem; /* 增加 padding 以确保触摸目标 */
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 44px; /* 确保触摸目标至少 44px */
}

.download-dropdown-item:hover {
    background: var(--bg-hover);
    transform: translateX(3px);
}

.dropdown-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dropdown-content {
    flex: 1;
}

.dropdown-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: #333;
}

.dropdown-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.dropdown-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.dropdown-link {
    color: var(--accent);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.dropdown-link:hover {
    background: rgba(37, 99, 235, 0.1);
}

/* Dark mode dropdown styles */
[data-theme="dark"] .dropdown-menu {
    background: var(--bg-card);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .dropdown-title {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-desc {
    color: var(--text-secondary);
}

/* Mobile dropdown */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0.5rem;
        display: none;
    }
    
    .nav-item.mobile-open .dropdown-menu {
        display: block;
    }
}

/* ========================================
   3D Image Tilt Effect
   ======================================== */

.product-detail-image {
    perspective: 1000px;
    transition: all 0.3s ease;
}

.product-detail-image img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.product-detail-image.tilt-active img {
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* QR Container 3D Tilt Effect */
.qr-container {
    perspective: 1000px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qr-container img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.qr-container.tilt-active {
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.qr-container.tilt-active img {
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* Product showcase section */
.product-showcase {
    background: var(--primary);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.product-showcase::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M1200 120L0 16.48V0h1200z" fill="%23fff" fill-opacity=".1"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.product-hero-image {
    position: relative;
    perspective: 1500px;
}

.product-hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
    transform-style: preserve-3d;
    transition: all 0.3s ease;
}

.product-hero-content {
    color: white;
}

.product-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.product-title-large {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.feature-list {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item-inline {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature-icon-small {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Product details section */
.product-details-section {
    padding: 4rem 0;
    background: white;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.detail-card {
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.detail-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.detail-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.detail-desc {
    color: #666;
    line-height: 1.6;
}

/* Dark mode adjustments */
[data-theme="dark"] .product-showcase {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

[data-theme="dark"] .detail-card {
    background: var(--bg-card);
}

[data-theme="dark"] .detail-title {
    color: var(--text-primary);
}

[data-theme="dark"] .detail-desc {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .product-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-title-large {
        font-size: 2rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Pro Template Style
   ======================================== */

.product-template-pro {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    min-height: 100vh;
}

.product-template-pro .product-detail-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
    padding: 4rem 0;
}

.product-template-pro .product-detail-image {
    order: 2;
    position: sticky;
    top: 100px;
}

.product-template-pro .product-detail-info {
    order: 1;
}

.product-template-pro h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.product-template-pro .product-meta {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.product-template-pro .product-meta span {
    background: rgba(52, 152, 219, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.product-template-pro .product-detail-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
    margin: 2rem 0;
}

.product-template-pro .download-section {
    background: rgba(255,255,255,0.05);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.product-template-pro .download-section h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.product-template-pro .download-link {
    background: var(--accent);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px var(--shadow);
}

.product-template-pro .download-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-hover);
}

/* Hero Template */
.product-template-hero {
    background: var(--primary);
    color: var(--primary-light);
    padding: 6rem 0;
}

.product-template-hero .product-detail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.product-template-hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

/* Split Template */
.product-template-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.product-template-split .product-detail-image {
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.product-template-split .product-detail-info {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card Template */
.product-template-card .product-detail-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.product-template-card .product-detail-image,
.product-template-card .product-detail-info {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-template-pro .product-detail-content,
    .product-template-split {
        grid-template-columns: 1fr;
    }
    
    .product-template-pro h1 {
        font-size: 2rem;
    }
    
    .product-template-hero h1 {
        font-size: 2.5rem;
    }
}

/* Dark mode adjustments for templates */
[data-theme="dark"] .product-template-card .product-detail-image,
[data-theme="dark"] .product-template-card .product-detail-info {
    background: var(--bg-card);
}

/* 新闻页面样式 */
.news-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 4rem 0;
    text-align: center;
}

.news-hero,
.news-hero *,
.news-hero .hero-content,
.news-hero .hero-content * {
    color: white !important;
}

.news-hero .gradient-text {
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.news-hero h1,
.news-hero .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: white !important;
}

.news-hero p,
.news-hero .hero-content p {
    font-size: 1.2rem;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.95) !important;
}

.news-filters {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.news-list {
    padding: 3rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-section);
    margin-bottom: var(--space-section);
}

.news-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card-header {
    padding: 1.5rem 1.5rem 0;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.news-category {
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.news-date {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-product {
    color: var(--accent);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-card-body {
    padding: 1.5rem;
}

.news-title {
    margin-bottom: 1rem;
}

.news-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--accent);
}

.news-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-card-footer {
    padding: 0 1.5rem 1.5rem;
}

.no-news {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-news i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 新闻详情页面 */
.news-detail-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 3rem 0;
}

.news-detail-hero,
.news-detail-hero *,
.news-detail-hero .news-detail-header,
.news-detail-hero .news-detail-header * {
    color: white !important;
}

.news-detail-hero .news-breadcrumb a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.news-detail-hero .news-breadcrumb a:hover {
    color: white !important;
}

.news-detail-hero .news-breadcrumb span {
    color: rgba(255, 255, 255, 0.7) !important;
}

.news-detail-hero .news-meta span,
.news-detail-hero .news-category,
.news-detail-hero .news-date,
.news-detail-hero .news-product {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.news-detail-hero .news-title {
    color: white !important;
}

.news-breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.news-breadcrumb a {
    color: var(--primary-light);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.news-breadcrumb a:hover {
    opacity: 1;
}

.news-breadcrumb span {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.news-detail-header .news-meta {
    margin-bottom: 1.5rem;
}

.news-detail-header .news-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.news-detail-content {
    padding: 3rem 0;
}

.news-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.news-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.news-body {
    padding: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.news-body h1,
.news-body h2,
.news-body h3,
.news-body h4,
.news-body h5,
.news-body h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.news-body p {
    margin-bottom: 1.5rem;
}

.news-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.news-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

.news-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.news-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-label {
    font-weight: 500;
    color: #666;
}

.tag {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.news-actions {
    display: flex;
    gap: 0.5rem;
}

.related-news {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    height: fit-content;
}

.related-news h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.related-news-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.related-news-item:last-child {
    border-bottom: none;
}

.related-news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.related-news-category {
    color: var(--accent);
    font-weight: 500;
}

.related-news-date {
    color: var(--text-tertiary);
}

.related-news-item h4 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.related-news-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-news-item a:hover {
    color: var(--accent);
}

/* 分页样式 */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.pagination-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* 响应式新闻页面 */
@media (max-width: 768px) {
    .news-hero h1 {
        font-size: 2rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .news-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .news-detail-header .news-title {
        font-size: 1.75rem;
    }
    
    .news-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Small button utility */
.btn-sm {
    padding: 0.75rem 1.25rem; /* 增加 padding 以确保触摸目标至少 44px */
    font-size: 0.9rem;
    min-height: 44px; /* 提升到 44px 以满足可访问性标准 */
}

/* Keep small buttons compact inside product actions */
.product-actions .btn.btn-sm {
    min-height: 44px; /* 提升到 44px 以满足可访问性标准 */
    padding: 0.75rem 1.25rem; /* 增加 padding 以确保触摸目标 */
    font-size: 0.9rem;
}

/* SVG Icons Styles */
.icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-wrapper svg {
    display: block;
    flex-shrink: 0;
}

/* Theme icon styles */
.theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Icon size variants */
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }
