﻿ 
:root {
    --primary: #239336;
    --primary-light: #2FB94D;
    --primary-dark: #1A7928;
    --accent: #FF8300;
    --accent-hover: #E57500;
    --bg-body: #f5f7f6;
    --bg-card: #ffffff;
    --bg-input: #f8faf9;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* 顶部导航 */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.logo-text span {
    color: var(--accent);
}

.header-help {
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* 主内容区 */
.main {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* 欢迎卡片 */
.welcome-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    color: white;
    box-shadow: var(--shadow-lg);
}

.welcome-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.welcome-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
}

.welcome-benefits {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

/* 表单卡片 */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--danger);
    margin-left: 4px;
}

.form-label .optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 12px;
    margin-left: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(35, 147, 54, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* 文件上传 */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-input);
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--primary-light);
    background: rgba(35, 147, 54, 0.05);
}

.file-upload-icon {
    font-size: 42px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.file-upload-hint {
    color: var(--text-muted);
    font-size: 12px;
}

.file-list {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.file-item:last-child {
    margin-bottom: 0;
}

.file-item-icon {
    font-size: 24px;
}

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-item-size {
    font-size: 12px;
    color: var(--text-muted);
}

.file-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.file-item-remove:hover {
    background: var(--danger);
    color: white;
}

/* 提交按钮 */
.submit-section {
    position: sticky;
    bottom: 0;
    background: var(--bg-body);
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    z-index: 99;
}

.submit-section-inner {
    max-width: 600px;
    margin: 0 auto;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(35, 147, 54, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(35, 147, 54, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
}

/* 成功提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 80%;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.toast-icon {
    font-size: 48px;
}

.toast-message {
    font-size: 16px;
    font-weight: 500;
}

.toast-submessage {
    font-size: 13px;
    opacity: 0.8;
    text-align: center;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--text-muted);
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
}

/* 地区选择器 */
.location-selector {
    display: flex;
    gap: 8px;
}

.location-select {
    flex: 1;
}

/* 图片预览 */
.image-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-input);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式优化 */
@media (max-width: 480px) {
    .header {
        padding: 12px 16px;
    }

    .logo-text {
        font-size: 14px;
    }

    .main {
        padding: 16px;
    }

    .welcome-card {
        padding: 20px;
    }

    .welcome-title {
        font-size: 18px;
    }

    .welcome-benefits {
        /* flex-direction: column; */
        gap: 8px;
    }

    .form-card {
        padding: 20px;
    }

    .form-input,
    .form-textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .file-upload {
        padding: 20px;
    }

    .submit-section {
        padding: 12px 16px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .welcome-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .form-card {
        padding: 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }
} 

/* 分类选择器布局样式，与现有表单风格保持一致 */
.category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.category-select {
    flex: 1;
    min-width: 120px;
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.2s;
    cursor: pointer;
}
.category-select:focus {
    outline: none;
    border-color: #ff8300;
    box-shadow: 0 0 0 3px rgba(255, 131, 0, 0.1);
}
.category-select:disabled {
    background-color: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}
.form-hint.category-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}
@media (max-width: 640px) {
    .category-select {
        min-width: 100px;
        padding: 10px 12px;
        font-size: 14px;
    }
}