/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量定义 */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-small: 8px;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.2s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 头部 */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.activation-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--border-radius-small);
    background: var(--background-color);
    font-size: 14px;
    font-weight: 500;
}

.activation-status.activated {
    background: #dcfce7;
    color: var(--success-color);
}

.activation-status.activated::before {
    content: '✓';
    font-weight: bold;
}

/* 主要内容 */
.main {
    padding: 24px 0;
}

.section {
    margin-bottom: 24px;
}

/* 激活状态栏 */
.activation-status {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 500;
}

.status-label {
    opacity: 0.9;
}

.status-code {
    font-family: 'Monaco', 'Menlo', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.status-uses {
    font-weight: 600;
    font-size: 16px;
}

/* 退出登录按钮 */
.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.logout-btn:active {
    transform: translateY(0);
}

.logout-btn i {
    font-size: 12px;
}

/* 卡片样式 */
.card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h2,
.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header i {
    color: var(--primary-color);
    font-size: 20px;
}

.card-body {
    padding: 24px;
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--background-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
}

.btn-record {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 160px;
    justify-content: center;
}

.btn-record:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.btn-record.recording {
    background: var(--warning-color);
    animation: pulse 2s infinite;
}

.btn-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
}

.btn-remove:hover {
    background: #dc2626;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-small);
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

/* 输入框样式 */
.code-input {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
}

.code-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.address-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 14px;
    transition: var(--transition);
}

.address-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

/* 输入组样式 */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.address-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* 标签页样式 */
.tabs {
    display: flex;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-btn:not(.active):hover {
    background: var(--background-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 录音相关样式 */
.recording-controls {
    text-align: center;
    margin-bottom: 24px;
}

.recording-status {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.recognition-result {
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius-small);
    margin-bottom: 20px;
}

.recognized-text {
    background: var(--surface-color);
    padding: 16px;
    border-radius: var(--border-radius-small);
    margin-bottom: 12px;
    font-style: italic;
    color: var(--text-secondary);
}

.addresses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.address-tag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.analysis-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--border-radius-small);
    padding: 12px;
    margin-bottom: 12px;
    color: #0369a1;
    font-size: 13px;
    line-height: 1.4;
}

.analysis-info strong {
    color: #0c4a6e;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 任务列表样式 */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.task-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.task-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.task-status.running {
    background: #dbeafe;
    color: #1d4ed8;
}

.task-status.completed {
    background: #dcfce7;
    color: #166534;
}

.task-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

.task-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 24px;
}

/* 消息提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: var(--success-color);
    background: #f0fdf4;
    color: var(--success-color);
}

.toast.error {
    border-color: var(--danger-color);
    background: #fef2f2;
    color: var(--danger-color);
}

/* 加载指示器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1200;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

/* 其他样式 */
.description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.demo-codes {
    margin-top: 16px;
    padding: 12px;
    background: var(--background-color);
    border-radius: var(--border-radius-small);
    font-size: 13px;
    color: var(--text-secondary);
}

