@layer utilities {
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    .transition-all-300 {
        transition: all 0.3s ease;
    }
    .bg-gradient-primary {
        background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    }
    .bg-gradient-secondary {
        background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    }
    .bg-gradient-success {
        background: linear-gradient(135deg, #059669 0%, #34d399 100%);
    }
    .card-hover {
        transition: all 0.3s ease;
        border: 1px solid rgba(229, 231, 235, 0.8);
    }
    .card-hover:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        border-color: rgba(37, 99, 235, 0.3);
    }
    
    /* 内容卡片样式 */
    .content-card {
        transition: all 0.3s ease;
        border: 1px solid rgba(229, 231, 235, 0.8);
        position: relative;
        overflow: hidden;
    }
    
    .content-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #2563eb, #0ea5e9);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }
    
    .content-card:hover::before {
        transform: scaleX(1);
    }
    
    .content-card:hover {
        box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
        border-color: rgba(37, 99, 235, 0.2);
    }
    .nav-link-active {
        position: relative;
    }
    .nav-link-active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #2563eb;
        border-radius: 1px;
    }
    .nav-link-hover {
        position: relative;
        transition: color 0.3s ease;
    }
    .nav-link-hover::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: #2563eb;
        border-radius: 1px;
        transition: width 0.3s ease;
    }
    .nav-link-hover:hover::after {
        width: 100%;
    }
    .mobile-menu-transition {
        transition: all 0.3s ease;
    }
    .sticky-header {
        transition: all 0.3s ease;
    }
    .sticky-header.scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        padding: 0.5rem 0;
    }
    
    /* 轮播图动画效果 */
    .carousel-item {
        transition: opacity 1s ease, transform 1s ease;
    }
    
    .carousel-item.active {
        opacity: 1;
        transform: scale(1);
    }
    
    .carousel-item:not(.active) {
        opacity: 0;
        transform: scale(1.05);
    }
    
    /* 轮播控制按钮样式 */
    .carousel-control-btn {
        transition: all 0.3s ease;
    }
    
    .carousel-control-btn:hover {
        background-color: rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }
    
    /* 轮播指示器样式 */
    .carousel-indicator {
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .carousel-indicator.active {
        transform: scale(1.2);
        background-color: rgba(255, 255, 255, 0.9);
    }
    
    /* 轮播图文字动画 */
    .carousel-content {
        animation: fadeInUp 1s ease-out;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 按钮增强样式 */
    .btn {
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .btn::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: all 0.5s ease;
    }

    .btn:hover::before {
        left: 100%;
    }

    .btn:active {
        transform: scale(0.95);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .btn:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    }

    /* 表单元素增强样式 */
    .form-input {
        transition: all 0.3s ease;
        position: relative;
    }

    .form-input:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        transform: translateY(-1px);
    }

    .form-input:hover {
        border-color: #6366f1;
    }

    .form-input.error {
        border-color: #ef4444;
    }

    .form-input.error:focus {
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }

    /* 加载状态 */
    .btn.loading {
        opacity: 0.7;
        pointer-events: none;
    }

    .btn.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 16px;
        height: 16px;
        margin: -8px 0 0 -8px;
        border: 2px solid rgba(255, 255, 255, 0.5);
        border-top-color: #fff;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

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

    /* 滚动进入视口动画 */
    .scroll-animate {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.6s ease;
    }

    .scroll-animate.animate-visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* 骨架屏动画 */
    .skeleton-pulse {
        animation: skeletonPulse 1.5s ease-in-out infinite;
    }

    @keyframes skeletonPulse {
        0%, 100% {
            opacity: 0.6;
        }
        50% {
            opacity: 1;
        }
    }

    /* 数字增长动画 */
    .counter {
        transition: all 0.3s ease;
    }

    /* 滚动进度条 */
    .scroll-progress {
        position: fixed;
        top: 0;
        left: 0;
        height: 3px;
        background: linear-gradient(90deg, #2563eb, #0ea5e9);
        z-index: 50;
        transition: width 0.1s ease;
    }

    /* 复选框和单选按钮样式 */
    input[type="checkbox"],
    input[type="radio"] {
        appearance: none;
        width: 18px;
        height: 18px;
        border: 2px solid #d1d5db;
        border-radius: 4px;
        background-color: #fff;
        cursor: pointer;
        position: relative;
        transition: all 0.3s ease;
    }

    input[type="checkbox"]:checked,
    input[type="radio"]:checked {
        border-color: #2563eb;
        background-color: #2563eb;
    }

    input[type="checkbox"]:checked::after {
        content: '\2713';
        position: absolute;
        top: -2px;
        left: 2px;
        color: white;
        font-size: 14px;
        font-weight: bold;
    }

    input[type="radio"] {
        border-radius: 50%;
    }

    input[type="radio"]:checked::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: white;
        transform: translate(-50%, -50%);
    }

    input[type="checkbox"]:hover,
    input[type="radio"]:hover {
        border-color: #6366f1;
    }

    /* 链接样式增强 */
    .link-hover {
        transition: all 0.3s ease;
        position: relative;
        display: inline-block;
    }

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

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

    .link-hover:hover {
        color: #2563eb;
    }
}