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

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* 渐变文字动画 */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(-45deg, #3b82f6, #8b5cf6, #06b6d4, #3b82f6);
    background-size: 400% 400%;
    animation: gradient 3s ease infinite;
}

/* 卡片悬停效果 */
.feature-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

/* 按钮悬停效果 */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* 代码块样式 */
.code-block {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    position: relative;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 8px 8px 0 0;
}

.code-block::after {
    content: '● ● ●';
    position: absolute;
    top: 12px;
    left: 15px;
    color: #64748b;
    font-size: 12px;
    letter-spacing: 4px;
}

.code-block pre {
    margin-top: 40px !important;
    padding: 20px;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    min-width: 0;
    max-width: 100%;
    white-space: pre;
    box-sizing: border-box;
}

code {
    word-break: break-all;
}

.code-block code {
    white-space: pre;
    word-break: normal;
    overflow-wrap: normal;
    display: block;
    max-width: 100%;
}

.w-8 {
    min-width: 2rem;
}

/* 导航栏滚动效果 */
.navbar-scroll {
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 脉冲效果 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* 暗色模式特定样式 */
.dark .bg-dark-900 {
    background-color: #0f172a;
}

.dark .bg-dark-800 {
    background-color: #1e293b;
}

.dark .border-dark-700 {
    border-color: #334155;
}

.dark .text-gray-100 {
    color: #f1f5f9;
}

.dark .text-gray-300 {
    color: #cbd5e1;
}

.dark .text-gray-400 {
    color: #94a3b8;
}

/* 链接悬停效果 */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 图标动画 */
.icon-hover {
    transition: transform 0.3s ease;
}

.icon-hover:hover {
    transform: scale(1.1);
}

/* 进度条样式 */
.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #334155;
}

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

/* 焦点样式 */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 打印样式 */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}