@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
/* 使用font-display: swap优化字体加载 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局字体优化 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1;
    font-kerning: normal;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* 完全隐藏禁用的支持链接（与背景色融为一体） */
.contact-btn[style*="display: none"],
.contact-btn.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    color: transparent !important;
    background: transparent !important;
    border: none !important;
    pointer-events: none !important;
}

/* 暗黑模式字体优化 */
body:not(.light-theme),
body.dark-theme {
    color: #f1f5f9;
    text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.03);
}

body:not(.light-theme) p,
body.dark-theme p {
    color: #e2e8f0;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

body:not(.light-theme) h1,
body:not(.light-theme) h2,
body:not(.light-theme) h3,
body:not(.light-theme) h4,
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4 {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
}

/* 明亮模式字体优化 */
body.light-theme {
    color: #1e293b;
    text-shadow: none;
}

body.light-theme p {
    color: #475569;
    line-height: 1.7;
    letter-spacing: 0;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4 {
    color: #0f172a;
    text-shadow: none;
    letter-spacing: -0.015em;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --border-color: #334155;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-tech: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
}

/* 明亮主题变量 */
body.light-theme {
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.95);
}

body.light-theme {
    color: var(--text-primary);
    background: var(--bg-primary);
}

body.light-theme .header {
    background: var(--header-bg);
    border-bottom-color: var(--border-color);
}

body.light-theme .nav-link {
    color: var(--text-secondary);
}

body.light-theme .nav-link:hover {
    color: var(--primary-color);
}

body.light-theme .service-card,
body.light-theme .case-card,
body.light-theme .tech-item {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.light-theme .modal-content {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

body.light-theme .modal-content h2 {
    color: var(--text-primary);
}

body.light-theme .modal-subtitle {
    color: var(--text-secondary);
}

body.light-theme .form-group label {
    color: var(--text-primary);
}

body.light-theme .close {
    color: var(--text-secondary);
}

body.light-theme .close:hover,
body.light-theme .close:focus {
    color: var(--primary-color);
}

body.light-theme .footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
    color: var(--text-primary);
}

body.light-theme .footer-section h4 {
    color: #1e293b;
}

body.light-theme .footer-section p {
    color: #334155;
}

body.light-theme .footer-section ul li a {
    color: #334155;
}

body.light-theme .footer a {
    color: var(--text-secondary);
}

body.light-theme .footer a:hover {
    color: var(--primary-color);
}

body.light-theme .hero-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

body.light-theme .stat-label {
    color: var(--text-secondary);
}

body.light-theme .section-title,
body.light-theme .section-subtitle {
    color: var(--text-primary);
}

body.light-theme .service-card h3,
body.light-theme .case-card h3 {
    color: var(--text-primary);
}

body.light-theme .service-card p,
body.light-theme .case-card p {
    color: var(--text-secondary);
}

body.light-theme .service-features li {
    color: var(--text-secondary);
}

body.light-theme .tech-name {
    color: var(--text-primary);
}

body.light-theme .tech-tags span {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.light-theme .social-link {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #475569;
}

body.light-theme .social-link:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

body.light-theme .social-link svg {
    color: #475569;
    fill: none;
}

body.light-theme .social-link svg path,
body.light-theme .social-link svg polyline {
    fill: none;
    stroke: currentColor;
}

body.light-theme .social-link:hover svg {
    color: var(--primary-color);
    fill: none;
}

body.light-theme .social-link:hover svg path,
body.light-theme .social-link:hover svg polyline {
    fill: none;
    stroke: currentColor;
}

body.light-theme .article-card,
body.light-theme .project-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.light-theme .article-card:hover,
body.light-theme .project-card:hover {
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.12);
}

body.light-theme .article-title,
body.light-theme .project-header h3 {
    color: var(--text-primary);
}

body.light-theme .article-excerpt,
body.light-theme .project-desc,
body.light-theme .about-text p {
    color: var(--text-secondary);
}

body.light-theme .hero-subtitle {
    color: #475569;
    font-weight: 500;
}

body.light-theme .article-date,
body.light-theme .project-stats {
    color: var(--text-secondary);
}

body.light-theme .article-category,
body.light-theme .project-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    text-decoration: none;
}

body.light-theme .article-category:hover,
body.light-theme .project-tag:hover {
    text-decoration: none;
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
    background: #ffffff;
    color: var(--text-primary);
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 更具体的选择器，确保表单输入框样式生效 */
body.light-theme .form-group input,
body.light-theme .form-group select {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    outline: none;
}

body.light-theme .form-group input:focus,
body.light-theme .form-group select:focus {
    background: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    outline: none;
}

body.light-theme input::placeholder {
    color: #94a3b8;
}

body.light-theme .form-group input::placeholder {
    color: #94a3b8 !important;
}

body.light-theme select {
    background: #ffffff;
    color: var(--text-primary);
}

body.light-theme .form-group select {
    background: #ffffff !important;
    color: var(--text-primary) !important;
}

body.light-theme select option {
    background: #ffffff;
    color: var(--text-primary);
}

body.light-theme .form-group select option {
    background: #ffffff !important;
    color: var(--text-primary) !important;
}

body.light-theme label {
    color: var(--text-primary);
}

/* 明亮主题下的技术栈和视频部分美化 */
body.light-theme .technology {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

body.light-theme .technology::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.light-theme .technology .container {
    position: relative;
    z-index: 1;
}

body.light-theme .video-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

body.light-theme .video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body.light-theme .video-section .container {
    position: relative;
    z-index: 1;
}

body.light-theme .tech-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

body.light-theme .tech-item:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translate3d(0, -4px, 0);
}

body.light-theme .video-container {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.95);
}

body {
    font-family: 'Inter', 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: var(--bg-primary);
    overflow-x: hidden;
    position: relative;
    /* 优化渲染性能 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 优化滚动性能 */
    overscroll-behavior: none;
    /* 初始隐藏，避免闪烁 */
    opacity: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 背景动画 - 完全移除以提升滚动性能 */
.bg-animation {
    display: none; /* 完全隐藏背景动画，提升滚动性能 */
}

/* 标题栏 */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* 优化滚动性能 */
    transform: translateZ(0);
    will-change: transform;
    contain: layout style paint;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(5deg);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1.2;
}

.logo-text {
    letter-spacing: 0.05em;
    font-weight: 700;
}

/* Logo 动画 */
@keyframes logoRotate {
    0% {
        transform: translate(32px, 32px) rotate(0deg);
    }
    100% {
        transform: translate(32px, 32px) rotate(360deg);
    }
}

.logo-icon svg .gear-rotate {
    animation: logoRotate 20s linear infinite;
    transform-origin: 32px 32px;
    will-change: transform;
}

.logo:hover .logo-icon svg .gear-rotate {
    animation-duration: 5s;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 雪花按钮 - 只在黑暗主题下显示 */
.snow-toggle {
    display: none; /* 默认隐藏 */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/* 只在黑暗主题下显示 */
body:not(.light-theme) .snow-toggle {
    display: flex;
}

.snow-toggle:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.snow-toggle.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.snow-icon {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

.snow-toggle:hover .snow-icon {
    transform: rotate(180deg) scale(1.1);
    filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.8));
}

.snow-toggle.active .snow-icon {
    animation: snowGlow 2s ease-in-out infinite;
}

@keyframes snowGlow {
    0%, 100% {
        filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(99, 102, 241, 1));
        transform: scale(1.15);
    }
}

/* 小太阳按钮样式 */
.sun-toggle {
    display: none; /* 默认隐藏 */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/* 只在明亮主题下显示 */
body.light-theme .sun-toggle {
    display: flex;
}

.sun-toggle:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.sun-toggle.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-color: #f59e0b;
}

.sun-icon {
    font-size: 1.3rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.6));
    -webkit-animation: sunBounce 2s ease-in-out infinite;
    -moz-animation: sunBounce 2s ease-in-out infinite;
    -o-animation: sunBounce 2s ease-in-out infinite;
    animation: sunBounce 2s ease-in-out infinite;
}

