/* 爱卡云 - 最终打磨优化 */

/* 全局过渡动画 */
* {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

/* 图片懒加载淡入 */
img {
    opacity: 1;
    transition: opacity 0.5s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* 文字选中效果 */
::selection {
    background: rgba(0,82,217,0.15);
    color: #0052d9;
}

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

::-webkit-scrollbar-track {
    background: #f5f7fa;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0052d9, #1466ed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #002ab1, #0052d9);
}

/* 焦点状态 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0052d9;
    outline-offset: 2px;
}

/* 禁用状态 */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f2f3f5;
    border-top-color: #0052d9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 骨架屏 */
.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #f2f3f5 25%, #e8ecf1 50%, #f2f3f5 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 提示气泡 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #1d2129;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

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

/* 徽章 */
.badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00b42a;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 0 3px rgba(0,180,42,0.2);
}

.badge-dot.offline {
    background: #c9cdd4;
    box-shadow: 0 0 0 3px rgba(201,205,212,0.2);
}

/* 分隔线 */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e6eb, transparent);
    margin: 24px 0;
}

/* 卡片悬浮效果统一 */
[class*="-card"]:not([class*="__"]):not([class*="-cards"]):not([class*="-card-grid"]) {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[class*="-card"]:not([class*="__"]):not([class*="-cards"]):not([class*="-card-grid"]):hover {
    transform: translateY(-4px) !important;
}

/* 数字字体 */
.number, .price, .stat-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

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

/* 打印优化 */
@media print {
    .aikayun-header,
    .aikayun-footer,
    .aside-tools,
    .back-to-top,
    .mobile-menu-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .product-card,
    .feature-card,
    .solution-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
