body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: #333;
}

/* 限制页面最大宽度 */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 超大屏幕的特殊处理 */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

/* 在中等屏幕上进一步优化 */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}

.card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f1f8ff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.btn-primary {
    background-color: #4285f4;
    border-color: #4285f4;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #3367d6;
    border-color: #3367d6;
}

.btn-success {
    background-color: #34a853;
    border-color: #34a853;
}

.btn-success:hover, .btn-success:focus {
    background-color: #2d8746;
    border-color: #2d8746;
}

/* 禁用按钮样式 */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.btn-success:disabled,
.btn-success.disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
}

.table th {
    font-weight: 600;
    color: #555;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f1f8ff;
}

.link-container {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

.file-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.truncate-text {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    position: relative;
}

.truncate-text:hover {
    overflow: visible;
    z-index: 100;
}

.truncate-text:hover span {
    display: block;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    position: absolute;
    top: -5px;
    left: 0;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    max-width: 400px;
    word-wrap: break-word;
    white-space: normal;
    z-index: 1000;
}

/* 加载动画样式 */
.spinner-border {
    height: 2rem;
    width: 2rem;
}

/* Toast通知样式 */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background-color: #fff;
    color: #333;
    min-width: 250px;
    margin-top: 10px;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    position: relative;
}

.toast-success {
    border-left: 4px solid #34a853;
}

.toast-error {
    border-left: 4px solid #ea4335;
}

.toast-info {
    border-left: 4px solid #4285f4;
}

.toast-warning {
    border-left: 4px solid #fbbc05;
}

/* 计数通知样式 */
.toast-counting {
    background-color: #f8f9fa;
}

.toast-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #4285f4;
    color: white;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 改进响应式设计 */
@media (max-width: 767.98px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    /* Aria2面板的卡片头部特殊处理 */
    #aria2Panel .card-header {
        flex-direction: column;
        align-items: center !important;
    }

    .card-header div {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        width: 100%;
    }

    .card-header div button {
        flex: 1;
    }

    /* 移动端搜索框样式 */
    .file-search-wrapper {
        min-width: 100%;
        max-width: 100%;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .file-search-wrapper .input-group {
        width: 100%;
    }

    #fileListContainer .card-header .d-flex.flex-wrap {
        gap: 0.5rem;
    }

    .truncate-text {
        max-width: 200px;
    }
    
    .link-container {
        max-width: 150px;
    }

    .table th, .table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .fileList-table th:nth-child(3), 
    .fileList-table td:nth-child(3),
    .fileList-table th:nth-child(4), 
    .fileList-table td:nth-child(4) {
        width: auto;
    }

    .parseResult-table th:nth-child(2), 
    .parseResult-table td:nth-child(2),
    .parseResult-table th:nth-child(3), 
    .parseResult-table td:nth-child(3) {
        display: none;
    }
    
    .parseResult-table th:nth-child(1),
    .parseResult-table td:nth-child(1) {
        width: 100%;
    }
    
    /* 文件列表表格在移动端的特殊处理 */
    .fileList-table th:nth-child(2),
    .fileList-table th:nth-child(3),
    .fileList-table th:nth-child(4),
    .fileList-table td:nth-child(2),
    .fileList-table td:nth-child(3),
    .fileList-table td:nth-child(4) {
        display: none;
    }
    
    .fileList-table th:nth-child(1),
    .fileList-table td:nth-child(1) {
        width: 100%;
    }

    /* 移动端UA按钮样式优化 */
    .copy-ua-btn {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
        margin-top: 0.25rem;
    }
}

