/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 主内容区域 */
main {
    padding: 30px;
}

/* 上传区域 */
.upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .upload-section {
        grid-template-columns: 1fr;
    }
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.upload-area:hover {
    background: #eef1ff;
    border-color: #764ba2;
}

.upload-area i {
    font-size: 4rem;
    color: #667eea;
}

.btn-select i {
    font-size: 1rem;
    color: #ffffff;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.upload-area p {
    color: #666;
    margin-bottom: 5px;
}

.upload-area .file-types {
    color: #667eea;
    font-weight: bold;
    margin: 15px 0;
}

.upload-area input[type="file"] {
    display: none;
}

.btn-select {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.btn-select:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 已选择文件区域 */
.selected-files {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 25px;
    background: #f9f9f9;
}

.selected-files h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.empty-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    color: #667eea;
    font-size: 1.2rem;
}

.file-name {
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.file-remove {
    color: #ff6b6b;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-remove:hover {
    background: #ffeaea;
}

.file-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-clear, .btn-upload {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-clear {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #ddd;
}

.btn-clear:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.btn-upload {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.btn-upload:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.btn-upload:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 设置区域 */
.settings-section {
    background: #f8f9ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #e0e7ff;
}

.settings-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.setting-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #555;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.setting-value {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
}

.password-info {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.password-info i {
    color: #4CAF50;
}

.password-info code {
    background: #f1f1f1;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    color: #d32f2f;
    /* 添加模糊化效果 */
    color: transparent;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    letter-spacing: 3px;
    user-select: none;
}

/* 进度区域 */
.progress-section {
    background: #fff8e1;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #ffecb3;
}

.progress-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-container {
    position: relative;
    margin-bottom: 20px;
}

.progress-bar {
    height: 25px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 12px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
}

.progress-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.progress-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
}

.progress-item span:first-child {
    color: #666;
}

.progress-item span:last-child {
    font-weight: bold;
    color: #333;
}

/* 结果区域 */
.results-section {
    background: #e8f5e9;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #c8e6c9;
}

.results-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.results-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #555;
}

.results-info p:last-child {
    margin-bottom: 0;
}

.results-info i {
    color: #667eea;
}

.download-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-download-all, .btn-cleanup {
    flex: 1;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-download-all {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.btn-download-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

.btn-cleanup {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #ddd;
}

.btn-cleanup:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.results-list {
    background: white;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.result-icon {
    color: #4CAF50;
    font-size: 1.5rem;
}

.result-details {
    flex: 1;
}

.result-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.result-meta {
    display: flex;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.btn-download, .btn-preview {
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
}

.btn-download {
    background: #2196F3;
    color: white;
}

.btn-download:hover {
    background: #1976D2;
}

.btn-preview {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-preview:hover {
    background: #e9ecef;
}

/* 页脚样式 */
footer {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e0e0e0;
}

.footer-info {
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 10px;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-info p:last-child {
    margin-bottom: 0;
}

.footer-info i {
    color: #667eea;
    margin-top: 3px;
}

.copyright {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        border-radius: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-details {
        grid-template-columns: 1fr;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .file-actions {
        flex-direction: column;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .result-actions {
        align-self: flex-end;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* 加载动画 */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