@keyframes sunBounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.05) rotate(-5deg);
    }
    50% {
        transform: scale(1.1) rotate(0deg);
    }
    75% {
        transform: scale(1.05) rotate(5deg);
    }
}

.sun-toggle:hover .sun-icon {
    transform: rotate(360deg) scale(1.2);
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 1));
    animation: sunSpin 0.6s ease-in-out;
}

@keyframes sunSpin {
    0% {
        transform: rotate(0deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1.2);
    }
}

.sun-toggle.active .sun-icon {
    -webkit-animation: sunGlow 2s ease-in-out infinite;
    -moz-animation: sunGlow 2s ease-in-out infinite;
    -o-animation: sunGlow 2s ease-in-out infinite;
    animation: sunGlow 2s ease-in-out infinite;
}

@keyframes sunGlow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8)) drop-shadow(0 0 8px rgba(255, 193, 7, 0.6));
        transform: scale(1) rotate(0deg);
    }
    25% {
        filter: drop-shadow(0 0 6px rgba(251, 191, 36, 1)) drop-shadow(0 0 12px rgba(255, 193, 7, 0.8));
        transform: scale(1.1) rotate(-10deg);
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(251, 191, 36, 1)) drop-shadow(0 0 16px rgba(255, 193, 7, 1));
        transform: scale(1.15) rotate(0deg);
    }
    75% {
        filter: drop-shadow(0 0 6px rgba(251, 191, 36, 1)) drop-shadow(0 0 12px rgba(255, 193, 7, 0.8));
        transform: scale(1.1) rotate(10deg);
    }
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.theme-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon.sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.theme-icon.moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

body.light-theme .theme-icon.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

body.light-theme .theme-icon.moon-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.language-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    min-width: 50px;
}

.lang-btn:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    cursor: pointer;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-tech);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #fff;
}

.nav-link:hover::after {
    width: 100%;
}

