/* ===========================================
   基础样式
   =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    padding: 40px;
}

/* ===========================================
   头部样式
   =========================================== */

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.header p {
    color: #666;
    font-size: 14px;
}

/* ===========================================
   表单样式
   =========================================== */

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===========================================
   按钮样式
   =========================================== */

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* ===========================================
   消息提示样式
   =========================================== */

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.info-message {
    background: #e3f2fd;
    color: #1976d2;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* ===========================================
   加载动画样式
   =========================================== */

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* ===========================================
   页脚样式
   =========================================== */

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #999;
    font-size: 12px;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===========================================
   文件上传样式
   =========================================== */

.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-item .file-name {
    flex: 1;
    margin-left: 10px;
    font-size: 14px;
    color: #333;
}

.file-item .file-size {
    margin-left: 10px;
    font-size: 12px;
    color: #999;
}

.file-item .remove-file {
    background: none;
    border: none;
    color: #c33;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

/* ===========================================
   进度条样式
   =========================================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

/* ===========================================
   下载页面样式
   =========================================== */

.download-info {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.download-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.download-info-item:last-child {
    border-bottom: none;
}

.download-info-item .label {
    color: #666;
    font-size: 14px;
}

.download-info-item .value {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

/* ===========================================
   复选框样式
   =========================================== */

.checkbox-group {
    margin-top: 30px;
    margin-left: 5px;
}

.checkbox-label {
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin-right: 2px;
    cursor: pointer;
    accent-color: #667eea;
    vertical-align: middle;
}

.checkbox-text {
    color: #666;
    font-size: 13px;
}

.disclaimer-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.disclaimer-link:hover {
    text-decoration: underline;
}

/* ===========================================
   模态框样式
   =========================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
    flex: 1;
}

.modal-body h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
}

.modal-body p {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.content-html {
    line-height: 1.6;
    color: #333;
}

.content-html h1,
.content-html h2,
.content-html h3,
.content-html h4,
.content-html h5,
.content-html h6 {
    color: #333;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

.content-html h1 {
    font-size: 20px;
}

.content-html h2 {
    font-size: 18px;
}

.content-html h3 {
    font-size: 16px;
}

.content-html h4 {
    font-size: 15px;
}

.content-html h5 {
    font-size: 14px;
}

.content-html h6 {
    font-size: 14px;
}

.content-html p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
}

.content-html ul,
.content-html ol {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 20px;
}

.content-html li {
    margin-bottom: 6px;
}

.content-html strong,
.content-html b {
    color: #333;
    font-weight: 600;
}

.content-html em,
.content-html i {
    font-style: italic;
}

.content-html a {
    color: #667eea;
    text-decoration: none;
}

.content-html a:hover {
    text-decoration: underline;
}

.content-html code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

.content-html pre {
    background: #f5f5f5;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 12px;
}

.content-html pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: #333;
}

.content-html blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    margin: 12px 0;
    color: #666;
    font-style: italic;
}

.content-html hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 20px 0;
}

.content-html table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 14px;
}

.content-html th,
.content-html td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: left;
}

.content-html th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.content-html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-footer .btn {
    width: auto;
    padding: 10px 24px;
}

.modal-footer .btn-primary {
    background: #667eea;
    color: white;
}

.modal-footer .btn-primary:hover {
    background: #5568d3;
}

.modal-footer .btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.modal-footer .btn-secondary:hover {
    background: #e0e0e0;
}

/* ===========================================
   响应式设计
   =========================================== */

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 20px;
    }
}
