/* ============================================
   光影AI - Dashboard工作台风样式表
   文件: Dashboard_Style.css
   作用: 工作台页面专用样式
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131f;
    --bg-tertiary: #1c1c2e;
    --bg-card: #161622;
    --accent-cyan: #00d4ff;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

#app {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   侧边导航栏
   ============================================ */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.logo-area {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    padding: 0 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
}

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.queue-badge {
    margin-left: auto;
    background: var(--accent-cyan);
    color: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-tertiary);
}

.arrow-icon {
    color: var(--text-tertiary);
}

/* ============================================
   主内容区域
   ============================================ */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    background: var(--bg-primary);
    min-height: 100vh;
}

/* 顶部栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent-cyan);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.btn-glow:hover::before {
    animation: glow-sweep 0.5s ease-in-out;
}

@keyframes glow-sweep {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

/* ============================================
   统计卡片
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-3);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.cyan { background: rgba(0, 212, 255, 0.1); color: var(--accent-cyan); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: var(--accent-purple); }
.stat-icon.pink { background: rgba(236, 72, 153, 0.1); color: var(--accent-pink); }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-unit {
    font-size: 18px;
    color: var(--text-secondary);
    -webkit-text-fill-color: var(--text-secondary);
}

.stat-change {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: #22c55e; }
.stat-change.negative { color: #ef4444; }

/* 成本对比可视化 */
.cost-comparison {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.cost-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.cost-bar {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
    position: relative;
}

.cost-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    position: relative;
    transition: all 0.3s;
}

.cost-segment.local { background: var(--accent-cyan); }
.cost-segment.cloud { background: var(--accent-purple); }

/* ============================================
   工作区布局
   ============================================ */
.workspace {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
}

/* 项目列表 */
.projects-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-dot {
    color: var(--accent-cyan);
}

.filter-tabs {
    display: flex;
    gap: 8px;
}

.tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.tab:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.tab.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    border-color: rgba(0, 212, 255, 0.3);
}

.projects-grid {
    display: grid;
    gap: 16px;
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 16px;
}

.project-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.project-thumb {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.status-rendering { background: rgba(0, 212, 255, 0.2); color: var(--accent-cyan); }
.status-draft { background: rgba(161, 161, 170, 0.2); color: var(--text-secondary); }

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.project-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.project-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-progress {
    margin-top: 8px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 2px;
    transition: width 0.3s;
}

.project-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.cost-badge {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.load-more {
    text-align: center;
    margin-top: 24px;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.3s;
}

.load-more:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

/* ============================================
   快速开始面板
   ============================================ */
.quickstart-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quick-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s;
}

.quick-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.quick-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.title-icon {
    font-size: 18px;
}

.title-icon.purple { color: var(--accent-purple); }
.title-icon.cyan { color: var(--accent-cyan); }
.title-icon.green { color: #22c55e; }

.template-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.template-item {
    aspect-ratio: 16/10;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.template-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.3s;
}

.template-item:hover {
    border-color: var(--accent-purple);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.template-item:hover::before {
    opacity: 0.1;
}

.template-icon {
    font-size: 24px;
    z-index: 1;
}

.template-label {
    z-index: 1;
    font-weight: 500;
}

/* 活动列表 */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.activity-item:hover {
    background: var(--bg-tertiary);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    color: var(--text-secondary);
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.activity-time {
    font-size: 12px;
    color: var(--text-tertiary);
    font-family: 'Courier New', monospace;
    flex-shrink: 0;
}

/* 系统状态 */
.system-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    color: var(--text-secondary);
}

.status-value {
    font-weight: 600;
}

.status-value.online { color: #22c55e; }
.status-value.queue { color: var(--accent-cyan); }

.gpu-usage {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.gpu-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.gpu-bar-bg {
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.gpu-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 2px;
}

/* ============================================
   浮动操作按钮
   ============================================ */
.fab {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.7);
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 1200px) {
    .workspace {
        grid-template-columns: 1fr;
    }
    .quickstart-panel {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   动画效果
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }


/* 追加到 Dashboard_Style.css 文件末尾 */

/* 工作流步骤 */
.workflow-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(0, 212, 255, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-purple);
    transform: translateX(4px);
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.step-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.step-arrow {
    color: var(--text-tertiary);
    font-size: 16px;
}

/* 导航徽章 */
.nav-badge {
    margin-left: auto;
    background: var(--accent-pink);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.nav-badge.new {
    background: #22c55e;
}

/* 底部状态栏 */
.system-status-mini {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

/* 模态框样式 */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
}

.modal-content h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

/* 缩略图占位符 */
.project-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    background: var(--bg-tertiary);
}

/* 活动点颜色支持 */
.activity-dot {
    box-shadow: 0 0 8px currentColor;
}