/* 平板设备优化 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    .col-lg-10 {
        max-width: 100%;
    }
    
    .fileList-table th:nth-child(1), 
    .fileList-table td:nth-child(1) {
        width: 8%;
    }
    
    .fileList-table th:nth-child(2), 
    .fileList-table td:nth-child(2) {
        width: 57%;
    }
}

/* 打印样式，隐藏不必要的元素 */
@media print {
    .btn, 
    button,
    .card-header div {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
}

/* 文件夹样式 */
.folder-row {
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.folder-row:hover {
    background-color: #e9f0f8 !important;
}

.folder-row td {
    padding: 12px 8px;
}

.folder-link {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
}

.folder-link:hover {
    text-decoration: underline;
    color: #3367d6;
}

/* 修改文件项的样式 */
.file-item-name {
    position: relative;
    display: flex;
    align-items: center;
}

.file-tooltip {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    z-index: 1000;
    max-width: 350px;
    word-wrap: break-word;
    white-space: normal;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 下载模式切换样式 */
.download-mode-switch {
    margin: 0 auto 1.5rem;
    text-align: center;
}

.download-mode-switch .btn-group {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.download-mode-switch .btn {
    padding: 0.4rem 1rem;
    font-weight: 500;
}

.download-icon {
    margin-right: 0.25rem;
    font-style: normal;
}

/* Aria2 面板样式 */
#aria2Panel .nav-tabs {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0 0.5rem;
}

#aria2Panel .nav-link {
    padding: 0.75rem 1rem;
    color: #495057;
    font-weight: 500;
}

#aria2Panel .nav-link.active {
    color: #4285f4;
    background-color: transparent;
    border-color: #dee2e6 #dee2e6 #fff;
}

#aria2Panel .tab-content {
    background-color: #fff;
}

/* 任务类型切换按钮样式 */
.task-type-switch .btn-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.task-type-switch .btn {
    border-radius: 0;
    padding: 0.7rem 1rem;
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
    border-right-width: 0;
    border-color: #e9ecef;
    font-weight: 500;
}

.task-type-switch .btn:last-child {
    border-right-width: 1px;
}

.task-type-switch .btn.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(66, 133, 244, 0.2);
}

.task-type-switch .badge {
    background-color: rgba(0, 0, 0, 0.1);
    color: inherit;
    transition: all 0.2s ease;
    margin-left: 7px;
    font-weight: 500;
    padding: 0.35em 0.6em;
    font-size: 0.8em;
    border-radius: 12px;
}

.task-type-switch .btn.active .badge {
    background-color: rgba(255, 255, 255, 0.25);
}

/* 添加可点击样式 */
.cursor-pointer {
    cursor: pointer;
}

.cursor-pointer:hover {
    transform: scale(1.1);
    background-color: rgba(220, 53, 69, 0.2) !important;
}

.task-type-switch .btn.active .cursor-pointer:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* 任务列表容器样式 */
.task-list-container {
    background-color: #fff;
    border-radius: 12px;
    overflow: auto; /* 修改为auto，允许内容滚动 */
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    height: 300px; /* 固定高度 */
    position: relative;
}

/* 表格容器 */
.task-table-container {
    flex: 1;
    overflow: auto;
    max-height: 300px;
    position: relative;
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* 修复Safari下的边框溢出 */
    border-radius: 12px;
}

.task-table-container .table {
    width: 100%;
    margin-bottom: 0;
}

.task-table-container .table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8f9fa;
}

.task-table-container .table thead th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background-color: #f8f9fa;
}

.task-table-container .table td {
    vertical-align: middle;
    padding: 0.9rem 0.75rem;
    border-top: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.task-table-container .table tr:last-child td {
    border-bottom: none;
}

.task-table-container .table tr:hover td {
    background-color: #f5f9ff;
}

/* Aria2 状态统计样式 */
.aria2-global-stats {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.5rem;
    background-color: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
}

/* 任务项样式 */
.task-name-container {
    display: flex;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
}

.task-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 2rem);
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.task-name-container:hover .task-name {
    color: #4285f4;
}

.file-icon {
    font-size: 1.25rem;
    margin-right: 0.6rem;
    opacity: 0.85;
    transition: all 0.2s ease;
}

.task-name-container:hover .file-icon {
    opacity: 1;
}

.task-actions {
    white-space: nowrap;
}

.task-actions .btn {
    padding: 0.25rem 0.5rem;
    margin-right: 0.25rem;
    font-size: 0.75rem;
}

