@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --primary-color: #d97706;
    --secondary-color: #92400e;
    --light-color: #ffffff;
    --dark-color: #78350f;
    --accent-color: #1e40af;
}

body {
    font-family: 'Ma Shan Zheng', 'ZCOOL XiaoWei', cursive, serif;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    background-attachment: fixed;
    color: #78350f;
}

@layer utilities {
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .transition-all-300 {
        transition: all 300ms ease-in-out;
    }
    
    .card-hover {
        transition: all 0.3s ease;
    }
    
    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.15);
    }
    
    .section-padding {
        @apply py-16 md:py-24 relative overflow-hidden;
    }
    
    .container-custom {
        @apply container mx-auto px-4 sm:px-6 lg:px-8 relative z-10;
    }
    
    .text-gradient {
        background: linear-gradient(135deg, var(--primary-color), #fbbf24);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .bg-gradient-primary {
        background: linear-gradient(135deg, var(--primary-color) 0%, #4f46e5 100%);
    }
    
    .bg-gradient-light {
        background: linear-gradient(135deg, #f9fafb 0%, var(--light-color) 100%);
    }
    
    .btn-primary {
        @apply bg-primary hover:bg-primary/90 text-white font-semibold py-3 px-8 rounded-full shadow-lg transition-all duration-300 transform hover:-translate-y-1 hover:shadow-xl;
    }
    
    .btn-outline {
        @apply border-2 border-primary text-primary hover:bg-primary hover:text-white font-semibold py-3 px-8 rounded-full shadow-md transition-all duration-300;
    }
    
    .section-title {
        @apply text-3xl md:text-4xl font-bold text-light mb-4 text-center;
    }
    
    .section-subtitle {
        @apply text-lg text-gray-300 leading-relaxed text-center max-w-3xl mx-auto;
    }
    
    .divider {
        @apply w-20 h-1 bg-primary mx-auto mb-12;
    }
}

/* 导航栏样式 */
.navbar {
    @apply sticky top-0 w-full bg-white shadow-md z-50 transition-all duration-300;
}

.navbar.scrolled {
    @apply shadow-lg;
}

/* 卡片样式 */
.feature-card {
    @apply bg-white/70 backdrop-blur-sm rounded-xl shadow-md overflow-hidden card-hover border border-amber-100;
}

.value-card {
    @apply bg-white/60 backdrop-blur-sm rounded-xl p-8 shadow-md card-hover transition-all-300 border border-amber-100;
}

/* 页脚样式 */
.footer {
    @apply bg-dark text-white py-12;
}

.footer-link {
    @apply text-gray-400 hover:text-white transition-colors duration-300;
}

.social-icon {
    @apply w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center text-gray-400 hover:bg-primary hover:text-white transition-all duration-300;
}

/* 返回顶部按钮 */
.back-to-top {
    @apply fixed bottom-8 right-8 bg-primary text-white w-12 h-12 rounded-full flex items-center justify-center shadow-lg opacity-0 invisible transition-all duration-300 z-50 hover:bg-primary/90;
}

.back-to-top.visible {
    @apply opacity-100 visible;
}

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

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

/* 响应式调整 */
@media (max-width: 768px) {
    .section-title {
        @apply text-2xl md:text-3xl;
    }
    
    .navbar-logo {
        @apply text-lg;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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