/* 本地CSS文件 - style.css */
/* 1. 基础重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

html, body {
    height: 100%;
    /* 替换为柔和的浅色系背景，更清爽 */
    background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0;
}

/* 2. 容器样式 - 加宽PC端宽度 */
.container {
    width: 100%;
    /* PC端最大宽度从800px改为1200px，更宽更舒展 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3. 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: #333; /* 改为深色，适配浅背景 */
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #2d3748;
}

.header p {
    font-size: 1.1rem;
    color: #718096;
}

/* 4. 主卡片样式 */
.upload-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    padding: 50px;
    margin-bottom: 30px;
}

/* 5. 上传区域样式 */
.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 15px;
    padding: 70px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    margin-bottom: 30px;
}

.upload-area:hover, .upload-area.dragover {
    border-color: #4299e1;
    background: #f0f8fb;
}

.upload-icon {
    font-size: 5.5rem;
    color: #4299e1;
    margin-bottom: 20px;
}

.upload-text {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 500;
}

.upload-hint {
    font-size: 1rem;
    color: #718096;
}

.file-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.file-type {
    background: #e8f4f8;
    color: #4299e1;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 6. 预览区域样式 */
.preview-container {
    display: none;
    margin-bottom: 30px;
}

.preview-card {
    display: flex;
    align-items: center;
    gap: 25px;
    background: #f8fafc;
    border-radius: 15px;
    padding: 25px;
}

.preview-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.preview-info {
    flex: 1;
}

.preview-name {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 500;
}

.preview-size {
    font-size: 1rem;
    color: #718096;
}

/* 7. 按钮区域样式 */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn {
    padding: 14px 35px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.btn-primary {
    background: #4299e1;
    color: #fff;
}

.btn-primary:hover {
    background: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(66, 153, 225, 0.25);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.btn:disabled {
    background: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 8. 进度条样式 */
.progress-bar {
    display: none;
    height: 10px;
    background: #f7fafc;
    border-radius: 5px;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.progress-fill {
    height: 100%;
    background: #4299e1;
    width: 0%;
    transition: width 0.3s ease;
}

/* 9. 结果区域样式 */
.result-container {
    display: none;
    margin-top: 20px;
}

.result-card {
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
}

.result-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.result-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.result-icon {
    font-size: 1.8rem;
}

.result-success .result-icon {
    color: #10b981;
}

.result-error .result-icon {
    color: #ef4444;
}

.result-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.result-success .result-title {
    color: #059669;
}

.result-error .result-title {
    color: #dc2626;
}

.result-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 10px;
}

.result-url {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.result-url input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: #2d3748;
    background: #f8fafc;
}

.result-url button {
    padding: 14px 25px;
    background: #4299e1;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.result-url button:hover {
    background: #3182ce;
}

/* 10. 友情链接和服务支持样式 */
.link-card, .service-card, .footer {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    padding: 40px;
    margin-bottom: 25px;
}

.card-title {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.card-title i {
    color: #4299e1;
    font-size: 1.4rem;
}

/* 重构友情链接样式 - 更美观紧凑 */
.friend-links-wrapper {
    overflow-x: auto;
    padding-bottom: 15px;
}

.friend-links {
    display: flex;
    gap: 20px;
    width: max-content;
}

.friend-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    padding: 25px 15px;
    border-radius: 15px;
    background: #f8fafc;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.friend-link:hover {
    background: #f0f8fb;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(66, 153, 225, 0.1);
}

.friend-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-size: 1.05rem;
    color: #2d3748;
    margin-bottom: 5px;
    font-weight: 500;
}

.friend-desc {
    font-size: 0.9rem;
    color: #718096;
}

.service-info {
    text-align: center;
}

.service-info p {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.service-info a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 500;
}

.service-info a:hover {
    text-decoration: underline;
}

/* 11. 页脚样式 */
.footer {
    text-align: center;
    color: #718096;
    font-size: 1rem;
}

/* 12. 加载动画 */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

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

/* 13. 响应式适配 */
@media (max-width: 768px) {
    .upload-card {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 4.5rem;
    }
    
    .preview-card {
        flex-direction: column;
        text-align: center;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .friend-links {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    
    .friend-link {
        width: 140px;
        padding: 20px 10px;
    }
    
    .link-card, .service-card {
        padding: 30px 20px;
    }
}

/* 隐藏文件输入框 */
.file-input {
    display: none;
}

/* 隐藏滚动条（友情链接区域） */
.friend-links-wrapper::-webkit-scrollbar {
    height: 6px;
}

.friend-links-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.friend-links-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.friend-links-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}