/* 
 * 东莞模型运动培训网站 - 自定义样式
 * 配合 Tailwind CSS 使用
 */

/* 基础样式 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 导航链接激活状态 */
.nav-link.active {
    color: #1e40af;
    font-weight: 600;
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 按钮脉冲动画 */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    80%, 100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.pulse-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: inherit;
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* 页面切换动画 */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease-out;
}

/* 图片懒加载占位 */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    /* 移动端特殊样式 */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    /* 悬浮按钮在移动端更小 */
    .floating-btn {
        padding: 0.75rem;
    }
    
    .floating-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* 打印样式 */
@media print {
    nav, footer, .floating-btn {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
}

/* 暗色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    /* 如果需要支持暗色模式，可以在这里添加样式 */
}

/* 选中文字样式 */
::selection {
    background: #3b82f6;
    color: white;
}

/* 焦点样式 - 无障碍 */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数字计数动画 */
.count-up {
    transition: all 0.5s ease-out;
}

/* 图标旋转效果 */
.icon-rotate:hover {
    transform: rotate(15deg);
    transition: transform 0.3s ease;
}

/* 波浪背景 */
.wave-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f3f4f6' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: cover;
}
