/**
 * 健康管理师考务中心 - 样式文件
 * Copyright (c) 2024-2025 健康管理师考务中心
 * 版权所有，未经授权禁止复制或使用
 * Website: https://jkgls.arkvip.cn
 */

/* Tailwind Utilities Layer */
@layer utilities {
    .text-shadow { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    .transition-all-300 { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    .bg-gradient-primary { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important; }
    .bg-gradient-secondary { background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%); }
    .bg-gradient-success { background: linear-gradient(135deg, #059669 0%, #34d399 100%); }
    .bg-gradient-warning { background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%); }
    .bg-gradient-info { background: linear-gradient(135deg, #0369a1 0%, #38bdf8 100%); }
    .bg-gradient-purple { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%); }
    .bg-gradient-pink { background: linear-gradient(135deg, #db2777 0%, #ec4899 100%); }

    .nav-link-active { position: relative; }
    .nav-link-active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background-color: #f97316; }
    
    /* 3D按钮效果 */
    .btn-3d { transform: translateZ(0); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
    .btn-3d:hover { transform: translateY(-3px) translateZ(8px); box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25); }
    .btn-3d:active { transform: translateY(1px) translateZ(2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
    
    /* 微交互动画 */
    .micro-interaction { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
    .micro-interaction:hover { transform: scale(1.03); }
    
    /* FAQ 动画效果 */
    .faq-question { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; }
    .faq-question:hover { transform: translateX(4px); }
    .faq-question:active { transform: translateX(2px); }
    .faq-question:focus { outline: none; }
    #rules .faq-question:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2); }
    #faq .faq-question:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2); }
    
    .faq-answer { max-height: 0; opacity: 0; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    .faq-answer:not(.hidden) { max-height: 300px; opacity: 1; transform: translateY(0); }
    .faq-question i { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    .faq-answer:not(.hidden) ~ .faq-question i, .faq-answer:not(.hidden) + .faq-question i { transform: rotate(180deg); }
    
    /* 丝滑滚动效果 */
    html { scroll-behavior: smooth; }
    
    /* 优化滚动条样式 */
    ::-webkit-scrollbar { width: 8px; height: 8px; }
    ::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
    ::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; transition: background 0.3s ease; }
    ::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }
    
    /* 轮播图3D效果 */
    .carousel-3d { transform-style: preserve-3d; perspective: 1500px; }
    
    /* 卡片悬浮3D效果 */
    .card-3d { transform-style: preserve-3d; perspective: 1000px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
    .card-3d:hover { transform: translateY(-10px) translateZ(20px) rotateX(5deg); box-shadow: 0 30px 40px -10px rgba(0, 0, 0, 0.2), 0 15px 20px -5px rgba(0, 0, 0, 0.15); }
    
    /* 加载动画 */
    @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
    @keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(26, 86, 219, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(26, 86, 219, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 86, 219, 0); } }
    
    /* 跑马灯动画 */
    @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
    .animate-marquee { animation: marquee 30s linear infinite; }
    
    /* 导航栏滚动缩小效果 */
    .header-scrolled { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); }
    .header-scrolled .nav-logo { transform: scale(0.9); }
    
    /* 返回顶部按钮 */
    .back-to-top { opacity: 0; visibility: hidden; transition: all 0.3s ease; }
    .back-to-top.show { opacity: 1; visibility: visible; }
    
    /* 浮动按钮动画 */
    @keyframes floatBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
    .float-bounce { animation: floatBounce 2s ease-in-out infinite; }
    
    /* 倒计时数字动画 */
    @keyframes countPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
    .countdown-number { animation: countPulse 1s ease-in-out infinite; }
    
    /* 数字滚动效果 */
    .number-roll { display: inline-block; animation: numberRoll 2s ease-out forwards; }
    @keyframes numberRoll { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
}
