/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 粒子背景画布 */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.upload-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.upload-description {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.upload-description p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    line-height: 1.5;
}

.upload-description p:last-child {
    margin-bottom: 0;
    font-weight: bold;
    color: rgba(0, 245, 255, 0.9);
}

/* 主上传区域 */
.upload-area {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, #00f5ff, transparent);
    animation: rotate 10s linear infinite;
    opacity: 0.1;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* 上传区域 */
.upload-zone {
    text-align: center;
    position: relative;
    padding: 60px 40px;
    border: 2px dashed rgba(0, 245, 255, 0.5);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.zone-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, #1e3a8a, #3b82f6, #06b6d4);
    border-radius: 15px;
    opacity: 0;
    z-index: -1;
    transition: all 0.4s ease;
}

.upload-zone:hover .zone-glow {
    opacity: 0.6;
    filter: blur(10px);
}

.upload-zone {
    text-align: center;
    position: relative;
    padding: 60px 40px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    background: rgba(30, 41, 59, 0.3);
}

.upload-zone:hover {
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
    background: rgba(30, 41, 59, 0.4);
}

.upload-zone h2 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.upload-zone:hover h2 {
    color: #3b82f6;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.upload-zone p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.upload-zone:hover p {
    color: rgba(255, 255, 255, 0.8);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #00f5ff;
    animation: float 3s ease-in-out infinite;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px currentColor);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-zone h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.upload-zone p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.select-btn {
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    border: none;
    padding: 14px 32px;
    border-radius: 28px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.select-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.select-btn:hover::before {
    left: 100%;
}

.select-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    background: linear-gradient(45deg, #1d4ed8, #3b82f6);
}

/* 文件列表 */
.file-list {
    margin-top: 30px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 3px solid #00f5ff;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 进度弹窗 */
.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    border: 1px solid rgba(0, 245, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s;
}

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

/* 能量环特效 */
.energy-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 2px solid transparent;
    border-top: 2px solid #00f5ff;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.ring-2 {
    width: 350px;
    height: 350px;
    border-top: 2px solid #ff00aa;
    animation: spin 3s linear infinite reverse;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.modal-content h3 {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    font-size: 24px;
    text-shadow: 0 0 15px rgba(0, 245, 255, 0.5);
}

/* 文件进度项 */
.file-progress-item {
    animation: fadeInUp 0.5s ease;
}

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

.file-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.file-icon {
    width: 40px;
    height: 40px;
    color: #00f5ff;
    margin-right: 15px;
}

.file-icon svg {
    width: 100%;
    height: 100%;
}

.file-details {
    flex: 1;
}

.file-name {
    display: block;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
}

.file-size {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 进度条 */
.progress-container {
    margin-bottom: 20px;
}

.progress-bar-bg {
    position: relative;
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f5ff, #0080ff);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, #00f5ff, #0080ff);
    border-radius: 10px;
    opacity: 0.5;
    filter: blur(5px);
    z-index: -1;
    transition: left 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

#progressPercent {
    color: #00f5ff;
    font-weight: bold;
}

/* 控制按钮 */
.progress-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.control-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.pause-btn {
    background: linear-gradient(45deg, #ffaa00, #ff6600);
    color: white;
}

.cancel-btn {
    background: linear-gradient(45deg, #ff4444, #cc0000);
    color: white;
}

.control-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 错误消息 */
.error-message {
    display: none;
    text-align: center;
    padding: 20px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 10px;
    margin-top: 20px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.error-text h4 {
    color: #ff4444;
    margin-bottom: 10px;
}

.error-text p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.retry-btn {
    background: linear-gradient(45deg, #00ff88, #00cc66);
    border: none;
    padding: 10px 25px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

/* 上传完成提醒 */
.upload-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 255, 136, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid #00f5ff;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.upload-success.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.upload-success .success-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: success-pulse 1s ease-in-out;
}

.upload-success h3 {
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.upload-success p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

@keyframes success-pulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .upload-area {
        padding: 20px;
        margin: 10px;
    }
    
    .upload-zone {
        padding: 40px 20px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
    
    .upload-success {
        padding: 20px;
        margin: 10px;
    }
}
