/* 自定义样式 */

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

/* 导航栏滚动效果 */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 页面切换动画 */
.page-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 聊天窗口动画 */
#chat-window {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 回到顶部按钮动画 */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* 加载动画 */
.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);
    }
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 按钮波纹效果 */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* 表格响应式 */
@media (max-width: 768px) {
    .overflow-x-auto table {
        font-size: 14px;
    }
    
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 12px 8px;
    }
}

/* 聊天消息样式 */
.chat-message {
    max-width: 85%;
    word-wrap: break-word;
}

.chat-message.user {
    margin-left: auto;
    background-color: #3B82F6;
    color: white;
    border-radius: 12px 12px 0 12px;
}

.chat-message.bot {
    margin-right: auto;
    background-color: white;
    color: #374151;
    border-radius: 12px 12px 12px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 快捷问题按钮悬停 */
.quick-question {
    transition: all 0.2s ease;
}

.quick-question:hover {
    transform: scale(1.02);
}

/* 星级评分动画 */
.star-rating span {
    transition: color 0.2s ease;
}

.star-rating:hover span {
    color: #FBBF24;
}

/* 专业卡片悬停 */
.profession-card {
    transition: all 0.3s ease;
}

.profession-card:hover {
    border-color: #3B82F6;
    transform: translateY(-4px);
}

/* 步骤指示器 */
.step-indicator {
    position: relative;
}

.step-indicator::after {
    content: '';
    position: absolute;
    top: 32px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #E5E7EB;
    z-index: 0;
}

.step-indicator:last-child::after {
    display: none;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* 移动端菜单动画 */
#mobile-menu {
    transition: all 0.3s ease;
}

/* 图片懒加载淡入效果 */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

img.lazy.loaded {
    opacity: 1;
}

/* 焦点状态增强 */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .card-hover {
        border: 2px solid #374151;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}