/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 现代化滚动条样式 */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.8);
    border-radius: 6px;
    margin: 2px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 6px;
    border: 2px solid rgba(241, 241, 241, 0.8);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a42a0);
    transform: scale(1.1);
}

::-webkit-scrollbar-corner {
    background: rgba(241, 241, 241, 0.8);
}

/* ===============================================
   登录页面样式 - 现代化设计
   =============================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="25" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="25" cy="75" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-30px, -30px) rotate(120deg); }
    66% { transform: translate(30px, -30px) rotate(240deg); }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 50px 40px;
    text-align: center;
    transform: translateY(20px);
    animation: slideUp 0.8s ease-out forwards;
}

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

.login-header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #6b7280;
    margin-bottom: 40px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f9fafb;
    position: relative;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 10px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.login-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.login-btn::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;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 20px 40px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

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

.login-btn:active {
    transform: translateY(-1px);
}

.error-message {
    color: #ef4444;
    background: rgba(254, 226, 226, 0.8);
    backdrop-filter: blur(10px);
    padding: 16px;
    border-radius: 12px;
    margin-top: 25px;
    border: 1px solid rgba(248, 113, 113, 0.2);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ===============================================
   控制面板页面布局 - 现代化设计
   =============================================== */
.dashboard-page {
    background: #f8fafc;
    min-height: 100vh;
}

/* 修复头部宽度问题 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    /* 确保头部占满整个宽度 */
    width: 100%;
    left: 0;
    right: 0;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 5px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 确保宽度计算一致 */
    width: 100%;
    box-sizing: border-box;
}

.header h1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(249, 250, 251, 0.8);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(229, 231, 235, 0.8);
}

.user-info span {
    color: #374151;
    font-weight: 600;
    font-size: 14px;
}

.logout-btn {
    color: #ef4444;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(254, 226, 226, 0.8);
    transform: translateY(-1px);
}

/* ===============================================
   主内容区域布局 - 优化布局
   =============================================== */
/* 确保主内容和头部宽度一致 */
.main-content {
    padding: 30px;
    min-height: calc(100vh - 120px);
    /* 确保宽度计算一致 */
    width: 100%;
    box-sizing: border-box;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(600px, 1fr) auto;
    grid-template-areas: 
        "tools output"
        "files files";
    gap: 30px;
    height: 100%;
    /* 确保宽度计算一致 */
    width: 100%;
    box-sizing: border-box;
}

.tasks-section, .output-section, .files-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(229, 231, 235, 0.3);
    transition: all 0.3s ease;
}

.tasks-section:hover, .output-section:hover, .files-section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

.files-section {
    grid-column: 1 / -1;
    min-height: 500px;
}

/* ===============================================
   可用工具区域样式 - 现代化卡片设计
   =============================================== */
.tasks-section {
    grid-area: tools;
    display: flex;
    flex-direction: column;
}

.tasks-section h2, .output-section h2, .files-section h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #374151, #1f2937);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    flex-shrink: 0;
    position: relative;
}

.tasks-section h2::after, .output-section h2::after, .files-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    /* 调整最大高度，让更多内容可见 */
    max-height: calc(100vh - 250px); /* 从之前的300px改为更大的值 */
    min-height: 400px; /* 添加最小高度 */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    border: 1px solid rgba(229, 231, 235, 0.4);
    border-radius: 16px;
    background: rgba(249, 250, 251, 0.5);
    flex: 1;
}

/* ===============================================
   工具卡片样式 - 现代化设计
   =============================================== */
/* 优化工具卡片的高度和布局 */
.task-card {
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.4);
    border-radius: 16px;
    padding: 20px; /* 从25px减少到20px */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    /* 确保卡片高度自适应内容 */
    height: auto;
    min-height: 200px; /* 设置最小高度 */
    max-height: 280px; /* 设置最大高度防止过高 */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 确保按钮始终在底部可见 */
