/* 加密打包页面样式 */
.encrypt-container {
    max-width: 900px;
    margin: 0 auto;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step.active .step-number,
.step.completed .step-number {
    background: var(--primary-color);
    color: white;
}

.step-label {
    font-size: 13px;
    color: var(--text-muted);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 500;
}

.step.completed .step-label {
    color: var(--success-color);
}

.step-line {
    width: 80px;
    height: 2px;
    background: var(--border-color);
    margin: 0 16px;
}

.step-content {
    animation: fadeIn 0.3s ease;
}

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

.file-selection {
    display: grid;
    gap: 24px;
}

.selection-section {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.section-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.file-list {
    max-height: 200px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.2s;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--primary-light);
}

.file-item.selected {
    background: rgba(0, 101, 105, 0.05);
}

.file-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.file-item i {
    font-size: 20px;
    color: var(--primary-color);
}

.file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.file-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.selection-summary {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-top: 16px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-item i {
    color: var(--primary-color);
}

.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.encrypt-settings {
    max-width: 500px;
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.toggle-password:hover {
    color: var(--text-primary);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.path-input {
    display: flex;
    gap: 8px;
}

.path-input input {
    flex: 1;
}

.package-progress {
    text-align: center;
    padding: 24px;
}

.progress-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 24px;
    position: relative;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle .progress-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 8;
}

.progress-circle .progress-bar {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.progress-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.progress-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.progress-step i {
    color: var(--primary-color);
}

.progress-step.pending {
    color: var(--text-muted);
}

.progress-step.pending i {
    color: var(--text-muted);
}

.progress-step.completed {
    color: var(--success-color);
}

.progress-step.completed i {
    color: var(--success-color);
}

.progress-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item .label {
    font-size: 12px;
    color: var(--text-muted);
}

.info-item .value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.success-card {
    text-align: center;
    padding: 48px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.success-icon i {
    font-size: 80px;
    color: var(--success-color);
}

.success-card h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.result-info {
    max-width: 400px;
    margin: 0 auto 24px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-muted);
}

.info-row .value {
    color: var(--text-primary);
    font-weight: 500;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 文件上传相关样式 */
.file-actions {
    margin-left: 16px;
    display: flex;
    gap: 8px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-danger i {
    color: white;
}

.file-item {
    position: relative;
}

.upload-success {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.add-file-item {
    justify-content: center;
    border-bottom: none;
    padding: 16px;
}

.add-file-item button {
    width: 100%;
}

/* 查看按钮样式 */
.btn-info {
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-info i {
    color: white;
}

/* 任务详情弹窗样式 */
#taskDetailModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

#taskDetailModal.show {
    display: flex;
}

#taskDetailModal .modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 50vw;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.close-btn:hover {
    color: #f0f0f0;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 表单样式 */
.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-body .form-label.required::after {
    content: '*';
    color: #dc3545;
    margin-left: 4px;
}

.modal-body .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: border-color 0.2s ease;
}

.modal-body .form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25);
}

/* 通用弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal .modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 任务列表样式 */
.task-level-1 {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.task-item {
    border-bottom: 1px solid var(--border-light);
}

.task-item:last-child {
    border-bottom: none;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.task-header:hover {
    background-color: var(--bg-tertiary);
}

/* 一级任务样式 */
.task-level-1-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.task-level-1-header:hover {
    background-color: #0056b3;
}

.task-level-1-header .task-progress {
    color: rgba(255, 255, 255, 0.8);
}

.task-level-1-header .expand-btn {
    color: rgba(255, 255, 255, 0.8);
}

.task-level-1-header .expand-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* 二级任务样式 */
.task-level-2 {
    background-color: var(--bg-primary);
}

.task-level-2-header {
    background-color: #f8f9fa;
    padding-left: 40px;
    border-left: 4px solid var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

.task-level-2-header:hover {
    background-color: #e9ecef;
}

/* 任务进度 */
.task-progress {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 16px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.05);
}

.task-level-1-header .task-progress {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 展开/收起按钮 */
.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.expand-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* 三级任务样式 */
.task-level-3 {
    background-color: var(--bg-primary);
}

.task-detail {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background-color: #fafafa;
    border-left: 4px solid #e9ecef;
}

.task-detail + .task-detail {
    margin-top: 20px;
    border-top: 1px solid var(--border-light);
    border-left: 4px solid #dee2e6;
}

.detail-item {
    display: flex;
    margin-bottom: 14px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-item label {
    width: 140px;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.detail-item span {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

/* 任务标题容器 */
.task-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.task-title {
    font-weight: inherit;
    font-size: inherit;
}

.task-count {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.task-level-2-header .task-count {
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.05);
}

/* 任务序号 */
.task序号 {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

/* 任务项间距 */
.task-item {
    transition: all 0.3s ease;
}

.task-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 树形布局样式 */
.task-tree-layout {
    display: flex;
    height: 500px;
    gap: 0;
}

/* 左侧任务树面板 */
.task-tree-panel {
    width: 280px;
    border-right: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
    overflow-y: auto;
    padding: 16px;
}

/* 右侧内容面板 */
.task-content-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: var(--bg-primary);
}

/* 树形结构 */
.task-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tree-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.tree-node:hover {
    background-color: var(--bg-tertiary);
}

.tree-node.selected {
    background-color: var(--primary-color);
    color: white;
}

.tree-icon {
    width: 16px;
    text-align: center;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.level-1 > .tree-node > .tree-icon {
    transition: transform 0.2s ease;
}

.level-1.expanded > .tree-node > .tree-icon {
    transform: rotate(0deg);
}

.level-1.collapsed > .tree-node > .tree-icon {
    transform: rotate(-90deg);
}

.tree-text {
    flex: 1;
    font-size: 14px;
}

.level-1 > .tree-node > .tree-text {
    font-weight: 600;
}

.tree-children {
    list-style: none;
    padding-left: 20px;
    margin: 4px 0;
    display: block;
}

.level-1.collapsed > .tree-children {
    display: none;
}

.level-2 > .tree-node {
    font-size: 13px;
}

/* 内容区域 */
.task-content {
    display: block;
}

.task-content[style*="display: none"] {
    display: none;
}
