/* 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
    scroll-behavior: smooth;
}

/* 导航栏 */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 按钮样式 */
.btn-primary {
    @apply bg-primary text-white px-6 py-3 rounded-lg font-medium hover:bg-secondary transition-colors;
}

.btn-secondary {
    @apply bg-white text-primary border border-primary px-6 py-3 rounded-lg font-medium hover:bg-gray-100 transition-colors;
}

/* 卡片样式 */
.card {
    @apply bg-white rounded-lg shadow-md overflow-hidden hover:shadow-lg transition-shadow;
}

/* 标题样式 */
.section-title {
    @apply text-3xl font-bold text-dark mb-4;
}

.section-subtitle {
    @apply text-gray-600 mt-4 max-w-2xl mx-auto;
}

/* 分割线 */
.section-divider {
    @apply w-20 h-1 bg-primary mx-auto;
}

/* 图标背景 */
.icon-bg {
    @apply w-16 h-16 rounded-full flex items-center justify-center mb-4;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        @apply text-2xl;
    }
    
    .btn-primary,
    .btn-secondary {
        @apply px-4 py-2;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* 延迟动画 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1E40AF;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3B82F6;
    animation: spin 1s ease-in-out infinite;
}

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

/* 悬停效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* 文本截断 */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 背景渐变 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
}

/* 阴影效果 */
.shadow-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-card-hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 文本阴影 */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 间距工具类 */
.mt-12 {
    margin-top: 3rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* 响应式工具类 */
@media (max-width: 640px) {
    .sm:text-center {
        text-align: center;
    }
    
    .sm:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .md:text-center {
        text-align: center;
    }
    
    .md:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {
    .lg:text-center {
        text-align: center;
    }
    
    .lg:mx-auto {
        margin-left: auto;
        margin-right: auto;
    }
}