@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    /* 高级文字效果 */
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .text-gradient {
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        background-image: linear-gradient(135deg, #0A2463, #3E92CC);
    }
    .text-balance {
        text-wrap: balance;
    }
    
    /* 动画效果 */
    .animate-float {
        animation: float 6s ease-in-out infinite;
    }
    .animate-float-slow {
        animation: float 8s ease-in-out infinite;
    }
    .animate-float-fast {
        animation: float 4s ease-in-out infinite;
    }
    
    /* 卡片交互效果 */
    .card-hover {
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .card-hover:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 25px -5px rgba(10, 36, 99, 0.15), 0 10px 10px -5px rgba(10, 36, 99, 0.08);
    }
    
    /* 玻璃态效果升级 */
    .glass {
        background: rgba(255, 255, 255, 0.75);
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
    }
    
    /* 确保卡片在网格布局中正确排列，避免重叠 */
    .grid > * {
        position: relative;
        z-index: 1;
    }
    
    /* 优化卡片间距，确保在各种屏幕尺寸下都有足够的间距 */
    @media (max-width: 768px) {
        .grid {
            gap: 1.5rem !important;
        }
    }
    
    /* 优化卡片在小屏幕上的显示，确保不会溢出容器 */
    @media (max-width: 640px) {
        .rounded-2xl {
            border-radius: 1rem !important;
        }
        .p-8 {
            padding: 1.5rem !important;
        }
    }
    .glass-dark {
        background: rgba(10, 36, 99, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(16px) saturate(180%);
        -webkit-backdrop-filter: blur(16px) saturate(180%);
    }
    
    /* 阴影效果 */
    .soft-shadow {
        box-shadow: 0 10px 30px rgba(10, 36, 99, 0.08);
    }
    .hard-shadow {
        box-shadow: 0 20px 40px rgba(10, 36, 99, 0.12);
    }
    .glow-shadow {
        box-shadow: 0 0 25px rgba(62, 146, 204, 0.2);
    }
    
    /* 品牌渐变 */
    .brand-gradient {
        background-image: linear-gradient(135deg, rgba(10, 36, 99, 0.08) 0%, rgba(62, 146, 204, 0.12) 50%, rgba(216, 49, 91, 0.08) 100%);
    }
    .brand-gradient-strong {
        background-image: linear-gradient(135deg, #0A2463 0%, #3E92CC 100%);
    }
    .accent-gradient {
        background-image: linear-gradient(135deg, #3E92CC 0%, #D8315B 100%);
    }
    
    /* 网格背景 */
    .grid-bg {
        background-image:
            linear-gradient(rgba(10, 36, 99, 0.04) 1px, transparent 1px),
            linear-gradient(90deg, rgba(10, 36, 99, 0.04) 1px, transparent 1px);
        background-size: 32px 32px;
    }
    
    /* 悬停提升效果 */
    .hover-lift {
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    .hover-lift:hover {
        transform: translateY(-6px);
        box-shadow: 0 15px 30px rgba(10, 36, 99, 0.15);
    }
    
    /* 闪光效果 */
    .shine {
        position: relative;
        overflow: hidden;
    }
    .shine::after {
        content: '';
        position: absolute;
        top: -50%; 
        left: -50%;
        width: 200%; 
        height: 200%;
        background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4), transparent 50%);
        transform: rotate(15deg);
        pointer-events: none;
    }
    
    /* 高级边框效果 */
    .border-glow {
        box-shadow: 0 0 0 2px rgba(62, 146, 204, 0.3);
    }
    .border-gradient {
        position: relative;
        border-radius: inherit;
        z-index: 0;
    }
    .border-gradient::before {
        content: '';
        position: absolute;
        inset: -2px;
        z-index: -1;
        border-radius: calc(inherit + 2px);
        background: linear-gradient(135deg, #0A2463, #3E92CC);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .border-gradient:hover::before {
        opacity: 1;
    }
    
    /* 自定义滚动条 */
    .custom-scrollbar::-webkit-scrollbar {
        width: 6px;
    }
    .custom-scrollbar::-webkit-scrollbar-track {
        background: rgba(10, 36, 99, 0.05);
    }
    .custom-scrollbar::-webkit-scrollbar-thumb {
        background: rgba(62, 146, 204, 0.5);
        border-radius: 3px;
    }
    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: rgba(62, 146, 204, 0.7);
    }
}

/* 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 数字计数动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面载入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 渐变移动动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 渐变动画类 */
.animate-gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* 平滑过渡 */
* {
    transition: color 0.3s ease, background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* 确保图片加载平滑 */
img {
    transition: transform 0.5s ease, opacity 0.5s ease;
}

/* 确保所有内容都加载完成后再显示 */
body {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards 0.2s;
}

/* 滚动动画效果 */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 滚动动画类 */
.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.8s ease-out forwards;
}

/* 增强悬停效果 */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 25px rgba(62, 146, 204, 0.3);
}

/* 按钮增强效果 */
.btn-enhanced {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-enhanced:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(10, 36, 99, 0.2);
}

/* 卡片增强效果 */
.card-enhanced {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-enhanced:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(10, 36, 99, 0.15), 0 10px 10px -5px rgba(10, 36, 99, 0.08);
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3E92CC;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0A2463;
}

/* 输入框焦点动画 */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 146, 204, 0.1);
    transition: all 0.3s ease;
}

/* 导航栏滚动效果 */
nav.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* 元素悬停缩放效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* 元素悬停旋转效果 */
.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* 元素悬停抖动效果 */
.hover-shake {
    transition: transform 0.3s ease;
}

.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* 排版优化 */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 标题优化 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* 段落优化 */
p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* 链接优化 */
a {
    transition: all 0.3s ease;
    text-decoration: none;
}

/* 按钮文字优化 */
button {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* 响应式字体大小 */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
    h3 {
        font-size: 1.75rem;
    }
    h4 {
        font-size: 1.5rem;
    }
    p {
        font-size: 1rem;
    }
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    h3 {
        font-size: 1.5rem;
    }
    h4 {
        font-size: 1.25rem;
    }
    /* 优化导航栏在小屏幕上的显示 */
    nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    /* 优化首屏区域在小屏幕上的布局 */
    #welcome {
        padding-top: 24px;
        padding-bottom: 16px;
    }
    /* 优化卡片间距在小屏幕上的显示 */
    .grid {
        gap: 1rem !important;
    }
    /* 优化按钮在小屏幕上的显示 */
    button {
        padding: 0.75rem 1.5rem !important;
    }
    /* 优化表单在小屏幕上的显示 */
    form {
        padding: 1.5rem !important;
    }
}

/* 超大屏幕设备优化 */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}