.task-actions .btn:last-child {
    margin-right: 0;
}

/* 日志列表样式 */
.logs-container {
    max-height: 400px;
    overflow-y: auto;
}

#aria2LogsList .list-group-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .stat-item {
        padding: 0.25rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    #aria2Panel .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* 添加更多Aria2面板样式 */

/* 进度条样式优化 */
.progress {
    height: 0.5rem;
    border-radius: 1rem;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 1rem;
    background-color: #4285f4;
    transition: width 0.2s ease;
}

/* 任务状态样式 */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
}

.status-waiting {
    background-color: #f8d7da;
    color: #721c24;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-complete {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-paused {
    background-color: #fff3cd;
    color: #856404;
}

/* 日志项样式增强 */
#aria2LogsList .list-group-item h6 {
    font-size: 0.9rem;
    font-weight: 600;
}

#aria2LogsList .list-group-item p {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

#aria2LogsList .list-group-item small {
    font-size: 0.75rem;
}

/* 下载速度和状态信息的样式 */
.download-speed {
    font-size: 0.75rem;
    color: #0d6efd;
    font-weight: 500;
}

/* 上传速度样式 */
.upload-speed {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 500;
}

/* Aria2面板中的按钮样式 */
#aria2Panel .btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

#aria2Panel .btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#aria2Panel .btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.2);
}

/* 确保表格内容换行适当 */
#aria2Panel .table td {
    vertical-align: middle;
    word-break: break-word;
}

/* 确保面板内容区域有适当的高度 */
#aria2Panel .tab-content {
    min-height: 300px;
}

/* 等待解析任务区域样式 */
#pendingParseTasksContainer {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px dashed #dee2e6;
}

#pendingParseTasksContainer h6 {
    color: #495057;
    font-weight: 600;
    margin-top: 0;
}

#pendingParseTasksContainer .table {
    margin-bottom: 0;
}

#pendingParseTasksContainer .table td {
    padding: 0.5rem;
}

.pending-task-info {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
}

.pending-task-info .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* UA复制按钮样式 */
.copy-ua-btn {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
}

.copy-ua-btn:hover {
    background-color: #6c757d;
    color: white;
    transform: scale(1.05);
}

/* 文件搜索框样式 */
.file-search-wrapper {
    min-width: 320px;
    max-width: 400px;
}

.file-search-wrapper .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.file-search-wrapper .input-group:focus-within {
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
    transform: translateY(-1px);
}

.file-search-wrapper .input-group-text {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.file-search-wrapper .form-control {
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.file-search-wrapper .form-control:focus {
    box-shadow: none;
    border-color: #4285f4;
}

.file-search-wrapper .input-group-text.border-end-0 {
    border-right: none;
}

.file-search-wrapper .form-control.border-start-0 {
    border-left: none;
}

.file-search-wrapper #clearSearchBtn {
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.file-search-wrapper #clearSearchBtn:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

#searchResultInfo {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* 移动端和桌面端布局控制 */
.mobile-result-layout,
.mobile-file-layout,
.mobile-folder-layout {
    display: none;
}

.desktop-result-layout,
.desktop-file-layout,
.desktop-folder-layout {
    display: block;
}

/* 移动端解析结果布局 */
.filename-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filename-text {
    margin-left: 0.5rem;
    word-break: break-all;
    line-height: 1.3;
    color: #333;
}

.buttons-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* 移动端小按钮样式 */
.btn-xs {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    line-height: 1.2;
    white-space: nowrap;
}

.copy-ua-btn-mobile,
.copy-link-mobile,
.retry-parse-mobile,
.parse-single-mobile {
    transition: all 0.2s ease;
}

.copy-ua-btn-mobile:hover,
.copy-link-mobile:hover,
.retry-parse-mobile:hover,
.parse-single-mobile:hover {
    transform: scale(1.05);
}

/* 移动端文件列表布局 */
.file-info-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
    font-weight: 500;
}



.file-name-mobile {
    margin-left: 0.4rem;
    word-break: break-all;
    line-height: 1.3;
    color: #333;
    font-size: 0.9rem;
}

.file-details-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 1.4rem;
}