/* 主要内容 */
.hero {
    position: relative;
    padding: 6rem 0 4rem;
    text-align: center;
    z-index: 1;
    overflow: hidden;
    /* 优化滚动性能 */
    transform: translateZ(0);
    contain: layout style paint;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 50px;
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    /* 移除动画，减少初始加载负担 */
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* 翻转卡片容器 */
.hero-title-flip-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    cursor: pointer;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.flip-card.flipped {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: relative;
    width: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flip-card-back {
    transform: rotateY(180deg);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    animation: fadeInUp 0.8s ease-out forwards;
    will-change: transform, opacity;
    text-align: center;
    width: 100%;
}

/* 只有calligraphy-text时才使用flex横向布局 */
.hero-title.calligraphy-text {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* 行书字体效果 - 与gradient-text样式一致 */
.calligraphy-text {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    /* 默认使用行书字体 */
    font-family: 
        'STXingkai', '华文行楷',           /* Windows 常见行书 */
        'XingKai', '行楷',                /* 通用行楷 */
        'FZXingKai-S04S', '方正行楷',     /* 方正行楷 */
        'HYXingKaiJ', '汉仪行楷',         /* 汉仪行楷 */
        'KaiTi', '楷体',                  /* 楷体备选 */
        'STKaiti', '华文楷体',            /* 华文楷体 */
        serif;
    font-style: normal;
    font-variant: normal;
}

.calligraphy-char {
    display: inline-block;
    font-size: 4rem;
    font-weight: 600;
    white-space: nowrap;
    /* 默认使用行书字体 */
    font-family: 
        'STXingkai', '华文行楷',           /* Windows 常见行书 */
        'XingKai', '行楷',                /* 通用行楷 */
        'FZXingKai-S04S', '方正行楷',     /* 方正行楷 */
        'HYXingKaiJ', '汉仪行楷',         /* 汉仪行楷 */
        'KaiTi', '楷体',                  /* 楷体备选 */
        'STKaiti', '华文楷体',            /* 华文楷体 */
        serif;
    font-style: normal;
    font-variant: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.2;
    position: relative;
    opacity: 0;
    transform: translateY(30px) scale(0.7) rotate(-5deg);
    animation: calligraphyAppear 0.6s ease-out forwards;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.1em;
    will-change: transform, opacity;
}

.calligraphy-char:nth-child(1) { animation-delay: 0.1s; }
.calligraphy-char:nth-child(2) { animation-delay: 0.2s; }
.calligraphy-char:nth-child(3) { animation-delay: 0.3s; }
.calligraphy-char:nth-child(4) { animation-delay: 0.4s; }

.calligraphy-char::before {
    content: attr(data-char);
    position: absolute;
    top: 0;
    left: 0;
    color: rgba(99, 102, 241, 0.1);
    z-index: -1;
    transform: translate(2px, 2px);
}

.calligraphy-char:nth-child(1) { animation-delay: 0.1s; }
.calligraphy-char:nth-child(2) { animation-delay: 0.2s; }
.calligraphy-char:nth-child(3) { animation-delay: 0.3s; }
.calligraphy-char:nth-child(4) { animation-delay: 0.4s; }

@keyframes calligraphyAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.7) rotate(-5deg);
    }
    50% {
        transform: translateY(-8px) scale(1.08) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

/* 标题字符弹出动画 */
.char-item {
    display: inline-block;
    animation: titleCharAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    /* 优化动画性能 */
    will-change: transform, opacity, filter;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.char-item:nth-child(1) { animation-delay: 0.05s; }
.char-item:nth-child(2) { animation-delay: 0.1s; }
.char-item:nth-child(3) { animation-delay: 0.15s; }
.char-item:nth-child(4) { animation-delay: 0.2s; }
.char-item:nth-child(5) { animation-delay: 0.25s; }
.char-item:nth-child(6) { animation-delay: 0.3s; }
.char-item:nth-child(7) { animation-delay: 0.35s; }
.char-item:nth-child(8) { animation-delay: 0.4s; }
.char-item:nth-child(9) { animation-delay: 0.45s; }
.char-item:nth-child(10) { animation-delay: 0.5s; }
.char-item:nth-child(11) { animation-delay: 0.55s; }
.char-item:nth-child(12) { animation-delay: 0.6s; }
.char-item:nth-child(13) { animation-delay: 0.65s; }
.char-item:nth-child(14) { animation-delay: 0.7s; }
.char-item:nth-child(15) { animation-delay: 0.75s; }
.char-item:nth-child(16) { animation-delay: 0.8s; }
.char-item:nth-child(17) { animation-delay: 0.85s; }
.char-item:nth-child(18) { animation-delay: 0.9s; }
.char-item:nth-child(19) { animation-delay: 0.95s; }
.char-item:nth-child(20) { animation-delay: 1s; }

@keyframes titleCharAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.5) rotate(-8deg);
        filter: blur(4px);
    }
    30% {
        opacity: 0.8;
        transform: translateY(-12px) scale(1.15) rotate(3deg);
        filter: blur(1px);
    }
    60% {
        transform: translateY(4px) scale(0.95) rotate(-1deg);
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
        filter: blur(0px);
    }
}

