/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 主要样式定义 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.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);
}

.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse {
    animation: pulse 2s infinite;
}

/* 导航栏样式 */
.nav-link {
    position: relative;
    padding: 8px 0;
}

.nav-link::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after,.hactive::after{
    width: 100%;
}

/* 移动端菜单 */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-link {
    display: block;
    color: white;
    font-size: 1.25rem;
    padding: 16px 0;
}

/* 按钮样式 */
.primary-btn {
    background: white;
    color: #764ba2;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: #f7fafc;
}

.secondary-btn {
    border: 2px solid white;
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: white;
    color: #764ba2;
}

/* 模型卡片样式 */
.model-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.model-card:hover {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* 聊天演示预览 */
.chat-demo-preview {
    perspective: 1000px;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.user-message {
    background: #4a5568;
    margin-left: 20%;
}

.ai-message {
    background: #2d3748;
    margin-right: 20%;
}

/* 图像演示预览 */
.image-demo-preview {
    transition: all 0.3s ease;
}

.image-demo-preview:hover {
    transform: scale(1.02);
}

/* 视频演示预览 */
.video-demo-preview {
    position: relative;
    overflow: hidden;
}

.video-demo-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    z-index: 1;
}

/* 演示区域样式 */
.demo-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 24px;
    max-width: 72rem;
    margin: 0 auto;
}

.input-label {
    display: block;
    color: #374151;
    margin-bottom: 8px;
    font-weight: 600;
}

.prompt-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.prompt-textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #8b5cf6;
    border-color: transparent;
}

.demo-btn {
    padding: 16px 24px;
    color: white;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-btn {
    background: #3b82f6;
}

.chat-btn:hover {
    background: #2563eb;
}

.image-btn {
    background: #8b5cf6;
}

.image-btn:hover {
    background: #7c3aed;
}

.video-btn {
    background: #10b981;
}

.video-btn:hover {
    background: #059669;
}

.demo-btn:active {
    transform: scale(0.98);
}

.result-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    min-height: 256px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.demo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-tip {
    font-size: 0.875rem;
    color: #6b7280;
}

.save-btn {
    background: #6b7280;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #4b5563;
}

/* 页脚样式 */
.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.footer-link {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #93c5fd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .demo-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* 打字机效果 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

.typing-effect {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end);
}

/* 悬浮效果 */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}