:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --border-color: #ddd;
    --hover-color: #357abd;
    --image-color: #4a90e2;
    --video-color: #4CAF50;
    --pdf-color: #e74c3c;
    --ppt-color: #f39c12;
    --other-color: #95a5a6;
}

* {
    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: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    font-size: 24px;
    color: var(--text-color);
}

.batch-download-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.batch-download-btn:hover {
    background-color: var(--hover-color);
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-item {
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.item-index {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
    margin-right: 10px;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.file-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    color: white;
}

.file-type.image {
    background-color: var(--image-color);
}

.file-type.video {
    background-color: var(--video-color);
}

.file-type.pdf {
    background-color: var(--pdf-color);
}

.file-type.ppt {
    background-color: var(--ppt-color);
}

.file-type.other {
    background-color: var(--other-color);
}

.item-info h3 {
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.preview-btn {
    padding: 8px 16px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.preview-btn:hover {
    background-color: var(--border-color);
}

.preview-container {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 4px;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.download-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.download-btn:hover {
    background-color: var(--hover-color);
}

/* 下载进度提示样式 */
.download-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

.progress-header h3 {
    margin: 0;
    font-size: 16px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
    padding: 0 5px;
}

.close-btn:hover {
    color: var(--hover-color);
}

.progress-content {
    padding: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--secondary-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--text-color);
    text-align: center;
}

/* 移动端提示样式 */
.mobile-tip {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tip-content {
    font-size: 14px;
    line-height: 1.5;
}

.tip-content p {
    margin: 5px 0;
}

.tip-content p:first-child {
    font-weight: bold;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .download-list {
        grid-template-columns: 1fr;
    }

    .preview-container {
        height: 150px;
    }

    .download-progress {
        width: calc(100% - 40px);
        top: 10px;
        right: 20px;
    }

    .mobile-tip {
        margin: 10px 0;
        border-radius: 0;
    }
    
    .tip-content {
        font-size: 13px;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .item-info {
        width: 100%;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .preview-container {
        height: 200px;
    }
    
    .preview-btn, .download-btn {
        flex: 1;
        text-align: center;
    }
}

/* 确认对话框样式 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.dialog-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dialog-content h3 {
    margin: 0 0 15px 0;
    color: var(--text-color);
}

.dialog-content p {
    margin: 10px 0;
    color: var(--text-color);
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.confirm-btn, .skip-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.confirm-btn {
    background-color: var(--primary-color);
    color: white;
}

.confirm-btn:hover {
    background-color: var(--hover-color);
}

.skip-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.skip-btn:hover {
    background-color: #e0e0e0;
}

/* 响应式设计补充 */
@media (max-width: 768px) {
    .dialog-content {
        width: 95%;
        margin: 10px;
    }
    
    .dialog-buttons {
        flex-direction: column;
    }
    
    .confirm-btn, .skip-btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* 加载指示器样式 */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 3px solid var(--secondary-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-content p {
    margin: 0;
    color: var(--text-color);
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 密码输入弹窗样式 */
.password-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.password-dialog .dialog-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

.password-dialog h3 {
    margin: 0 0 20px;
    color: #333;
    text-align: center;
}

.password-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.password-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.password-input button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.password-input button:hover {
    background: #45a049;
}

.password-tip {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0;
} 