/**
 * 主题变量和基础样式 - Theme & Base Styles
 * 定义全局CSS变量和基础重置样式
 */

:root {
    --bg-color: #f8f9fc;
    --text-color: #2d3748;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --accent-color: #4361ee;
    --secondary-accent: #3b82f6;
    --third-accent: #60a5fa;
    --hover-color: #1d4ed8;
    --shadow: rgba(67, 97, 238, 0.1);
    --speed-green: #10b981;
    --warning-color: #f59e0b;
    --speed-gradient: linear-gradient(135deg, #4361ee 0%, #3b82f6 50%, #60a5fa 100%);
    --light-bg: rgba(67, 97, 238, 0.05);
}

[data-theme="dark"] {
    --bg-color: #111827;
    --text-color: #e2e8f0;
    --card-bg: #1f2937;
    --card-border: #374151;
    --accent-color: #60a5fa;
    --secondary-accent: #818cf8;
    --third-accent: #a5b4fc;
    --hover-color: #93c5fd;
    --shadow: rgba(96, 165, 250, 0.2);
    --speed-green: #34d399;
    --warning-color: #fbbf24;
    --speed-gradient: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a5b4fc 100%);
    --light-bg: rgba(96, 165, 250, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-tap-highlight-color: transparent; /* 全局移除移动端点击高亮 */
}

/* iconfont图标样式修复 */
.iconfont {
    font-family: "iconfont" !important;
    font-size: 1.8rem;  /* 添加默认字体大小 */
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;  /* 确保图标正常显示 */
    line-height: 1;  /* 修复行高 */
}

/* Logo图片样式 */
.logo h1 .logo-img {
    height: 2.5rem;
    width: 2.5rem; /* 添加明确的宽度 */
    margin-right: 15px;
    vertical-align: middle;  /* 垂直对齐 */
    position: relative;
    top: -2px; /* 微调垂直位置 */
    object-fit: contain; /* 确保图片保持比例 */
    opacity: 0; /* 初始设为透明 */
    transition: opacity 0.3s ease;
}

/* 添加图片淡入动画 */
@keyframes imgFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.img-loaded {
    animation: imgFadeIn 0.5s ease forwards;
}

/* 针对其他地方使用的图标 */
.card-icon i.iconfont,
.product-icon i.iconfont {
    font-size: 1.8rem;
}

/* 小图标 */
.feature-icon i.iconfont {
    font-size: 1.4rem;
}