.file-size-mobile {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
}

/* 移动端文件夹布局 */
.folder-info-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.folder-link-mobile {
    margin-left: 0.5rem;
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    word-break: break-all;
}

.folder-link-mobile:hover {
    text-decoration: underline;
    color: #3367d6;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    table-layout: fixed; /* 固定表格布局 */
}

.table th, .table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* 优化表格单元格宽度比例 */
.fileList-table th:nth-child(1), .fileList-table td:nth-child(1) {
    width: 5%;
}
.fileList-table th:nth-child(2), .fileList-table td:nth-child(2) {
    width: 65%;
}
.fileList-table th:nth-child(3), .fileList-table td:nth-child(3) {
    width: 15%;
}
.fileList-table th:nth-child(4), .fileList-table td:nth-child(4) {
    width: 15%;
}

/* 解析结果表格列宽设置 */
.parseResult-table th:nth-child(1), .parseResult-table td:nth-child(1) {
    width: 55%;
}
.parseResult-table th:nth-child(2), .parseResult-table td:nth-child(2) {
    width: 25%;
}
.parseResult-table th:nth-child(3), .parseResult-table td:nth-child(3) {
    width: 20%;
}

/* Aria2状态图标行样式 */
.aria2-stats-row {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 20px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.aria2-stats-row:hover {
    background-color: #edf2f7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.aria2-stat-item {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.aria2-stat-item i {
    margin-right: 0.35rem;
    font-size: 0.9rem;
}

.aria2-stat-item:not(:last-child) {
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    margin-right: 0.5rem;
    padding-right: 0.5rem;
}

.aria2-connection-status {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
}

.aria2-connection-status .badge {
    font-size: 0.75rem;
    font-weight: normal;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.aria2-connection-status .badge:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 移动设备上的响应式调整 */
@media (max-width: 767.98px) {
    /* Aria2面板的卡片头部特殊处理 */
    #aria2Panel .card-header {
        flex-direction: column;
        align-items: center !important;
        padding: 1rem 0.5rem 0.5rem;
    }
    
    /* 统计行样式调整 */
    .aria2-stats-row {
        margin: 0.6rem 0 0.3rem;
        width: 90%;
        justify-content: center;
        padding: 0.5rem;
        flex-direction: row; /* 确保在手机端也是横向排列 */
        overflow-x: auto; /* 防止内容溢出 */
        min-height: 40px; /* 确保有足够的高度 */
    }
    
    .aria2-stat-item {
        padding: 0 0.4rem;
        font-size: 0.8rem;
        text-align: center; /* 文本居中 */
        display: flex;
        align-items: center;
        justify-content: center; /* 内容居中 */
        min-width: 60px; /* 确保每个项目有足够的宽度 */
        flex: 1; /* 平均分配空间 */
    }
    
    .aria2-stat-item i {
        font-size: 0.85rem;
        margin-right: 0.25rem;
    }
    
    .aria2-stat-item:not(:last-child) {
        border-right: 1px solid rgba(0, 0, 0, 0.1); /* 恢复分隔线 */
        margin-right: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* 调整连接状态的样式 */
    .aria2-connection-status {
        display: flex;
        align-items: center;
        margin-left: 0.3rem;
    }
    
    /* 确保在小屏幕上下载速度能完整显示 */
    #downloadSpeed {
        min-width: 45px;
        display: inline-block;
    }
}

/* 空状态样式 */
.text-center.py-3 {
    padding: 1.5rem 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.text-center.py-3 p {
    margin-bottom: 0;
    color: #6c757d;
}

/* 移动设备优化 */
@media (max-width: 767.98px) {
    .task-type-switch .btn {
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .task-list-container .table td {
        padding: 0.6rem 0.4rem;
    }
    
    .task-actions .btn {
        padding: 0.2rem 0.35rem;
        font-size: 0.7rem;
    }
    
    .status-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

/* 空任务显示样式 */
.empty-task-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    z-index: 5;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
}

.empty-task-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #adb5bd;
    opacity: 0.7;
    transition: all 0.3s ease;
    line-height: 1;
}

.empty-task-container:hover .empty-task-icon {
    transform: scale(1.1);
    opacity: 0.9;
}

.empty-task-container p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
    line-height: 1.5;
}

/* 保持表头和表体一致性 */
/* 这里删除重复的task-table-container定义，使用上面已有的定义 */

.task-table-container .table thead {
    background-color: #f8f9fa;
}

/* 优化文件选择样式 */
.file-row {
    transition: all 0.2s ease;
    user-select: none;
}

.file-row.active, .file-row:active {
    background-color: #e6f2ff !important;
}

.file-row.selected {
    background-color: #e1f5fe !important;
    border-left: 3px solid #4285f4;
}

/* 抖动动画效果 */
.file-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
}

