/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* 导航栏样式增强 */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: white;
}

/* 按钮悬停效果 */
.btn-primary {
    @apply bg-primary text-white font-semibold rounded-lg px-6 py-3 shadow hover:shadow-lg transition-custom hover:-translate-y-1;
}

.btn-secondary {
    @apply bg-transparent border-2 border-white text-white font-semibold rounded-lg px-6 py-3 hover:bg-white/10 transition-custom hover:-translate-y-1;
}

/* 卡片动画 */
.card-hover {
    @apply transition-all duration-300 hover:shadow-xl hover:-translate-y-2;
}

/* 表单元素样式 */
.form-input {
    @apply w-full px-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-custom;
}

/* 图标容器样式 */
.icon-container {
    @apply flex items-center justify-center rounded-lg transition-all duration-300;
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* 淡入动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 悬浮客服窗口样式 */
#floating-chat {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    z-index: 50;
}

#floating-chat a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background-color: #165DFF;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(22, 93, 255, 0.4);
    transition: all 0.3s ease;
}

#floating-chat a:hover {
    background-color: rgba(22, 93, 255, 0.9);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(22, 93, 255, 0.5);
}

.chat-tooltip {
    position: absolute;
    left: -9rem;
    bottom: 0;
    background-color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(0.5rem);
    transition: all 0.3s ease;
    min-width: 8rem;
}

/* FAQ Section Styles */
.faq-item {
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.faq-question {
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #165DFF;
}

.faq-answer {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.hidden {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

/* Installation Guide Styles */
.installation-steps .step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.step-number {
    flex-shrink: 0;
    margin-right: 1rem;
}

.step-content {
    flex-grow: 1;
}

/* Help Center Search Styles */
.help-search input:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.1);
}

/* Help Center Quick Links Styles */
.help-quick-links a:hover {
    transform: translateY(-5px);
}

/* Responsive adjustments for Help Center */
@media (max-width: 768px) {
    .help-content .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .help-header h1 {
        font-size: 2.5rem !important;
    }
    
    .installation-steps .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 1rem;
    }
    
    .faq-question span {
        font-size: 1.25rem !important;
    }
}

#floating-chat.group:hover .chat-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* 移动端适配 */
@media (max-width: 768px) {
    #floating-chat {
        bottom: 5rem;
        right: 1rem;
    }
    
    #floating-chat a {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .chat-tooltip {
        display: none; /* 移动端不显示提示框 */
    }
}

/* 语言选择器样式 */
.lang-option {
    transition: all 0.2s ease;
}

.lang-option:hover {
    background-color: #f3f4f6;
}

/* 图片加载效果 */
img {
    transition: all 0.3s ease;
}

/* 导航链接样式 */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #165DFF;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* 联系表单按钮动画 */
#contact-form button:active {
    transform: scale(0.98);
}

/* 社交媒体图标悬停效果 */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
}

/* 产品卡片悬停效果 */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

/* 服务卡片图标悬停效果 */
.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotate(10deg);
}

/* 返回顶部按钮动画 */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 搜索优化相关样式 */
/* 隐藏元素但对搜索引擎可见 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 多语言切换动画 */
[data-lang-key] {
    transition: opacity 0.3s ease;
}

/* 移动端菜单动画 */
#mobile-menu {
    transition: all 0.3s ease;
}

/* 表单验证样式 */
.form-input.error {
    border-color: #ff4d4f;
}

.form-input.success {
    border-color: #52c41a;
}

/* 加载更多按钮样式 */
.load-more-btn {
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background-color: #0e42c2;
}

/* 价格标签样式 */
.price-tag {
    font-weight: 700;
    color: #165DFF;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 特殊效果样式 */
.hero-gradient {
    background: linear-gradient(135deg, #165DFF 0%, #722ED1 100%);
}

/* 服务卡片渐变边框 */
.service-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #165DFF, #722ED1, #0FC6C2, #165DFF);
    z-index: -1;
    border-radius: 14px;
    animation: borderRotate 8s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before {
    opacity: 1;
}

@keyframes borderRotate {
    0% { background-position: 0% 0%; }
    100% { background-position: 400% 0%; }
}

/* 悬停时的阴影效果 */
.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
}

.table tr:hover {
    background-color: #f9fafb;
}

/* 徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 提示框样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* 响应式图片 */
.responsive-img {
    max-width: 100%;
    height: auto;
}

/* 全屏背景图片 */
.full-bg-img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 栅格系统增强 */
.grid-cols-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 平滑过渡 */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 骨架屏动画 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    animation: modal-appear 0.3s ease;
}

@keyframes modal-appear {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: #6c757d;
    content: '/';
}

/* 进度条 */
.progress {
    height: 0.75rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    background-color: #165DFF;
    transition: width 0.6s ease;
}

/* 徽章计数 */
.badge-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 20px;
    color: #fff;
    background-color: #ff4d4f;
    border-radius: 10px;
    text-align: center;
    white-space: nowrap;
}

/* 标签页样式 */
.tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab.active {
    color: #165DFF;
    border-bottom-color: #165DFF;
    font-weight: 600;
}

/* 动画延迟类 */
.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}