/* ==================== V2全局样式 - 变量与重置 ==================== */

:root {
    /* 主色调 - 更亮的富士康风格蓝 */
    --primary-dark: #0a1628;
    --primary-blue: #1e3a8a;
    --accent-blue: #3b82f6;
    --accent-light: #60a5fa;
    --accent-gold: #f59e0b;
    --accent-orange: #fb923c;
    
    /* 文字颜色 - 优化：高对比度白色系 */
    --text-light: #ffffff;
    --text-gray: #d1d5db;
    --text-dark: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.85);
    
    /* 背景色 - 修改：改为半透明白色，显示蓝色网格背景，与行业解决方案一致 */
    --bg-dark: #16213e;
    --bg-light: rgba(255, 255, 255, 0.05);
    --bg-white: rgba(255, 255, 255, 0.08);
    
    /* 边框与阴影 */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
    
    /* 渐变色 */
    --gradient-primary: linear-gradient(135deg, #0a1628 0%, #1e3a8a 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 过渡动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* CSS重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* V2主题类 */
body.v2-theme {
    background: var(--primary-dark);
}

/* 链接样式 */
a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition-normal);
}

a:hover {
    color: var(--accent-light);
}

/* 图片响应式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* 段落样式 */
p {
    margin-bottom: var(--spacing-sm);
}

/* 列表样式 */
ul, ol {
    margin-bottom: var(--spacing-sm);
}

/* 按钮基础样式 */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: var(--transition-normal);
}

/* 输入框基础样式 */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* 容器宽度 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* 响应式字体 */
@media (max-width: 768px) {
    html { font-size: 14px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* 选中文本样式 */
::selection {
    background: var(--accent-blue);
    color: var(--text-light);
}

::-moz-selection {
    background: var(--accent-blue);
    color: var(--text-light);
}

/* WhatsApp浮动按钮 - 绿色系+脉冲动画 */
.whatsapp-float {
    position: fixed;
    bottom: 90px; /* 在返回顶部按钮上方 */
    left: 30px; /* 左侧，与右侧AI聊天球对称 */
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
    text-decoration: none;
    /* 脉冲动画 */
    animation: whatsapp-pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(-10deg);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
    color: #ffffff;
    animation: none; /* 悬停时停止脉冲 */
}

.whatsapp-float i {
    animation: whatsapp-shake 1s ease-in-out infinite;
}

/* WhatsApp按钮脉冲动画 */
@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 
                    0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 
                    0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* WhatsApp图标摇动动画 */
@keyframes whatsapp-shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: rotate(-10deg); }
    20%, 40%, 60%, 80% { transform: rotate(10deg); }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 28px;
        bottom: 150px; /* 移动端调高位置，避免AI聊天球遮挡 */
        left: 20px;
    }
}

/* 🌐 语言切换器样式 */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.lang-btn i {
    font-size: 1rem;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--primary-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.lang-option.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.lang-option i {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.lang-option.active i {
    opacity: 1;
}

/* 移动端语言切换器 */
@media (max-width: 768px) {
    .language-switcher {
        margin: 1rem 0;
        width: 100%;
    }
    
    .lang-btn {
        width: 100%;
        justify-content: center;
    }
    
    .lang-dropdown {
        left: 0;
        right: 0;
        width: 100%;
    }
}
