/* =========================
   全局滚动条样式
   ========================= */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* =========================
   动画效果
   ========================= */

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.streaming-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* 卡片悬浮效果 */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* =========================
   玻璃拟态效果
   ========================= */

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.8);
}

/* =========================
   渐变背景
   ========================= */

.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

/* =========================
   流式文本样式
   ========================= */

.streaming-text {
    line-height: 1.8;
}

.streaming-text p {
    margin-bottom: 12px;
}

.streaming-text strong {
    color: #2563eb;
}

.dark .streaming-text strong {
    color: #60a5fa;
}

/* =========================
   加载动画
   ========================= */

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

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

/* =========================
   响应式设计
   ========================= */

@media (max-width: 1200px) {
    .container-responsive {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-responsive {
        flex-direction: column;
        gap: 12px;
    }

    .main-responsive {
        padding: 16px;
    }

    .actions-responsive {
        flex-direction: column;
    }
}

/* =========================
   新增工作台样式
   ========================= */

/* 按钮渐变增强 */
.btn-gradient-purple {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.btn-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

/* 进度条动画 */
@keyframes progress-shine {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-animated {
    background: linear-gradient(
        90deg,
        #10b981 0%,
        #34d399 25%,
        #10b981 50%,
        #34d399 75%,
        #10b981 100%
    );
    background-size: 200% 100%;
    animation: progress-shine 2s linear infinite;
}

/* 空状态浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-icon {
    animation: float 3s ease-in-out infinite;
}

/* =========================
   历史记录动作按钮
   ========================= */

.history-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.history-action-btn:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.dark .history-action-btn:hover {
    background: rgba(51, 65, 85, 0.65);
    border-color: rgba(100, 116, 139, 0.5);
}

.history-action-btn.is-disabled,
.history-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.history-action-btn:disabled:hover {
    background: transparent;
    border-color: transparent;
}

.history-action-neutral {
    color: #64748b;
}

.history-action-primary {
    color: #4f46e5;
}

.history-action-info {
    color: #2563eb;
}

.history-action-success {
    color: #059669;
}

.history-action-warning {
    color: #d97706;
}

.history-action-danger {
    color: #dc2626;
}

.dark .history-action-neutral {
    color: #cbd5e1;
}

.dark .history-action-primary {
    color: #a5b4fc;
}

.dark .history-action-info {
    color: #93c5fd;
}

.dark .history-action-success {
    color: #6ee7b7;
}

.dark .history-action-warning {
    color: #fbbf24;
}

.dark .history-action-danger {
    color: #fca5a5;
}