.task-card .task-btn {
    margin-top: auto; /* 确保按钮在底部 */
    flex-shrink: 0; /* 防止按钮被压缩 */
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.task-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.task-card:hover::before {
    transform: scaleX(1);
}

/* 优化卡片内容区域 */
.task-card h3 {
    margin: 0 0 0px 0; /* 减少间距 */
    font-size: 14px; /* 稍微减小字体 */
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.task-card p {
    margin: 0 0 0px 0; /* 减少间距 */
    color: #6b7280;
    font-size: 13px; /* 稍微减小字体 */
    line-height: 1;
    flex: 1;
    /* 添加文本溢出处理 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 最多显示3行 */
    -webkit-box-orient: vertical;
}

/* 优化任务元信息区域 */
.task-meta {
    font-size: 11px; /* 减小字体 */
    color: #6b7280;
    margin: 8px 0; /* 减少间距 */
    padding: 6px; /* 减少内边距 */
    background: rgba(249, 250, 251, 0.8);
    border-radius: 6px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    flex-shrink: 0; /* 防止被压缩 */
}

.task-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.task-btn::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;
}

.task-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.task-btn:active {
    transform: translateY(0);
}

.task-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===============================================
   执行结果区域样式 - 现代化终端
   =============================================== */
.output-section {
    grid-area: output;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-shrink: 0;
}

.clear-btn, .refresh-btn {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clear-btn:hover, .refresh-btn:hover {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

/* 现代化终端设计 */
.terminal {
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 16px;
    padding: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    position: relative;
    overflow: hidden;
    max-height: calc(100vh - 100px);
    min-height: 100px;
    flex: 1;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(135deg, #374151, #1f2937);
    border-bottom: 1px solid rgba(75, 85, 99, 0.5);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 2;
}

.terminal::after {
    content: '● ● ●';
    position: absolute;
    top: 0;
    left: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 12px;
    letter-spacing: 8px;
    z-index: 3;
}

.terminal-content {
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 60px 25px 25px;
    height: 100%;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
}

.terminal.loading {
    position: relative;
}

.terminal.loading::before {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.terminal.loading .terminal-content {
    color: #10b981;
}

.terminal-loading-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Loading 动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.terminal.loading .terminal-content::after {
    content: ' ▋';
    animation: pulse 1s infinite;
    color: #10b981;
}

/* 继续下一部分... */
/* ===============================================
   文件区域样式 - 现代化设计
   =============================================== */
.files-section {
    grid-area: files;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
    flex-shrink: 0;
}

.files-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.task-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(249, 250, 251, 0.8);
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    transition: all 0.3s ease;
}

.task-selector:hover {
    background: rgba(243, 244, 246, 0.9);
    border-color: rgba(156, 163, 175, 0.6);
}

.task-selector label {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-selector select {
    min-width: 200px;
    padding: 8px 16px;
    border: 2px solid rgba(229, 231, 235, 0.6);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.task-selector select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.task-selector select:hover {
    border-color: #9ca3af;
}

.task-selector optgroup {
    font-weight: 700;
    color: #1f2937;
    background: #f9fafb;
}

.task-selector option {
    padding: 8px 12px;
    font-weight: 500;
}

.current-dir-info {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.9), rgba(243, 244, 246, 0.9));
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.current-dir-info:hover {
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.9), rgba(229, 231, 235, 0.9));
    transform: translateY(-1px);
}

.current-dir-info h4 {
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-dir-info h4::before {
    content: '📁';
    font-size: 20px;
}

.dir-path {
    color: #4b5563;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    margin: 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(229, 231, 235, 0.5);
    word-break: break-all;
}

.dir-stats {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.dir-stats span {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    border: 1px solid rgba(229, 231, 235, 0.5);
    transition: all 0.3s ease;
}

.dir-stats span:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.file-list {
    flex: 1;
    border: 1px solid rgba(229, 231, 235, 0.4);
    border-radius: 16px;
    background: rgba(249, 250, 251, 0.3);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    min-height: 400px;
    max-height: calc(100vh - 500px);
}

/* ===============================================
   现代化文件项样式
   =============================================== */
.file-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid rgba(229, 231, 235, 0.4);
    border-radius: 16px;
    margin-bottom: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
    overflow: hidden;
}

.file-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.file-item:hover {
    background: rgba(249, 250, 251, 0.8);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(8px) translateY(-2px);
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(102, 126, 234, 0.1);
}

.file-item:hover::before {
    transform: scaleY(1);
}

/* 文件类型颜色标识 */
.file-item[data-preview-type="image"] {
    border-left-color: #f59e0b;
}

.file-item[data-preview-type="image"]::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.file-item[data-preview-type="excel"] {
    border-left-color: #10b981;
}

.file-item[data-preview-type="excel"]::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

.file-item[data-preview-type="csv"] {
    border-left-color: #3b82f6;
}

.file-item[data-preview-type="csv"]::before {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.file-item[data-preview-type="text"] {
    border-left-color: #8b5cf6;
}

.file-item[data-preview-type="text"]::before {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.file-icon {
    font-size: 32px;
    margin-right: 20px;
    min-width: 40px;
    text-align: center;
    transition: transform 0.3s ease;
}

.file-item:hover .file-icon {
    transform: scale(1.1) rotate(5deg);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.file-item:hover .file-name {
    color: #667eea;
}

.file-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
    align-items: center;
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(243, 244, 246, 0.8);
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.file-meta span:hover {
    background: rgba(229, 231, 235, 0.8);
    transform: translateY(-1px);
}

.preview-type {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    color: #1d4ed8 !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.file-item:hover .file-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(249, 250, 251, 0.9);
    color: #374151;
    border: 1px solid rgba(229, 231, 235, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.view-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
}

.view-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.download-btn:hover {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: #10b981;
    color: #065f46;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border-color: #ef4444;
    color: #991b1b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.debug-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: white !important;
    border: none !important;
}

.debug-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.retry-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    background: rgba(249, 250, 251, 0.5);
    border-radius: 16px;
    border: 2px dashed rgba(209, 213, 219, 0.8);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #374151;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
}

/* 加载状态 */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6, #e5e7eb, #f3f4f6);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===============================================
   移动端头部压缩优化 - 完整版本
   =============================================== */

/* 平板设备 (768px - 1023px) */
@media (max-width: 1023px) {
    .header-content {
        padding: 15px 20px; /* 从 20px 25px 减少 */
        max-width: 1200px;
    }
    
    .header h1 {
        font-size: 18px; /* 从默认减小 */
    }
    
    .header-subtitle {
        font-size: 12px; /* 从 14px 减小 */
    }
    
    .user-info {
        padding: 10px 16px; /* 稍微压缩 */
        font-size: 13px; /* 减小字体 */
    }
    
    .user-avatar {
        width: 28px !important; /* 从 32px 减小 */
        height: 28px !important;
        font-size: 12px !important; /* 从 14px 减小 */
    }
    
    .header-actions button {
        padding: 5px 10px; /* 从 6px 12px 减小 */
        font-size: 11px; /* 从 12px 减小 */
    }
    
    .logout-btn {
        padding: 6px 12px; /* 稍微减小 */
        font-size: 12px; /* 减小字体 */
    }
    
    .main-content {
        padding: 15px 20px; /* 从 20px 25px 减少，与头部保持一致 */
    }
    
    .container {
        gap: 20px; /* 从 25px 减少 */
        padding: 0;
        max-width: 1200px;
    }
    
    .tasks-section, .output-section, .files-section {
        padding: 20px 15px; /* 从 25px 20px 减少 */
    }
    
    .tasks-section h2, .output-section h2, .files-section h2 {
        font-size: 18px; /* 减小标题字体 */
    }
    
    .tasks-grid {
        max-height: 400px;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* 从 280px 减小 */
        gap: 12px; /* 从 15px 减小 */
    }
    
    .task-card {
        padding: 15px; /* 减小内边距 */
    }
    
    .task-card h3 {
        font-size: 14px; /* 减小字体 */
    }
    
    .task-card p {
        font-size: 12px; /* 减小字体 */
    }
    
    .terminal {
        max-height: 450px; /* 从 500px 减小 */
        min-height: 200px; /* 从 250px 减小 */
    }
    
    .terminal-content {
        font-size: 13px; /* 减小字体 */
    }
    
    .files-section {
        min-height: 350px; /* 从 400px 减小 */
    }
    
    .file-list {
        max-height: 300px; /* 从 350px 减小 */
    }
}

/* 手机设备 (480px - 767px) - 大幅压缩 */
@media (max-width: 767px) {
    .header-content {
        padding: 8px 12px; /* 大幅压缩，从 20px 15px 减少 */
        max-width: none;
        flex-direction: row; /* 改为水平布局节省空间 */
        align-items: center;
        gap: 8px; /* 从 15px 大幅减少 */
        text-align: left; /* 从 center 改为 left */
    }
    
    .header h1 {
        font-size: 14px; /* 从 24px 大幅减小 */
        margin: 0;
        line-height: 1.2;
    }
    
    /* 隐藏副标题节省空间 */
    .header-subtitle {
        display: none !important;
    }
    
    .user-info {
        padding: 5px 8px; /* 从 15px 大幅压缩 */
        gap: 6px; /* 从 10px 减少 */
        border-radius: 12px; /* 从 16px 减小 */
        font-size: 11px; /* 大幅减小字体 */
        background: rgba(249, 250, 251, 0.9);
        backdrop-filter: blur(10px);
        flex-direction: row; /* 改为水平布局 */
    }
    
    .user-avatar {
        width: 22px !important; /* 从 32px 大幅减小 */
        height: 22px !important;
        font-size: 10px !important; /* 从 14px 大幅减小 */
    }
    
    /* 隐藏用户详细信息，只保留头像 */
    .user-details {
        display: none;
    }
    
    .header-actions {
        gap: 4px !important; /* 从 10px 大幅减少 */
        margin-left: 6px !important; /* 从 15px 减少 */
    }
    
    .header-actions button {
        padding: 3px 6px !important; /* 从 6px 12px 大幅减小 */
        font-size: 9px !important; /* 从 12px 大幅减小 */
        border-radius: 4px !important;
    }
    
    .logout-btn {
        padding: 3px 6px !important; /* 从 8px 16px 大幅减小 */
        font-size: 9px !important; /* 从 14px 大幅减小 */
        border-radius: 4px !important;
    }
    
    .main-content {
        padding: 10px 12px; /* 从 15px 15px 减少，与头部保持一致 */
    }
    
    .container {
        gap: 15px; /* 从 20px 减少 */
        padding: 0;
        max-width: none;
    }
    
    .tasks-section, .output-section, .files-section {
        padding: 15px 10px; /* 从 20px 15px 减少 */
        border-radius: 12px; /* 从 16px 减小 */
    }
    
    .tasks-section h2, .output-section h2, .files-section h2 {
        font-size: 16px; /* 从 20px 减小 */
        margin-bottom: 15px; /* 从 20px 减小 */
    }
    
    .tasks-grid {
        max-height: 300px; /* 从 350px 减小 */
        grid-template-columns: 1fr;
        gap: 10px; /* 从 15px 减小 */
        padding: 8px; /* 从 10px 减小 */
    }
    
    .task-card {
        padding: 12px; /* 从 20px 减小 */
    }
    
    .task-card h3 {
        font-size: 13px; /* 从原来的 12px 稍微增加，确保可读性 */
        line-height: 1.3;
    }
    
    .task-card p {
        font-size: 11px; /* 从 13px 减小 */
        line-height: 1.4;
    }
    
    .terminal {
        max-height: 300px; /* 从 400px 减小 */
        min-height: 150px; /* 从 200px 减小 */
    }
    
    .terminal-content {
        padding: 40px 10px 10px; /* 从 50px 15px 15px 减小 */
        font-size: 11px; /* 从 12px 减小 */
        line-height: 1.4;
    }
    
    .files-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px; /* 从 15px 减小 */
    }
    
    .files-controls {
        flex-direction: column;
        gap: 10px; /* 从 15px 减小 */
    }
    
    .task-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 6px; /* 从 8px 减小 */
        padding: 10px; /* 从 15px 减小 */
        border-radius: 8px; /* 从 12px 减小 */
    }
    
    .task-selector label {
        font-size: 11px; /* 减小字体 */
    }
    
    .task-selector select {
        min-width: auto;
        width: 100%;
        font-size: 12px; /* 减小字体 */
        padding: 6px 12px; /* 减小内边距 */
    }
    
    .current-dir-info {
        padding: 12px 10px; /* 从 20px 15px 减小 */
    }
    
    .current-dir-info h4 {
        font-size: 14px; /* 从 16px 减小 */
    }
    
    .dir-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px; /* 从 10px 减小 */
    }
    
    .dir-stats span {
        font-size: 10px; /* 减小字体 */
        padding: 4px 8px; /* 减小内边距 */
    }
    
    .file-list {
        max-height: 250px; /* 从 300px 减小 */
        padding: 10px 8px; /* 从 15px 10px 减小 */
    }
    
    .file-item {
        flex-direction: column;
        align-items: stretch;
        padding: 10px; /* 从 15px 减小 */
        gap: 10px; /* 从 15px 减小 */
        margin-bottom: 8px; /* 减小间距 */
    }
    
    .file-item:hover {
        transform: translateY(-1px); /* 从 -2px 减小 */
    }
    
    .file-icon {
        align-self: center;
        margin-right: 0;
        margin-bottom: 3px; /* 从 5px 减小 */
        font-size: 24px; /* 减小图标 */
    }
    
    .file-name {
        font-size: 12px; /* 减小字体 */
    }
    
    .file-meta {
        justify-content: center;
        gap: 6px; /* 从 10px 减小 */
    }
    
    .file-meta span {
        font-size: 10px; /* 从 11px 减小 */
        padding: 2px 4px; /* 从 3px 6px 减小 */
    }
    
    .file-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px; /* 从 8px 减小 */
        opacity: 1;
    }
    
    .action-btn {
        font-size: 10px; /* 从 11px 减小 */
        padding: 4px 8px; /* 从 6px 10px 减小 */
    }
    
    .output-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px; /* 从 15px 减小 */
    }
    
    .clear-btn, .refresh-btn {
        align-self: center;
        padding: 6px 12px; /* 从 8px 16px 减小 */
        font-size: 11px; /* 从 12px 减小 */
    }
}

/* 小屏手机设备 (320px - 479px) - 最大压缩 */
@media (max-width: 479px) {
    .header-content {
        padding: 6px 8px; /* 从 15px 10px 进一步减少 */
        gap: 6px;
    }
    
    .header h1 {
        font-size: 12px; /* 从 20px 大幅减小 */
        font-weight: 700;
    }
    
    .user-info {
        padding: 3px 6px; /* 进一步压缩 */
        gap: 4px;
        font-size: 10px;
    }
    
    .user-avatar {
        width: 18px !important; /* 进一步减小 */
        height: 18px !important;
        font-size: 8px !important;
    }
    
    /* 隐藏快捷键按钮，只保留退出 */
    .header-actions button:not(.logout-btn) {
        display: none;
    }
    
    .logout-btn {
        padding: 2px 4px !important;
        font-size: 8px !important;
    }
    
    /* 只显示图标，隐藏文字 */
    .logout-btn span:not(:first-child) {
        display: none;
    }
    
    .main-content {
        padding: 8px 8px; /* 从 10px 10px 减少，与头部保持一致 */
    }
    
    .container {
        padding: 0;
        gap: 10px; /* 进一步减小 */
    }
    
    .tasks-section, .output-section, .files-section {
        padding: 10px 8px; /* 从 15px 10px 减少 */
        border-radius: 10px;
    }
    
    .tasks-section h2, .output-section h2, .files-section h2 {
        font-size: 14px; /* 进一步减小 */
        margin-bottom: 12px;
    }
    
    .task-card {
        padding: 10px; /* 从 15px 减小 */
    }
    
    .task-card h3 {
        font-size: 12px; /* 保持可读性 */
    }
    
    .task-card p {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .terminal::after {
        left: 8px; /* 从 10px 减小 */
        font-size: 9px; /* 从 10px 减小 */
    }
    
    .terminal-content {
        padding: 35px 8px 8px; /* 从 45px 10px 10px 减小 */
        font-size: 10px; /* 从 11px 减小 */
        line-height: 1.3;
    }
    
    .file-item {
        padding: 8px; /* 从 12px 减小 */
        gap: 8px;
    }
    
    .file-name {
        font-size: 11px; /* 从 14px 减小 */
    }
    
    .file-icon {
        font-size: 20px; /* 从 24px 减小 */
    }
    
    .current-dir-info {
        padding: 10px 8px; /* 从 15px 10px 减小 */
    }
    
    .current-dir-info h4 {
        font-size: 12px; /* 进一步减小 */
    }
    
    .dir-stats {
        grid-template-columns: 1fr;
        gap: 6px; /* 从 8px 减小 */
    }
    
    .dir-stats span {
        font-size: 9px; /* 进一步减小 */
        padding: 3px 6px;
    }
    
    .file-meta span {
        font-size: 9px;
        padding: 2px 3px;
    }
    
    .action-btn {
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* 极小屏幕优化 (最大压缩) */
@media (max-width: 360px) {
    .header-content {
        padding: 4px 6px;
        gap: 4px;
    }
    
    .header h1 {
        font-size: 11px;
    }
    
    .user-info {
        padding: 2px 4px;
        font-size: 9px;
    }
    
    .user-avatar {
        width: 16px !important;
        height: 16px !important;
        font-size: 7px !important;
    }
    
    .main-content {
        padding: 6px 6px;
    }
    
    .tasks-section, .output-section, .files-section {
        padding: 8px 6px;
    }
    
    .tasks-section h2, .output-section h2, .files-section h2 {
        font-size: 13px;
    }
    
    .terminal-content {
        font-size: 9px;
        padding: 30px 6px 6px;
    }
}

/* 横屏手机优化 */
@media (max-width: 767px) and (orientation: landscape) {
    .header-content {
        padding: 4px 8px; /* 横屏时进一步压缩头部 */
    }
    
    .header h1 {
        font-size: 12px;
    }
    
    .user-info {
        padding: 3px 6px;
    }
    
    .main-content {
        padding: 6px 8px;
    }
    
    .terminal {
        max-height: 200px; /* 从 250px 减小 */
        min-height: 120px;
    }
    
    .file-list {
        max-height: 150px; /* 从 200px 减小 */
    }
    
    .files-section {
        min-height: 250px; /* 从 300px 减小 */
    }
    
    .tasks-grid {
        max-height: 200px; /* 横屏时减小任务网格高度 */
    }
}

/* 高分辨率设备优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    @media (max-width: 767px) {
        .terminal-content,
        .file-meta,
        .action-btn {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }
    }
}
/* 高分辨率设备优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .terminal-content,
    .file-meta,
    .action-btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* 打印样式 */
@media print {
    .header,
    .file-actions,
    .task-btn,
    .clear-btn,
    .refresh-btn {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tasks-section,
    .output-section,
    .files-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 可访问性优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式准备 */
@media (prefers-color-scheme: dark) {
    /* 未来可扩展深色模式支持 */
}

@keyframes loading-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 跳过动画按钮样式优化 */
#skipAnimationBtn:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #b45309 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#skipAnimationBtn:active {
    transform: translateY(0);
}

/* 按钮入场动画 */
@keyframes skipButtonSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#skipAnimationBtn {
    animation: skipButtonSlideIn 0.3s ease-out;
}

/* ⭐ 搜索功能样式 ⭐ */
.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: inline-block;
}

#fileSearchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-clear:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.search-options {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 12px;
}

.search-options label:hover {
    color: #374151;
}

/* ⭐ 搜索高亮样式 ⭐ */
.search-highlight {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

/* ⭐ 文件夹样式 ⭐ */
.folder-item {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid #0ea5e9;
}

.folder-item:hover {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    border-left-color: #0284c7;
}

.folder-icon {
    font-size: 36px;
    color: #0ea5e9;
}

.folder-name {
    color: #0c4a6e;
    font-weight: 700;
}

.folder-path, .file-path {
    font-size: 11px;
    color: #64748b;
    font-family: monospace;
    margin-left: 8px;
    background: rgba(148, 163, 184, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.parent-path {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    color: #6b21a8;
    font-weight: 600;
}

/* ⭐ 浏览按钮样式 ⭐ */
.explore-btn {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: white;
    border: none;
}

.explore-btn:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

/* ⭐ 视图模式按钮样式 ⭐ */
#viewModeBtn:hover {
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.4);
    transform: translateY(-1px);
}

/* ⭐ 搜索状态栏动画 ⭐ */
.search-status {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ⭐ 移动端搜索优化 ⭐ */
@media (max-width: 768px) {
    .search-container {
        order: -1;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    #fileSearchInput {
        min-width: auto;
        width: 100%;
    }
    
    .search-options {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .files-controls {
        flex-direction: column;
        gap: 15px;
    }
}

/* ⭐ 树形视图样式 ⭐ */
.tree-view-container {
    padding: 10px;
}

.tree-folder-header:hover {
    background: rgba(243, 244, 246, 0.9) !important;
    transform: translateX(2px);
}

.tree-action-btn {
    background: rgba(249, 250, 251, 0.9);
    border: 1px solid rgba(229, 231, 235, 0.6);
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.tree-action-btn:hover {
    background: rgba(239, 246, 255, 0.9);
    border-color: #3b82f6;
    transform: scale(1.1);
}

.tree-file-item:hover {
    background: rgba(249, 250, 251, 0.9) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    transform: translateX(4px);
}

.list-view-container {
    /* 原有的列表视图样式 */
}

/* 视图模式指示器 */
.view-mode-indicator {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* ===============================================
   紧凑型浮窗 - 压缩尺寸和标题栏
   =============================================== */

/* 隐藏原有的展开内容 */
.task-details {
    display: none !important;
}

/* 通用浮层模态框 - 紧凑版本 */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: auto;
    overflow: auto;
}

.task-modal.active {
    display: flex;
    opacity: 1;
    align-items: flex-start;
    justify-content: center;
    /* ⭐ 减少顶部间距 ⭐ */
    padding-top: 3vh;
    padding-bottom: 3vh;
    min-height: 100vh;
    box-sizing: border-box;
}

.task-modal-content {
    background: white;
    /* ⭐ 减小宽度，让浮窗更紧凑 ⭐ */
    width: 75%; /* 从 90% 减少到 75% */
    max-width: 550px; /* 从 700px 减少到 550px */
    border-radius: 16px; /* 从 20px 减少到 16px */
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3), /* 从 25px 50px 减少 */
        0 0 0 1px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0 auto;
    min-height: fit-content;
    max-height: none;
}

.task-modal.active .task-modal-content {
    transform: scale(1) translateY(0);
}

.task-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    /* ⭐ 大幅压缩标题栏高度 ⭐ */
    padding: 12px 20px; /* 从 25px 30px 大幅减少 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1;
    /* ⭐ 限制最小高度 ⭐ */
    min-height: 50px; /* 明确设置最小高度 */
}

.task-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* ⭐ 压缩标题区域内容 ⭐ */
.task-modal-header h2 {
    font-size: 18px !important; /* 从 24px 减少 */
    margin: 0 !important;
    line-height: 1.3 !important;
}

.task-modal-header p {
    font-size: 11px !important; /* 从 14px 减少 */
    margin: 2px 0 0 0 !important; /* 从 5px 减少 */
    opacity: 0.8 !important;
}

.task-modal-header .task-icon {
    font-size: 28px !important; /* 从 36px 减少 */
}

.task-modal-body {
    /* ⭐ 压缩内容区域内边距 ⭐ */
    padding: 20px; /* 从 30px 减少 */
    overflow: visible;
    flex: 1;
    min-height: fit-content;
}

.task-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    /* ⭐ 压缩关闭按钮 ⭐ */
    width: 32px; /* 从 40px 减少 */
    height: 32px; /* 从 40px 减少 */
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; /* 从 20px 减少 */
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.task-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
}

/* ⭐ 压缩滚动提示 ⭐ */
.scroll-hint {
    position: fixed;
    bottom: 15px; /* 从 20px 减少 */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 6px 12px; /* 从 8px 16px 减少 */
    border-radius: 16px; /* 从 20px 减少 */
    font-size: 11px; /* 从 12px 减少 */
    z-index: 10001;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.scroll-hint.visible {
    opacity: 1;
}

/* 任务头部优化 */
.task-header {
    position: relative;
    overflow: hidden;
}

.task-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 12px;
    pointer-events: none;
}

.task-header:hover::after {
    opacity: 1;
}

.task-header:active::after {
    opacity: 0.8;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

/* 展开图标优化 */
.expand-icon {
    position: relative;
    z-index: 1;
}

.expand-icon:hover {
    background: linear-gradient(135deg, #e0f2fe, #b3e5fc) !important;
    transform: scale(1.15);
}

/* ⭐ 压缩模态框内容样式 ⭐ */
.modal-task-description {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 10px; /* 从 12px 减少 */
    padding: 15px; /* 从 20px 减少 */
    margin-bottom: 15px; /* 从 20px 减少 */
}

.modal-task-description h3 {
    font-size: 14px !important; /* 减小字体 */
    margin-bottom: 8px !important; /* 减少间距 */
}

.modal-task-description p {
    font-size: 12px !important; /* 减小字体 */
    line-height: 1.5 !important;
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* 从 200px 减少 */
    gap: 12px; /* 从 16px 减少 */
    margin-bottom: 15px; /* 从 20px 减少 */
}

.modal-meta-item {
    background: white;
    padding: 12px; /* 从 16px 减少 */
    border-radius: 10px; /* 从 12px 减少 */
    border: 1px solid rgba(229, 231, 235, 0.6);
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 减少阴影 */
}

.modal-meta-item:hover {
    transform: translateY(-2px); /* 从 -3px 减少 */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* 减少阴影 */
    border-color: rgba(102, 126, 234, 0.3);
}

.modal-meta-item h4 {
    font-size: 12px !important; /* 减小字体 */
    margin-bottom: 4px !important; /* 减少间距 */
}

.modal-meta-item .meta-icon {
    font-size: 20px !important; /* 从 24px 减少 */
    margin-bottom: 6px !important; /* 减少间距 */
}

.modal-shortcut-hint {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px; /* 从 12px 减少 */
    padding: 12px; /* 从 16px 减少 */
    text-align: center;
    margin-top: 15px; /* 从 20px 减少 */
}

.modal-shortcut-hint div:first-child {
    font-size: 12px !important; /* 减小字体 */
    margin-bottom: 6px !important; /* 减少间距 */
}

.modal-shortcut-hint div:last-child {
    font-size: 11px !important; /* 减小字体 */
}

/* ⭐ 压缩执行按钮 ⭐ */
.modal-execute-btn {
    padding: 12px 30px !important; /* 从 15px 40px 减少 */
    font-size: 14px !important; /* 从 16px 减少 */
    border-radius: 10px !important; /* 从 12px 减少 */
    margin-top: 20px !important; /* 从 25px 减少 */
}

/* ⭐ 压缩命令展示区域 ⭐ */
.modal-command-section {
    padding: 12px !important; /* 从 16px 减少 */
    border-radius: 8px !important; /* 从 10px 减少 */
    margin-bottom: 15px !important; /* 从 20px 减少 */
}

.modal-command-section h4 {
    font-size: 12px !important; /* 减小字体 */
    margin-bottom: 6px !important; /* 减少间距 */
}

.modal-command-section code {
    font-size: 11px !important; /* 减小字体 */
    padding: 6px !important; /* 减少内边距 */
}

/* ===============================================
   响应式适配 - 紧凑版本
   =============================================== */

/* 平板设备 */
@media (max-width: 1023px) {
    .task-modal.active {
        padding-top: 2vh;
        padding-bottom: 2vh;
    }
    
    .task-modal-content {
        width: 80%; /* 稍微增加平板宽度 */
        max-width: 500px;
    }
    
    .task-modal-header {
        padding: 10px 16px; /* 进一步压缩 */
        min-height: 45px;
    }
    
    .task-modal-body {
        padding: 16px; /* 从 20px 减少 */
    }
}

/* 手机设备 */
@media (max-width: 767px) {
    .task-modal.active {
        padding-top: 1vh;
        padding-bottom: 1vh;
    }
    
    .task-modal-content {
        width: 90%; /* 手机端稍微增加宽度 */
        max-width: none;
        border-radius: 12px;
    }
    
    .task-modal-header {
        padding: 8px 12px; /* 手机端进一步压缩 */
        min-height: 40px;
    }
    
    .task-modal-header h2 {
        font-size: 15px !important; /* 手机端字体 */
    }
    
    .task-modal-header p {
        font-size: 10px !important;
    }
    
    .task-modal-header .task-icon {
        font-size: 24px !important;
    }
    
    .task-modal-body {
        padding: 12px; /* 从 15px 减少 */
    }
    
    .task-modal-close {
        width: 28px; /* 从 32px 减少 */
        height: 28px;
        font-size: 14px; /* 从 16px 减少 */
    }
    
    .modal-meta-grid {
        grid-template-columns: 1fr;
        gap: 8px; /* 从 12px 减少 */
    }
    
    .modal-meta-item {
        padding: 10px; /* 从 12px 减少 */
    }
    
    .scroll-hint {
        bottom: 12px;
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* 小屏手机 */
@media (max-width: 479px) {
    .task-modal.active {
        padding-top: 0.5vh;
        padding-bottom: 0.5vh;
    }
    
    .task-modal-content {
        width: 95%;
        border-radius: 10px;
    }
    
    .task-modal-header {
        padding: 6px 10px; /* 最小化标题栏 */
        min-height: 36px;
    }
    
    .task-modal-header h2 {
        font-size: 13px !important;
    }
    
    .task-modal-header .task-icon {
        font-size: 20px !important;
    }
    
    .task-modal-body {
        padding: 10px;
    }
    
    .task-modal-close {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .scroll-hint {
        bottom: 8px;
        font-size: 9px;
        padding: 3px 6px;
    }
}

/* 桌面端大屏 */
@media (min-width: 1200px) {
    .task-modal.active {
        padding-top: 5vh;
        padding-bottom: 5vh;
    }
    
    .task-modal-content {
        width: 65%; /* 从 60% 稍微增加 */
        max-width: 600px; /* 从 800px 大幅减少 */
    }
    
    .task-modal-header {
        padding: 15px 25px; /* 从 30px 40px 减少 */
        min-height: 55px;
    }
    
    .task-modal-body {
        padding: 25px; /* 从 40px 减少 */
    }
    
    .modal-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px; /* 从 20px 减少 */
    }
}

/* ===============================================
   其他样式保持不变...
   =============================================== */

/* 滚动优化 */
.task-modal {
    scroll-behavior: smooth;
}

.task-modal::-webkit-scrollbar {
    width: 4px; /* 从 6px 减少 */
}

.task-modal::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.task-modal::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px; /* 从 3px 减少 */
}

.task-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* 动画优化 */
@keyframes modalSlideInCompact {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(15px); /* 从 20px 减少 */
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.task-modal.active .task-modal-content {
    animation: modalSlideInCompact 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* 从 0.4s 减少 */
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .task-modal,
    .task-modal-content,
    .task-modal-close,
    .modal-meta-item,
    .scroll-hint {
        transition: none !important;
        animation: none !important;
    }
    
    .task-modal {
        scroll-behavior: auto;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .task-modal-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .modal-meta-item {
        background: #374151;
        border-color: #4b5563;
    }
    
    .modal-task-description {
        background: #374151;
        border-color: #4b5563;
    }
    
    .scroll-hint {
        background: rgba(75, 85, 99, 0.9);
    }
}

.csv-table .cell-editor {
    width: 100%;
    height: 100%;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    outline: none;
    resize: none;
    min-height: 32px;
    /* ⭐ 防止额外空白 ⭐ */
    margin: 0;
    box-sizing: border-box;
    line-height: 1.4;
    /* ⭐ 确保文本对齐 ⭐ */
    vertical-align: top;
    /* ⭐ 防止浏览器自动完成 ⭐ */
    autocomplete: off;
    autocorrect: off;
    autocapitalize: off;
    spellcheck: false;
}

.csv-table td.editing {
    padding: 0;
    background: white;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    /* ⭐ 确保编辑器完全填充单元格 ⭐ */
    vertical-align: top;
}

/* ⭐ 数据类型特定的编辑器样式 ⭐ */
.csv-data-type-number .cell-editor {
    text-align: right;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
}

.csv-data-type-date .cell-editor {
    color: #6f42c1;
}

.csv-data-type-text .cell-editor {
    color: #212529;
}

/* 交易系统区域样式 */
.trading-system-section {
    background: rgba(249, 250, 251, 0.3);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.6);
}

.trading-card {
    position: relative;
    overflow: hidden;
}

.trading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.trading-card:hover::before {
    left: 100%;
}

/* 滚动提示样式 */
.scroll-hint {
    position: fixed;
    bottom: 70px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.scroll-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 任务模态框样式 */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.task-modal.active {
    opacity: 1;
    visibility: visible;
}

.task-modal-content {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 700px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.task-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.task-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.task-modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 100px);
}

.modal-task-description {
    background: rgba(249, 250, 251, 0.5);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.modal-meta-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid rgba(229, 231, 235, 0.6);
    transition: all 0.3s ease;
}

.modal-meta-item:hover {
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-shortcut-hint {
    background: rgba(102, 126, 234, 0.05);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .trading-grid {
        grid-template-columns: 1fr !important;
    }
    
    .modal-meta-grid {
        grid-template-columns: 1fr !important;
    }
    
    .task-modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .task-modal-header {
        padding: 20px;
    }
    
    .task-modal-body {
        padding: 20px;
    }
}