/* 自定义CSS样式 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', '微软雅黑', sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

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

/* 链接样式 */
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* 按钮悬停效果 */
.btn-hover {
    transition: all 0.2s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 导航栏样式 */
.navbar-fixed {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* FAQ动画 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.show {
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

.faq-icon.rotate {
    transform: rotate(180deg);
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 功能卡片悬停效果 */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 套餐卡片特效 */
.pricing-card {
    transition: all 0.3s ease;
}

.pricing-card.featured {
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-8px);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

/* CTA按钮特效 */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

/* 代码块样式 */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block .comment {
    color: #64748b;
}

.code-block .keyword {
    color: #38bdf8;
}

.code-block .string {
    color: #84cc16;
}

.code-block .function {
    color: #f472b6;
}

/* 使用场景代码块样式优化 */
.scenario-code-block {
    background: #ffffff;
    color: #374151;
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.scenario-code-block .text-gray-500 {
    color: #6b7280;
}

.scenario-code-block .text-green-600 {
    color: #059669;
}

.scenario-code-block .text-blue-600 {
    color: #2563eb;
}

/* 移动端代码块优化 */
@media (max-width: 768px) {
    .scenario-code-block {
        font-size: 0.75rem;
        padding: 0.5rem;
        line-height: 1.4;
    }
}

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

.mobile-menu.show {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.hide {
    opacity: 0;
    transform: translateY(-10px);
}

/* 徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* 选择文本样式 */
::selection {
    background: #3b82f6;
    color: white;
}

::-moz-selection {
    background: #3b82f6;
    color: white;
}

/* 焦点样式 */
:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 响应式字体大小 */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }
}

@media (min-width: 1025px) {
    body {
        font-size: 16px;
    }
}