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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #111827;
    background-color: #F9FAFB;
    overflow-x: hidden;
}

/* 导航栏样式增强 */
#navbar {
    background: rgba(30, 64, 175, 0.85);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#navbar.scrolled {
    background: rgba(30, 64, 175, 0.95);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
}

#navbar .nav-link {
    position: relative;
}

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

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

/* 产品3D展示效果增强 */
.product-3d-container {
    perspective: 1200px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-3d-container:hover {
    transform: rotateY(15deg) rotateX(5deg) scale(1.02);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 动画效果增强 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px !important;
    }
}

/* 表单样式增强 */
form input, form textarea {
    transition: all 0.3s ease;
    border: 2px solid #E5E7EB;
}

form input:focus, form textarea:focus {
    border-color: #1E40AF;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    outline: none;
    transform: translateY(-2px);
}

/* 表格样式增强 */
table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 0.75rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s ease;
}

/* 卡片悬停效果增强 */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-hover::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.7s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

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

/* 按钮样式增强 */
.btn-primary {
    background-color: #1E40AF;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #1E3A8A;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-primary:hover::after {
    height: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -12px rgba(30, 64, 175, 0.4);
}

.btn-secondary {
    background-color: #DC2626;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: #B91C1C;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-secondary:hover::after {
    height: 100%;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -12px rgba(220, 38, 38, 0.4);
}

/* 加载动画增强 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(30, 64, 175, 0.3);
    border-radius: 50%;
    border-top-color: #1E40AF;
    animation: spin 0.8s ease-in-out infinite;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #1E40AF;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

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

/* 图片懒加载增强 */
img.lazy {
    opacity: 0;
    transition: opacity 0.6s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* 文本选择样式增强 */
::selection {
    background-color: #1E40AF;
    color: white;
}

::-moz-selection {
    background-color: #1E40AF;
    color: white;
}

/* 无障碍访问 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* 视觉特效增强 */
.gradient-text {
    background: linear-gradient(90deg, #1E40AF, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradientFlow 3s ease infinite;
}

.animated-background {
    background: linear-gradient(45deg, #1E40AF, #059669, #1E40AF);
    background-size: 300% 300%;
    animation: gradientFlow 15s ease infinite;
}

.animated-border {
    position: relative;
}

.animated-border::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(45deg, #1E40AF, #059669, #DC2626, #1E40AF) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
}

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

/* 视差滚动效果 */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 滚动动画增强 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.animate-slide-in {
    opacity: 1;
    transform: translateY(0);
}

/* 光晕效果 */
.glow-effect {
    box-shadow: 0 0 20px rgba(5, 150, 105, 0.4);
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(5, 150, 105, 0.6);
}

/* 波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* 数字计数动画 */
.count-up {
    transition: all 0.8s ease;
}

/* 图片悬停效果 */
.image-hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.image-hover img {
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-hover:hover img {
    transform: scale(1.08);
}

/* 自定义滚动指示器 */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #1E40AF, #059669);
    width: 0%;
    transition: width 0.2s ease;
}