/* 自定义样式文件 */

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 悬停效果 */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* 渐变背景动画 */
.gradient-animation {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* 卡片阴影效果 */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.card-shadow:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 按钮动画 */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::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.5s;
}

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

/* 响应式字体大小 */
@media (max-width: 768px) {
    .text-responsive {
        font-size: 1.125rem;
    }
}

@media (min-width: 769px) {
    .text-responsive {
        font-size: 1.25rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 表单样式增强 */
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 导航栏阴影 */
.nav-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* 图片悬停效果 */
.img-hover {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.img-hover:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* 文本渐变 */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 移动端导航菜单动画 */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    transform-origin: top;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.hidden {
    transform: scaleY(0);
    opacity: 0;
    max-height: 0;
}

#mobile-menu:not(.hidden) {
    transform: scaleY(1);
    opacity: 1;
    max-height: 300px;
}

/* 汉堡菜单按钮动画 */
#mobile-menu-button svg {
    transition: transform 0.3s ease;
}

#mobile-menu-button.active svg {
    transform: rotate(90deg);
}

/* 移动端导航链接悬停效果 */
#mobile-menu a {
    position: relative;
    overflow: hidden;
}

#mobile-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.3s ease;
}

#mobile-menu a:hover::before {
    left: 100%;
}