.file-row:hover .file-checkbox {
    opacity: 1;
}

.file-row td {
    vertical-align: middle;
}

/* 移除右键菜单样式 */
.context-menu,
.context-menu-item,
.context-menu::after {
    display: none;
}

/* Checkbox样式优化 */
input[type="checkbox"] {
    position: relative;
    cursor: pointer;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    outline: none;
    transition: all 0.2s ease;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background-color: #4285f4;
    border-color: #4285f4;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: #4285f4;
}

/* 文件选择提示样式 */
.file-selection-tips {
    border-left: 4px solid #4285f4;
    background-color: #f8f9fa !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.file-selection-tips ul {
    padding-left: 1.2rem;
}

.file-selection-tips kbd {
    background-color: #4285f4;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8em;
    box-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* 隐藏提示区域在手机端 */
@media (max-width: 767.98px) {
    .file-selection-tips .row {
        flex-direction: column;
    }
    
    .file-selection-tips .col-md-6:last-child {
        margin-top: 10px;
    }
}

/* 隐藏提示区域的按钮 */
.toggle-tips-btn {
    cursor: pointer;
    font-size: 0.9em;
    color: #4285f4;
    text-decoration: underline;
    margin-top: 5px;
    display: inline-block;
}

/* 移动端解析结果优化样式 */
@media (max-width: 767.98px) {
    /* 移动端布局切换 */
    .mobile-result-layout,
    .mobile-file-layout,
    .mobile-folder-layout {
        display: block !important;
    }
    
    .desktop-result-layout,
    .desktop-file-layout,
    .desktop-folder-layout {
        display: none !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* 移动端表格样式调整 */
    .parse-result-cell,
    .file-list-cell,
    .folder-list-cell {
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    /* 移动端文件名样式优化 */
    .filename-row .file-icon,
    .file-info-row .file-icon,
    .folder-info-row .file-icon {
        font-size: 1.1rem;
        min-width: 20px;
    }
    
    /* 移动端选中状态优化 */
    .mobile-file-layout {
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    /* 在移动端禁用桌面端的选中样式 */
    .file-row.selected {
        background-color: transparent !important;
        border-left: none !important;
    }
    
    .file-row.selected .mobile-file-layout {
        background-color: #e1f5fe;
        border: 2px solid #4285f4;
        padding: 0.3rem;
        margin: 0.1rem 0;
    }
    
    .file-row.selected .file-name-mobile {
        color: #1976d2;
        font-weight: 600;
    }
    
    .filename-text {
        font-size: 0.9rem;
        margin-left: 0.4rem;
        word-break: break-all;
    }
    
    /* 移动端按钮行样式 */
    .buttons-row {
        margin-top: 0.4rem;
        padding-left: 1.5rem;
        gap: 0.3rem;
        align-items: center;
    }
    
    .status-text {
        font-size: 0.75rem;
        margin-right: 0.3rem;
        padding: 0.1rem 0.3rem;
    }
    
    .btn-xs {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
        min-height: 24px;
        border-width: 1px;
    }
    

} 