/* upload.css */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #e1e4e8;
    --header-height: 60px;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-image: url('../images/background3.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 统一 Header 样式 (保持不变) */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo img {
    height: 30px;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: opacity 0.3s;
    cursor: pointer;
}

nav a:hover {
    opacity: 0.8;
}

/* 主上传区域容器 (保持不变) */
.upload-main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

/* 【核心修改】上传卡片样式 - 提高不透明度 */
.upload-card {
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    border-radius: 16px;
    /* 提高不透明度到 0.95，几乎不透明，保证文字清晰 */
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    /* 增强模糊效果 */
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}

h2 {
    margin-top: 0;
    /* 使用深色文字 */
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

/* 【核心修改】拖拽上传区域样式 - 优化对比度 */
.upload-area {
    border: 2px dashed #cbd5e0;
    /* 使用浅灰色虚线，更清晰 */
    border-radius: 12px;
    padding: 3rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* 增加白色背景比例，确保图标和文字可见 */
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: rgba(240, 247, 255, 0.8);
    /* 浅蓝色背景 */
    transform: scale(1.02);
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 56px;
    /* 使用深灰色图标，确保在浅色背景上可见 */
    color: #718096;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.upload-area:hover .upload-icon {
    color: var(--primary-color);
}

.upload-text {
    /* 使用深灰色文字 */
    color: #4a5568;
    font-size: 1rem;
}

.file-name {
    margin-top: 15px;
    font-weight: 500;
    color: var(--primary-color);
    word-break: break-all;
    display: none;
}

/* 元数据输入框 */
.meta-inputs {
    margin-top: 25px;
    text-align: left;
}

.meta-label {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 8px;
    /* 使用深色标签 */
    color: #4a5568;
    font-weight: 500;
}

.meta-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    /* 纯白背景，确保输入文字清晰 */
    background-color: #ffffff;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.meta-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 按钮样式 */
.btn-upload {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 30px;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.btn-upload:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-upload:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    background-color: #eee;
    border-radius: 8px;
    margin-top: 25px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color), #6dd5ed);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 8px;
    display: block;
}

/* 结果展示区域 */
#result {
    margin-top: 30px;
    text-align: left;
}

.result-box {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
}

.result-box img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 15px auto;
}

.result-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    word-break: break-all;
}

.result-link:hover {
    text-decoration: underline;
}

.status-success {
    color: #27ae60;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.status-error {
    color: #e74c3c;
    font-weight: bold;
}

/* 自定义弹窗样式 */
.custom-modal-overlay {
    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: 9999;
}

.custom-modal {
    background: white;
    padding: 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #333;
}

.modal-countdown {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-modal {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}