.code {
    background: var(--surface-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.manual-input {
    margin-top: 24px;
}

.manual-input h4 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.addresses-container {
    margin-bottom: 16px;
}

.action-buttons {
    margin-top: 32px;
    text-align: center;
}

/* 动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    
    .header {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .main {
        padding: 16px 0;
    }
    
    .card-header {
        padding: 16px 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .btn-record {
        min-width: auto;
        width: 100%;
    }
    
    .tabs {
        margin-bottom: 16px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .modal {
        padding: 12px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .toast {
        right: 12px;
        left: 12px;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    /* 移动端激活状态栏优化 */
    .activation-status {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        align-items: stretch;
    }
    
    .status-info {
        gap: 12px;
        font-size: 13px;
        justify-content: center;
    }
    
    .logout-btn {
        align-self: center;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .logout-btn span {
        display: inline;
    }
}

@media (max-width: 480px) {
    .code-input {
        font-size: 16px;
        padding: 14px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 16px;
    }
    
    .btn-large {
        padding: 14px 20px;
    }
    
    /* 小屏幕进一步优化 */
    .address-input-group {
        gap: 0.5rem;
        padding: 0.6rem;
    }
    
    .route-selection {
        gap: 0.25rem;
        padding: 0.4rem;
    }
    
    .route-option {
        padding: 0.4rem 0.2rem;
        min-height: 44px; /* 确保触摸友好 */
    }
    
    .route-label {
        font-size: 0.65rem;
        min-width: 24px;
        padding: 0.15rem 0.3rem;
    }
    
    .btn-remove {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* 优化地址输入框在小屏幕上的显示 */
    .address-input {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* 图片上传样式 */
.image-upload-area {
    margin-bottom: 1.5rem;
}

.upload-zone {
    border: 2px dashed #e0e6ed;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
}

.upload-zone.dragover {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    transform: scale(1.02);
}

.upload-content {
    position: relative;
    z-index: 2;
}

.upload-content i {
    font-size: 3rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: block;
}

.upload-content h4 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.upload-content p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 图片预览样式 */
.image-preview-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.image-preview-item {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.image-preview-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.image-preview-name {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    word-break: break-all;
    line-height: 1.2;
}

.image-preview-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    z-index: 1;
}

.image-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.image-upload-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 加载状态样式 */
.analyzing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.analyzing-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.analyzing-text {
    color: #374151;
    font-weight: 500;
    text-align: center;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 起点终点选择样式 */
.route-options {
    margin-bottom: 1rem;
}

.route-hint {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
    padding: 0.75rem;
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.address-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.address-input-group:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.address-input-group .address-input {
    flex: 1;
    min-width: 200px;
}

.route-selection {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.route-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.route-option:hover {
    background: rgba(59, 130, 246, 0.1);
}

.route-option input[type="radio"] {
    margin: 0;
    accent-color: #3b82f6;
}

.route-label {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-align: center;
    min-width: 32px;
    transition: all 0.2s ease;
}

.route-label.start {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.route-label.end {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fbbf24;
}

.route-option input[type="radio"]:checked + .route-label.start {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
    transform: scale(1.05);
}

.route-option input[type="radio"]:checked + .route-label.end {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    transform: scale(1.05);
}

/* 响应式图片上传 */
@media (max-width: 768px) {
    .upload-zone {
        padding: 1.5rem 1rem;
    }
    
    .upload-content i {
        font-size: 2.5rem;
    }
    
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .image-preview-img {
        height: 100px;
    }
    
    .image-upload-actions {
        flex-direction: column;
    }
    
    .image-upload-actions button {
        width: 100%;
    }
    
    /* 移动端起点终点选择 */
    .address-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .address-input-group .address-input {
        min-width: auto;
        width: 100%;
        order: 1;
    }
    
    .route-selection {
        order: 2;
        justify-content: space-around;
        gap: 0.5rem;
        padding: 0.5rem;
        background: rgba(59, 130, 246, 0.05);
        border-radius: 6px;
        border: 1px solid rgba(59, 130, 246, 0.1);
    }
    
    .route-option {
        flex: 1;
        justify-content: center;
        padding: 0.5rem;
        border-radius: 6px;
        background: white;
        border: 1px solid #e2e8f0;
        transition: all 0.2s ease;
    }
    
    .route-option:hover {
        background: rgba(59, 130, 246, 0.05);
        border-color: var(--primary-color);
    }
    
    .route-label {
        font-size: 0.7rem;
        min-width: 28px;
        padding: 0.2rem 0.4rem;
    }
    
    .btn-remove {
        order: 3;
        align-self: center;
        width: fit-content;
        padding: 0.5rem 1rem;
        margin-top: 0.25rem;
    }
} 

/* 任务详情弹窗优化样式 */
.modal-title-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.task-id-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: monospace;
}

/* 任务详情卡片样式 */
.task-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.detail-card:hover {
    box-shadow: var(--shadow-lg);
}

.detail-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-card-header i {
    color: var(--primary-color);
    font-size: 18px;
}

.detail-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-card-body {
    padding: 20px;
}

/* 基本信息样式 */
.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.detail-label i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.task-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-status-badge.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.task-status-badge.running {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
    border: 1px solid #3b82f6;
    animation: pulse 2s infinite;
}

.task-status-badge.completed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #22c55e;
}

.task-status-badge.failed {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.address-count {
    background: var(--background-color);
    padding: 4px 8px;
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 12px;
}

/* 地址列表样式 */
.addresses-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.address-item:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.address-number {
    background: var(--primary-color);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.address-text {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* 成功卡片样式 */
.success-card {
    border-color: var(--success-color);
}

.success-card .detail-card-header {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-bottom-color: var(--success-color);
}

.success-card .detail-card-header i {
    color: var(--success-color);
}

/* 优化结果样式 */
.result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.result-metric {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.result-metric:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.metric-icon {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
}

/* 路径步骤样式 */
.route-path {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-step {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.route-step-number {
    background: var(--primary-color);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.route-step:first-child .route-step-number {
    background: var(--success-color);
}

.route-step:last-child .route-step-number {
    background: var(--warning-color);
}

.route-step-content {
    flex: 1;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid #e2e8f0;
}

.route-step-title {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.route-step-address {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

.route-connector {
    position: absolute;
    left: 17px;
    top: 44px;
    color: var(--text-secondary);
    z-index: 1;
}

/* 错误卡片样式 */
.error-card {
    border-color: var(--danger-color);
}

.error-card .detail-card-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom-color: var(--danger-color);
}

.error-card .detail-card-header i {
    color: var(--danger-color);
}

.error-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--danger-color);
}

.error-icon {
    color: var(--danger-color);
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.error-text {
    color: var(--danger-color);
    font-weight: 500;
    line-height: 1.5;
}

/* 运行状态卡片样式 */
.running-card {
    border-color: var(--primary-color);
}

.running-card .detail-card-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-bottom-color: var(--primary-color);
}

.running-card .detail-card-header i {
    color: var(--primary-color);
}

.running-content {
    text-align: center;
    padding: 20px;
}

.running-animation {
    margin-bottom: 16px;
}

.running-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.running-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: running-bounce 1.4s infinite ease-in-out both;
}

.running-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.running-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.running-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
}

@keyframes running-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .detail-card-header {
        padding: 12px 16px;
    }
    
    .detail-card-body {
        padding: 16px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .result-summary {
        grid-template-columns: 1fr;
    }
    
    .result-metric {
        padding: 12px;
    }
    
    .metric-icon {
        width: 32px;
        height: 32px;
    }
    
    .address-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        text-align: left;
    }
    
    .route-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .route-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .route-connector {
        left: 13px;
        top: 36px;
    }
    
    .error-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
} 

/* 任务列表优化样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    margin-bottom: 20px;
}

.empty-icon i {
    font-size: 64px;
    color: var(--text-secondary);
    opacity: 0.6;
}

.empty-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 300px;
    margin: 0 auto;
}

/* 增强的任务项样式 */
.enhanced-task-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.enhanced-task-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.task-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    gap: 16px;
}

.task-main-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.task-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.enhanced-task-item[onclick*="failed"] .task-icon {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.enhanced-task-item[onclick*="completed"] .task-icon {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.enhanced-task-item[onclick*="running"] .task-icon {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.task-details {
    flex: 1;
    min-width: 0;
}

.task-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.task-id-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-id-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-id-value {
    background: var(--background-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-weight: 600;
    font-size: 12px;
}

.task-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.task-meta-item i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.meta-text {
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
}

/* 任务结果摘要样式 */
.task-result-summary {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid #86efac;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success-color);
    font-size: 13px;
    font-weight: 500;
}

.result-item i {
    font-size: 12px;
}

.task-error-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid #fca5a5;
    color: var(--danger-color);
    font-size: 13px;
}

.task-error-summary i {
    font-size: 14px;
    flex-shrink: 0;
}

.error-text {
    font-weight: 500;
    line-height: 1.3;
}

.task-running-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: var(--border-radius-small);
    border: 1px solid #93c5fd;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
}

.task-running-summary i {
    font-size: 12px;
    animation: pulse 2s infinite;
}

.task-arrow {
    color: var(--text-secondary);
    font-size: 16px;
    flex-shrink: 0;
    transition: var(--transition);
}

.enhanced-task-item:hover .task-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* 响应式任务列表 */
@media (max-width: 768px) {
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-icon i {
        font-size: 48px;
    }
    
    .empty-text {
        font-size: 16px;
    }
    
    .empty-hint {
        font-size: 13px;
    }
    
    .task-item-content {
        padding: 16px;
        gap: 12px;
    }
    
    .task-main-info {
        gap: 12px;
    }
    
    .task-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .task-header-enhanced {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .task-meta {
        gap: 6px;
    }
    
    .task-meta-item {
        font-size: 13px;
    }
    
    .result-item {
        font-size: 12px;
    }
    
    .task-result-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .task-error-summary,
    .task-running-summary {
        font-size: 12px;
    }
} 

/* 额外的移动端优化 */
@media (max-width: 768px) {
    /* 地址容器整体优化 */
    .addresses-container {
        gap: 1rem;
    }
    
    /* 添加地址按钮优化 */
    #addAddressBtn, #addImageAddressBtn {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* 路径提示优化 */
    .route-hint {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    /* 移动端起点终点选择增强 */
    .address-input-group {
        border: 2px solid #e2e8f0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .address-input-group:focus-within {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* 路径选择区域样式增强 */
    .route-selection {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.08) 100%);
        border: 1px solid rgba(59, 130, 246, 0.15);
    }
    
    .route-option {
        background: white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    
    .route-option:active {
        transform: scale(0.98);
    }
    
    /* 删除按钮优化 */
    .btn-remove {
        background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
        min-height: 40px;
        border-radius: 8px;
    }
    
    .btn-remove:hover {
        box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
        transform: translateY(-1px);
    }
    
    .btn-remove:active {
        transform: translateY(0);
    }
} 