body.light-theme .calligraphy-char {
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text {
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.9;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    will-change: transform, opacity;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    will-change: transform, opacity;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 8px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: #e2e8f0;
}

.social-link svg[stroke] path,
.social-link svg[stroke] polyline {
    fill: none;
    stroke: currentColor;
}

.social-link:hover {
    background: rgba(99, 102, 241, 0.35);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}



@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

.article-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.article-category {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-category:hover {
    background: rgba(99, 102, 241, 0.3);
    color: var(--accent-color);
    transform: translateY(-1px);
    text-decoration: none;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-excerpt {
    color: #cbd5e1;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    flex: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

.article-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.article-link:hover {
    color: var(--accent-color);
    gap: 0.75rem;
}

/* 项目网格 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1;
}

.project-link {
    color: #cbd5e1;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.project-link:hover {
    color: var(--primary-color);
}

.project-link svg {
    width: 24px;
    height: 24px;
}

.project-desc {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.project-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 关于我部分 */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    text-align: left;
}

.about-text p {
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* 服务部分 */
.services {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    /* 优化滚动性能 */
    transform: translateZ(0);
    contain: layout style paint;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #94a3b8;
}

/* 浏览量计数器 */
.view-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1rem 2rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.view-counter:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.counter-label {
    font-size: 1rem;
    color: #cbd5e1;
    font-weight: 550;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 翻页时钟计数器 */
.flip-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    perspective: 1000px;
}

.flip-digit {
    position: relative;
    display: inline-block;
    width: 2.5rem;
    height: 3rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
    overflow: visible;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 整页卡片 - 显示数字（正面） */
.flip-card-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    backface-visibility: hidden;
    transform-origin: center;
    transform: rotateX(0deg);
    transform-style: preserve-3d;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flip-card-top::before {
    content: attr(data-content);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 整页卡片 - 准备显示新数字（背面，初始隐藏） */
.flip-card-bottom {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    backface-visibility: hidden;
    transform-origin: center;
    transform: rotateX(180deg);
    transform-style: preserve-3d;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.flip-card-bottom::before {
    content: attr(data-content);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 重置状态 - 翻转完成后 */
.flip-digit:not(.flip) .flip-card-top {
    transform: rotateX(0deg);
    z-index: 2;
}

.flip-digit:not(.flip) .flip-card-bottom {
    transform: rotateX(180deg);
    z-index: 1;
}

/* 整页翻转动画 - 正面向前翻转隐藏 */
.flip-digit.flip .flip-card-top {
    transform: rotateX(-180deg);
    z-index: 1;
}

/* 整页翻转动画 - 背面从后面翻转到前面，显示新数字 */
.flip-digit.flip .flip-card-bottom {
    transform: rotateX(0deg);
    z-index: 2;
}

/* 卡片整体轻微缩放和阴影效果 */
.flip-digit.flip {
    animation: flipCardScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes flipCardScale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 明亮主题下的计数器 */
body.light-theme .view-counter {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-theme .view-counter:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

body.light-theme .counter-label {
    color: #64748b;
}

body.light-theme .flip-card-top,
body.light-theme .flip-card-bottom {
    background: var(--bg-card);
    border-color: rgba(99, 102, 241, 0.15);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    /* 使用containment优化渲染 */
    contain: layout style paint;
    /* 只在hover时使用will-change */
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-tech);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translate3d(0, -5px, 0);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.15);
    will-change: transform;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    transition: background 0.3s ease, transform 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
}

.service-card:hover .service-icon {
    background: rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.service-card p {
    color: #cbd5e1;
    line-height: 1.85;
    margin-bottom: 1.5rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

.service-features {
    list-style: none;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.service-features li {
    color: #cbd5e1;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* 技术栈 */
.technology {
    padding: 6rem 0;
    background: rgba(30, 41, 59, 0.5);
    position: relative;
    z-index: 1;
    /* 优化滚动性能 */
    transform: translateZ(0);
    contain: layout style paint;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tech-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    transform: translateZ(0);
    contain: layout style paint;
}

.tech-item:hover {
    transform: translate3d(0, -3px, 0);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
    will-change: transform;
}

.tech-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tech-tags span {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: var(--accent-color);
    font-size: 0.875rem;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    transform: translateZ(0);
    display: inline-block;
}

.tech-item:hover .tech-tags span {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
}

/* 案例展示 */
.cases {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    /* 优化滚动性能 */
    transform: translateZ(0);
    contain: layout style paint;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.case-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    contain: layout style paint;
}

.case-card:hover {
    transform: translate3d(0, -5px, 0);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.15);
    will-change: transform;
}

.case-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-tech);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    transition: transform 0.3s ease;
    transform: translateZ(0);
    will-change: transform;
}

.case-card:hover .case-icon {
    transform: scale(1.05);
}

.case-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.case-card p {
    color: #cbd5e1;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

/* 视频部分 */
.video-section {
    padding: 6rem 0;
    background: rgba(30, 41, 59, 0.5);
    position: relative;
    z-index: 1;
    /* 优化滚动性能 */
    transform: translateZ(0);
    contain: layout style paint;
}

.video-container {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: translateZ(0);
    /* 移除hover缩放，减少重绘 */
}

.video-container iframe {
    display: block;
    width: 100%;
    height: 500px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

.modal[style*="display: block"],
.modal.show {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-card);
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 2rem);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    position: relative;
    animation: slideUp 0.3s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate3d(0, 50px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.close {
    color: #94a3b8;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: clamp(1rem, 2vw, 1.5rem);
    top: clamp(1rem, 2vw, 1.5rem);
    transition: all 0.3s ease;
    line-height: 1;
    z-index: 10;
    flex-shrink: 0;
}

.close:hover,
.close:focus {
    color: #fff;
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    margin-top: 0;
    padding-right: 2.5rem; /* 为关闭按钮留出空间 */
    color: #fff;
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    flex-shrink: 0;
}

.modal-subtitle {
    color: #94a3b8;
    margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
    margin-top: 0;
    font-size: clamp(0.8125rem, 2.5vw, 0.95rem);
    line-height: 1.5;
    flex-shrink: 0;
}

/* 表单容器 - 可滚动 */
#contactForm {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

/* 消息提示容器 */
#message {
    flex-shrink: 0;
    margin-top: 1rem;
}

/* 自定义滚动条样式 */
#contactForm::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
}

#contactForm::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

#contactForm::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}

#contactForm::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    color: #fff;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: rgba(15, 23, 42, 0.7);
}

.form-group input::placeholder {
    color: #64748b;
}

/* 二维码容器样式 */
.qr-code-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-shrink: 0;
    justify-content: center;
    align-items: flex-start;
}

.qr-code-item {
    text-align: center;
    flex-shrink: 0;
}

.qr-code-item h3 {
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qr-code-image {
    display: inline-block;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 100%;
}

.qr-code-image img {
    width: 100%;
    max-width: 300px;
    min-width: 250px;
    height: auto;
    aspect-ratio: 1;
    display: block;
    border-radius: 8px;
}

.qr-placeholder {
    width: 100%;
    max-width: 300px;
    min-width: 250px;
    height: auto;
    aspect-ratio: 1;
    display: inline-block;
}

.qr-note {
    text-align: center;
    color: #94a3b8;
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    line-height: 1.6;
    flex-shrink: 0;
}

/* 感谢名单名字表单样式 */
.thanks-name-form {
    margin: 1.5rem 0;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.thanks-name-form .form-group {
    margin-bottom: 1.5rem;
}

.thanks-name-form label {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.thanks-name-form label .required {
    color: #ff6b6b;
    margin-left: 0.25rem;
}

.thanks-name-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.thanks-name-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.thanks-name-input::placeholder {
    color: #94a3b8;
}

.thanks-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-tech);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.thanks-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.thanks-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.thanks-form-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.5;
}

body.light-theme .thanks-name-form {
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--border-color);
}

body.light-theme .thanks-name-form label {
    color: var(--text-primary);
}

body.light-theme .thanks-name-form label .required {
    color: #ff6b6b;
}

body.light-theme .thanks-form-note {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .thanks-name-input {
    background: #f8fafc;
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.light-theme .thanks-name-input:focus {
    background: #fff;
    border-color: var(--accent-color);
}

body.light-theme .qr-code-item h3 {
    color: var(--text-primary);
}

body.light-theme .qr-code-image {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-theme .qr-note {
    color: var(--text-secondary);
    border-top-color: var(--border-color);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-tech);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.submit-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.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.submit-btn:active {
    transform: translate3d(0, 0, 0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.submit-btn.loading .btn-text {
    opacity: 0;
}

.submit-btn.loading .btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 性能优化：减少重绘 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 优化滚动性能 */
html {
    scroll-behavior: smooth;
    /* 优化滚动性能 */
    -webkit-overflow-scrolling: touch;
    /* 优化字体渲染 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 优化所有section的滚动性能 */
section {
    contain: layout style paint;
    transform: translateZ(0);
    /* 减少滚动时的重绘 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 优化合成层 */
    will-change: scroll-position;
}

/* 优化主要内容区域 */
main {
    transform: translateZ(0);
    /* 优化渲染性能 */
    contain: layout style paint;
    /* 优化滚动性能 */
    will-change: scroll-position;
}

/* 优化卡片和动画元素 */
.service-card,
.tech-item,
.case-card,
.article-card,
.project-card {
    transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, opacity;
    contain: layout style paint;
}

/* 优化hover效果 */
.service-card:hover,
.tech-item:hover,
.case-card:hover,
.article-card:hover,
.project-card:hover {
    transform: translate3d(0, -4px, 0);
    will-change: transform;
}

/* 雪花效果 */
.snowflake {
    position: fixed;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    user-select: none;
    pointer-events: none;
    z-index: 999;
    animation: snowfall linear forwards;
    /* 优化性能 */
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 使用GPU加速 */
    contain: layout style paint;
    /* 优化字体渲染 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 初始状态完全可见，立即开始掉落 */
    opacity: 1;
}

@keyframes snowfall {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--snow-drift, 0), var(--snow-distance, 100vh), 0) rotate(360deg);
        opacity: 0;
    }
}

/* 不同大小的雪花 */
.snowflake.small {
    font-size: 0.8em;
    animation-duration: 15s;
    animation-timing-function: linear;
}

.snowflake.medium {
    font-size: 1em;
    animation-duration: 18s;
    animation-timing-function: linear;
}

.snowflake.large {
    font-size: 1.2em;
    animation-duration: 20s;
    animation-timing-function: linear;
}

/* 花瓣效果（美丽风格，完全透明背景） */
.sun-particle {
    position: fixed;
    font-size: 1.2em;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne Mozilla", "Twemoji Mozilla", "Segoe UI Symbol", Arial, sans-serif;
    /* 柔和的粉色/花瓣色发光效果，背景完全透明 */
    text-shadow: 
        0 0 6px rgba(255, 182, 193, 0.5),
        0 0 12px rgba(255, 192, 203, 0.4),
        0 0 18px rgba(255, 105, 180, 0.35),
        0 0 24px rgba(255, 20, 147, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.1);
    user-select: none;
    pointer-events: none;
    z-index: 999;
    -webkit-animation: sunfall linear forwards;
    -moz-animation: sunfall linear forwards;
    -o-animation: sunfall linear forwards;
    animation: sunfall linear forwards;
    /* 优化性能 */
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 使用GPU加速 */
    contain: layout style paint;
    /* 优化字体渲染 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 初始状态更透明，背景更清晰 */
    opacity: 0.9;
    /* 柔和的透明发光效果（粉色系） */
    filter: drop-shadow(0 0 3px rgba(255, 182, 193, 0.4)) 
            drop-shadow(0 0 6px rgba(255, 192, 203, 0.35))
            drop-shadow(0 0 9px rgba(255, 105, 180, 0.3));
    /* 背景完全透明，移除所有背景色和边框 */
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    /* 移除emoji的背景方框 */
    -webkit-text-fill-color: currentColor;
    color: inherit;
    /* 使用混合模式让背景更透明 */
    mix-blend-mode: normal;
}

@keyframes sunfall {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    10% {
        transform: translate3d(calc(-5px + var(--sun-drift, 0) * 0.1), calc(var(--sun-distance, 100vh) * 0.1), 0) rotate(-8deg);
    }
    20% {
        transform: translate3d(calc(5px + var(--sun-drift, 0) * 0.2), calc(var(--sun-distance, 100vh) * 0.2), 0) rotate(8deg);
    }
    30% {
        transform: translate3d(calc(-4px + var(--sun-drift, 0) * 0.3), calc(var(--sun-distance, 100vh) * 0.3), 0) rotate(-5deg);
    }
    40% {
        transform: translate3d(calc(4px + var(--sun-drift, 0) * 0.4), calc(var(--sun-distance, 100vh) * 0.4), 0) rotate(5deg);
    }
    50% {
        transform: translate3d(calc(var(--sun-drift, 0) * 0.5), calc(var(--sun-distance, 100vh) * 0.5), 0) rotate(180deg);
    }
    60% {
        transform: translate3d(calc(var(--sun-drift, 0) * 0.6), calc(var(--sun-distance, 100vh) * 0.6), 0) rotate(250deg);
    }
    70% {
        transform: translate3d(calc(var(--sun-drift, 0) * 0.7), calc(var(--sun-distance, 100vh) * 0.7), 0) rotate(350deg);
    }
    80% {
        transform: translate3d(calc(var(--sun-drift, 0) * 0.8), calc(var(--sun-distance, 100vh) * 0.8), 0) rotate(450deg);
    }
    90% {
        transform: translate3d(calc(var(--sun-drift, 0) * 0.9), calc(var(--sun-distance, 100vh) * 0.9), 0) rotate(600deg);
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translate3d(var(--sun-drift, 0), var(--sun-distance, 100vh), 0) rotate(720deg);
        opacity: 0;
    }
}

/* 不同大小的小太阳 */
.sun-particle.small {
    font-size: 1em;
    -webkit-animation-duration: 15s;
    -moz-animation-duration: 15s;
    -o-animation-duration: 15s;
    animation-duration: 15s;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
    -o-animation-timing-function: linear;
    animation-timing-function: linear;
}

.sun-particle.medium {
    font-size: 1.3em;
    -webkit-animation-duration: 18s;
    -moz-animation-duration: 18s;
    -o-animation-duration: 18s;
    animation-duration: 18s;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
    -o-animation-timing-function: linear;
    animation-timing-function: linear;
}

.sun-particle.large {
    font-size: 1.6em;
    -webkit-animation-duration: 20s;
    -moz-animation-duration: 20s;
    -o-animation-duration: 20s;
    animation-duration: 20s;
    -webkit-animation-timing-function: linear;
    -moz-animation-timing-function: linear;
    -o-animation-timing-function: linear;
    animation-timing-function: linear;
}

/* 优化动画性能 - 使用GPU加速 */
.fade-in-item {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.fade-in-item.fade-in-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    will-change: auto;
}

/* 优化容器 */
.container {
    contain: layout style;
}

/* 减少动画在低性能设备上的影响 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    display: block;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: block;
}

/* 页脚 */
.footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
    /* position: relative; */
    z-index: 1;
    /* 优化滚动性能 */
    transform: translateZ(0);
    contain: layout style paint;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.3fr 1.2fr 1.5fr 1.2fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .footer-thanks-section {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .footer-thanks-section {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.125rem;
    }
    
    .footer-section h4 {
        font-size: 0.9375rem;
    }
}

.footer-section h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.footer-title-link {
    text-decoration: none;
    color: inherit;
    background: var(--gradient-tech);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.footer-title-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.footer-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.footer-section:first-child {
    padding-right: 0.5rem;
}

.footer-section:last-child {
    padding-left: 0.5rem;
}

.footer-section h4 {
    color: #f1f5f9;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    /* position: relative; */
    padding-bottom: 0.5rem;
}

.footer-section h4::after {
    content: '';
    /* position: absolute; */
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gradient-tech);
    border-radius: 2px;
}

.footer-section p {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 0.875rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    letter-spacing: 0.01em;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    display: inline-block;
    /* position: relative; */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.footer-section ul li a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.3s ease;
    margin-right: 0.25rem;
    color: var(--accent-color);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-section ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* 联系方式链接样式 - 暗黑模式下使用更亮的颜色 */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact-label {
    min-width: 60px;
    color: inherit;
    flex-shrink: 0;
}

.footer-contact-link {
    flex: 1;
    min-width: 0;
    color: #60a5fa !important; /* 使用亮蓝色，在暗黑模式下更清晰 */
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.footer-contact-link:hover {
    color: #93c5fd !important;
    -webkit-text-fill-color: #93c5fd;
    transform: translateY(-1px);
    filter: brightness(1.2);
}

/* 暗黑模式下联系方式文本颜色 */
body:not(.light-theme) .footer-contact-list li {
    color: #cbd5e1;
}

/* 亮色模式下联系方式链接样式 */
body.light-theme .footer-contact-list li {
    color: #1e293b; /* 深灰色，确保文本清晰可见 */
}

body.light-theme .footer-contact-link {
    color: #1e40af !important; /* 使用更深的蓝色，在明亮模式下更清晰 */
    -webkit-text-fill-color: #1e40af;
    background: none;
    font-weight: 600; /* 增加字重，使其更突出 */
}

body.light-theme .footer-contact-link:hover {
    color: #1e3a8a !important; /* hover时使用更深的蓝色 */
    -webkit-text-fill-color: #1e3a8a;
    text-decoration: underline; /* 添加下划线，增强可点击性 */
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    /* position: relative; */
}

.footer-bottom::before {
    content: '';
    /* position: absolute; */
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--gradient-tech);
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-bottom a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 备案信息样式 */
.footer-beian {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.beian-icon {
    height: 14px;
    width: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.beian-separator {
    margin: 0 0.5rem;
    color: #94a3b8;
}

/* 感谢名单样式 */
.footer-thanks-section {
    /* position: relative; */
    min-width: 0; /* 允许flex收缩 */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.footer-thanks-section h4 {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: keep-all;
    min-width: 0;
    width: 100%;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #f1f5f9;
}

.thanks-container {
    /* position: relative; */
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    overflow: hidden;
    width: 100%;
    flex: 1;
}

.thanks-scroll-wrapper {
    flex: 1;
    overflow: hidden;
    /* position: relative; */
    height: 6rem; /* 增大高度以显示2个名字：2.5rem * 2 + 0.75rem gap + 0.25rem padding = 6rem */
    contain: layout style paint;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.05);
    padding: 0.25rem;
}

.thanks-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: scrollThanksDown 30s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    animation-fill-mode: forwards;
}

.thanks-scroll-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: 0.75rem;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    /* position: relative; */
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.thanks-scroll-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

@keyframes scrollThanksDown {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, -50%, 0);
    }
}

/* 礼炮动画 */
.confetti {
    /* position: relative; */
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    overflow: visible;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: confettiShake 0.5s ease-in-out infinite;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

@keyframes confettiShake {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-10deg) scale(1.1);
    }
    75% {
        transform: rotate(10deg) scale(1.1);
    }
}

.confetti::before {
    content: '';
    /* position: absolute; */
    width: 100%;
    height: 100%;
    animation: confettiBurst 2s ease-out infinite;
    z-index: 10;
    pointer-events: none;
}

.confetti-left::before {
    animation-delay: 0s;
}

.confetti-right::before {
    animation-delay: 1s;
}

@keyframes confettiBurst {
    0% {
        transform: scale(0.8) rotate(0deg);
        opacity: 1;
    }
    20% {
        transform: scale(1.2) rotate(15deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.5) rotate(360deg);
        opacity: 0;
    }
}

/* 礼花洒落动画 */
.confetti-particles {
    /* position: absolute; */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

.confetti-particle {
    /* position: absolute; */
    font-size: 1.2rem;
    animation: particleFall linear forwards;
    opacity: 1;
    line-height: 1;
    pointer-events: none;
}

@keyframes particleFall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    30% {
        transform: translateY(30px) translateX(calc(var(--particle-x, 0) * 0.3)) rotate(180deg) scale(1.1);
        opacity: 0.9;
    }
    60% {
        transform: translateY(80px) translateX(calc(var(--particle-x, 0) * 0.7)) rotate(450deg) scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: translateY(180px) translateX(var(--particle-x, 0)) rotate(720deg) scale(0.4);
        opacity: 0;
    }
}

/* 明亮模式下的感谢名单样式 */
body.light-theme .thanks-scroll-item {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #475569;
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-theme .thanks-scroll-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

body.light-theme .footer-thanks-section h4 {
    color: #1e293b;
}

/* 滚动动画优化 - 减少移动距离和动画时间 */
.fade-in-item {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* 使用containment优化渲染性能 */
    contain: layout style paint;
}

.fade-in-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* 响应式设计 */
/* 中等屏幕（平板） */
@media (max-width: 1024px) and (min-width: 769px) {
    .modal-content {
        width: 100%;
        max-width: 450px;
        max-height: calc(100vh - 2rem);
        padding: 1.75rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content h2 {
        font-size: 1.75rem;
    }

    .modal-subtitle {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
}

/* 小屏幕（手机） */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-controls {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        order: 3;
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }
    
    .calligraphy-char {
        font-size: 3rem;
        gap: 0.5rem;
    }
    
    .calligraphy-text {
        gap: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-social {
        flex-direction: column;
        gap: 1rem;
    }

    .social-link {
        justify-content: center;
    }

    .articles-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .services-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 2rem);
        padding: 1.25rem;
        margin: 0;
    }

    .modal {
        padding: 1rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }

    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .modal-content h2 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
        margin-bottom: 0.5rem;
    }

    .modal-subtitle {
        font-size: clamp(0.8125rem, 3vw, 0.875rem);
        margin-bottom: 1.5rem;
        line-height: 1.4;
    }

    .submit-btn {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }
}

/* 超小屏幕（小手机） */
@media (max-width: 768px) {
    .view-counter {
        padding: 0.75rem 1.5rem;
        margin-bottom: 2rem;
        gap: 0.75rem;
    }
    
    .counter-label {
        font-size: 0.875rem;
    }
    
    .flip-digit {
        width: 2rem;
        height: 2.5rem;
        line-height: 2.5rem;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calligraphy-char {
        font-size: 2.5rem;
    }
    
    .calligraphy-text {
        gap: 0.4rem;
    }
    
    .view-counter {
        padding: 0.5rem 1rem;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .counter-label {
        font-size: 0.8125rem;
    }
    
    .flip-digit {
        width: 1.75rem;
        height: 2.25rem;
        line-height: 2.25rem;
        font-size: 1.25rem;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 1rem);
        padding: 1rem;
        border-radius: 16px;
        margin: 0;
    }

    .modal {
        padding: 0.5rem;
    }

    .modal-subtitle {
        margin-bottom: 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .form-group label {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .modal-content h2 {
        font-size: clamp(1.125rem, 6vw, 1.25rem);
        margin-bottom: 0.5rem;
        line-height: 1.3;
        padding-right: 2rem;
    }

    .modal-subtitle {
        font-size: clamp(0.75rem, 3.5vw, 0.8125rem);
        margin-bottom: 1.25rem;
        line-height: 1.4;
    }

    .submit-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    .close {
        font-size: 28px;
        right: 1rem;
        top: 1rem;
    }

    .qr-code-container {
        flex-direction: column;
        gap: 1.5rem;
        margin: 1rem 0;
    }

    .qr-code-item h3 {
        font-size: clamp(0.9375rem, 3vw, 1rem);
        margin-bottom: 0.75rem;
    }

    .qr-code-image {
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .qr-code-image img {
        max-width: 250px;
        min-width: 200px;
    }

    .qr-placeholder {
        max-width: 250px;
        min-width: 200px;
    }

    .qr-note {
        font-size: clamp(0.6875rem, 2.5vw, 0.75rem);
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .thanks-name-form {
        margin: 1rem 0;
        padding: clamp(0.875rem, 2vw, 1rem);
    }

    .qr-code-image {
        padding: 0.75rem;
    }

    .qr-code-image img {
        max-width: 220px;
        min-width: 180px;
    }

    .qr-placeholder {
        max-width: 220px;
        min-width: 180px;
    }

    .qr-note {
        font-size: clamp(0.625rem, 2.5vw, 0.6875rem);
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .thanks-name-form {
        margin: 1rem 0;
        padding: clamp(0.75rem, 2vw, 1rem);
    }

    .qr-note {
        font-size: 0.8125rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* 回到顶部按钮（首页） */
.back-to-top {
    position: fixed;
    bottom: calc(1rem + 56px);
    left: max(20px, calc((100vw - 1200px) / 2 - 80px));
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.4),
        0 0 0 0 rgba(99, 102, 241, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.4s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

/* top文字 */
.back-to-top .text-top {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ↑符号 */
.back-to-top .arrow-up {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 10px));
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* hover时显示↑，隐藏top */
.back-to-top:hover .text-top {
    opacity: 0;
    transform: translateY(-10px);
}

.back-to-top:hover .arrow-up {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.back-to-top::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.back-to-top:hover::before {
    width: 300px;
    height: 300px;
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: fadeInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.back-to-top:not(.show) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.6);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-8px) scale(1.05);
    }
    70% {
        transform: translateY(2px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.6),
        0 0 0 8px rgba(99, 102, 241, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #22d3ee 100%);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.5),
        0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* 明亮主题下的回到顶部按钮 */
body.light-theme .back-to-top {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    box-shadow: 
        0 4px 20px rgba(99, 102, 241, 0.35),
        0 0 0 0 rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.light-theme .back-to-top:hover {
    box-shadow: 
        0 8px 30px rgba(99, 102, 241, 0.5),
        0 0 0 8px rgba(99, 102, 241, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #22d3ee 100%);
}

/* 当屏幕宽度小于1400px时，按钮回到右下角 */
@media (max-width: 1400px) {
    .back-to-top {
        left: auto;
        right: 2rem;
        bottom: calc(1rem + 56px + 0.5rem);
    }
    
    .back-to-bottom {
        left: auto;
        right: 2rem;
    }
}

/* 跳转到底部按钮（首页） */
.back-to-bottom {
    position: fixed;
    bottom: 1rem;
    left: max(20px, calc((100vw - 1200px) / 2 - 80px));
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 50%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 
        0 4px 20px rgba(6, 182, 212, 0.4),
        0 0 0 0 rgba(6, 182, 212, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.4s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.back-to-bottom.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: fadeInBounceBottom 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.back-to-bottom:not(.show) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.3s;
}

@keyframes fadeInBounceBottom {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.6);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.05);
    }
    70% {
        transform: translateY(2px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* bottom文字 */
.back-to-bottom .text-bottom {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ↓符号 */
.back-to-bottom .arrow-down {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 10px));
    display: inline-block;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* hover时显示↓，隐藏bottom */
.back-to-bottom:hover .text-bottom {
    opacity: 0;
    transform: translateY(10px);
}

.back-to-bottom:hover .arrow-down {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.back-to-bottom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.back-to-bottom:hover::before {
    width: 300px;
    height: 300px;
}

.back-to-bottom:hover {
    transform: translateY(5px) scale(1.05);
    box-shadow: 
        0 8px 30px rgba(6, 182, 212, 0.6),
        0 0 0 8px rgba(6, 182, 212, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 50%, #818cf8 100%);
}

.back-to-bottom:active {
    transform: translateY(2px) scale(1.02);
    box-shadow: 
        0 4px 20px rgba(6, 182, 212, 0.5),
        0 0 0 4px rgba(6, 182, 212, 0.15);
}

/* 明亮主题下的跳转到底部按钮 */
body.light-theme .back-to-bottom {
    background: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 50%, #6366f1 100%);
    box-shadow: 
        0 4px 20px rgba(6, 182, 212, 0.35),
        0 0 0 0 rgba(6, 182, 212, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

body.light-theme .back-to-bottom:hover {
    box-shadow: 
        0 8px 30px rgba(6, 182, 212, 0.5),
        0 0 0 8px rgba(6, 182, 212, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 50%, #818cf8 100%);
}

/* 当屏幕宽度小于1400px时，按钮回到右下角 */
@media (max-width: 1400px) {
    .back-to-top {
        left: auto;
        right: 2rem;
        bottom: calc(1rem + 56px);
    }
    
    .back-to-bottom {
        left: auto;
        right: 2rem;
    }
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: calc(0.5rem + 50px);
        left: auto;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
    }
    
    .back-to-bottom {
        bottom: 0.5rem;
        left: auto;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
    }
}

/* ==================== 全面响应式设计 ==================== */

/* 通用容器响应式 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
}

/* Header响应式优化 */
@media (max-width: 1024px) {
    .header .container {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .nav {
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0.75rem 0;
    }
    
    .header .container {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .logo {
        gap: 0.5rem;
    }
    
    .logo h1 {
        font-size: 1.125rem;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .header-controls {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }
    
    .theme-toggle,
    .snow-toggle {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }
    
    .language-switcher {
        padding: 0.2rem;
        gap: 0.2rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8125rem;
        min-width: 45px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        order: 3;
        width: 100%;
    }
    
    .nav-link {
        font-size: 0.9375rem;
        padding: 0.25rem 0;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0;
    }
    
    .logo h1 {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .header-controls {
        gap: 0.5rem;
    }
    
    .theme-toggle,
    .snow-toggle {
        width: 32px;
        height: 32px;
        padding: 0.35rem;
    }
    
    .lang-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        min-width: 40px;
    }
    
    .nav {
        gap: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
}

/* Hero区域响应式优化 */
@media (max-width: 1024px) {
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .calligraphy-char {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .calligraphy-char {
        font-size: 3rem;
        gap: 0.5rem;
    }
    
    .calligraphy-text {
        gap: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }
    
    .hero-social {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .social-link {
        justify-content: center;
        width: 100%;
        max-width: 300px;
    }
    
    .hero-badge {
        font-size: 0.8125rem;
        padding: 0.4rem 1.25rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .calligraphy-char {
        font-size: 2.5rem;
    }
    
    .calligraphy-text {
        gap: 0.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .hero-social {
        gap: 0.75rem;
    }
    
    .social-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Section通用响应式 */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }
}

/* Services Grid响应式 */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    .service-card p {
        font-size: 0.9375rem;
    }
}

/* Cases Grid响应式 */
@media (max-width: 1024px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .cases-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .case-card {
        padding: 1.5rem;
    }
}

/* Technology Grid响应式 */
@media (max-width: 768px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1.25rem;
    }
    
    .tech-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .tech-item {
        padding: 1rem;
    }
    
    .tech-name {
        font-size: 0.9375rem;
    }
    
    .tech-tags {
        gap: 0.5rem;
    }
    
    .tech-tags span {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Articles/Projects Grid响应式 */
@media (max-width: 1024px) {
    .articles-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .articles-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .article-card,
    .project-card {
        padding: 1.5rem;
    }
    
    .article-title,
    .project-header h3 {
        font-size: 1.25rem;
    }
    
    .article-excerpt,
    .project-desc {
        font-size: 0.9375rem;
    }
}

/* Footer响应式优化 */
@media (max-width: 1024px) {
    .footer {
        padding: 2rem 0 1.25rem;
    }
    
    .footer-content {
        gap: 1.75rem;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section h4 {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }
    
    .footer-section ul {
        gap: 0.5rem;
    }
    
    .footer-section ul li {
        font-size: 0.875rem;
    }
    
    .footer-contact-list li {
        justify-content: center;
        text-align: center;
    }
    
    .footer-contact-label {
        min-width: 50px;
        text-align: right;
    }
    
    .thanks-container {
        height: 120px;
    }
    
    .thanks-scroll-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1.25rem 0 0.75rem;
    }
    
    .footer-content {
        gap: 1.25rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-section h4 {
        font-size: 0.875rem;
    }
    
    .footer-section ul li {
        font-size: 0.8125rem;
    }
    
    .footer-contact-label {
        min-width: 45px;
        font-size: 0.8125rem;
    }
    
    .thanks-container {
        height: 100px;
    }
    
    .thanks-scroll-item {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .confetti {
        font-size: 0.875rem;
    }
}

/* View Counter响应式 */
@media (max-width: 768px) {
    .view-counter {
        padding: 0.75rem 1.5rem;
        margin-bottom: 2rem;
        gap: 0.75rem;
    }
    
    .counter-label {
        font-size: 0.875rem;
    }
    
    .flip-digit {
        width: 2rem;
        height: 2.5rem;
        line-height: 2.5rem;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .view-counter {
        padding: 0.5rem 1rem;
        margin-bottom: 1.5rem;
        gap: 0.5rem;
    }
    
    .counter-label {
        font-size: 0.8125rem;
    }
    
    .flip-digit {
        width: 1.75rem;
        height: 2.25rem;
        line-height: 2.25rem;
        font-size: 1.25rem;
    }
}

/* Video Section响应式 */
@media (max-width: 768px) {
    .video-container {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .video-container iframe {
        border-radius: 8px;
    }
}

/* About Section响应式 */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-text {
        width: 100%;
    }
    
    .about-stats {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* 成功提示Toast动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 响应式：移动端调整toast位置 */
@media (max-width: 768px) {
    #toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    .success-toast {
        min-width: auto !important;
        max-width: 100% !important;
    }
}

