/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    background: #e3f2fd;
    min-height: 100vh;
}

/* ===== 背景图/背景色 ===== */
.page-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    background-attachment: fixed;
    padding: 30px 20px;
}
.page-bg.has-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ===== 容器 ===== */
.container {
    max-width: 720px;
    margin: 0 auto;
}

/* ===== Banner区域 ===== */
.banner {
    width: 100%;
    border-radius: 12px 12px 0 0;
    display: block;
}
.banner-title {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: #fff;
    border-radius: 12px 12px 0 0;
}
.banner-title h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}
.banner-title p {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== 表单卡片 ===== */
.form-card {
    background: #fff;
    border-radius: 0 0 12px 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

/* ===== 表单分组 ===== */
.form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e88e5;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #1e88e5;
    border-radius: 2px;
}

/* ===== 表单项 ===== */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 16px;
}
.form-group.full {
    flex: 0 0 100%;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
}
.form-group label .required {
    color: #f44336;
    margin-left: 2px;
}
.form-group .hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}
.form-group textarea {
    min-height: 100px;
    resize: vertical;
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #f44336;
}

/* ===== 单选/多选 ===== */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 8px 0;
}
.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 14px;
}
.radio-item:hover,
.checkbox-item:hover {
    border-color: #1e88e5;
    color: #1e88e5;
}
.radio-item input,
.checkbox-item input {
    cursor: pointer;
}
.radio-item.checked,
.checkbox-item.checked {
    background: #e3f2fd;
    border-color: #1e88e5;
    color: #1e88e5;
}

/* ===== 提交按钮 ===== */
.submit-row {
    text-align: center;
    margin-top: 30px;
}
.btn-submit {
    padding: 14px 60px;
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(30,136,229,0.3);
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30,136,229,0.4);
}
.btn-submit:active {
    transform: translateY(0);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show {
    display: flex;
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}
.modal-content {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.8;
}
.modal-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.modal-btn {
    padding: 10px 28px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}
.modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
}
.modal-btn.confirm {
    background: #1e88e5;
    color: #fff;
}
.modal-btn.success {
    background: #4caf50;
    color: #fff;
}

/* ===== 渠道标识 ===== */
.channel-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #fff3e0;
    color: #e65100;
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 16px;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .page-bg { padding: 15px 10px; }
    .form-card { padding: 20px 16px; }
    .banner-title { padding: 30px 16px; }
    .banner-title h1 { font-size: 22px; }
    .form-row { flex-direction: column; gap: 0; }
    .form-group { min-width: 100%; }
    .btn-submit { width: 100%; padding: 14px; }
    .radio-group,
    .checkbox-group { gap: 8px; }
    .radio-item,
    .checkbox-item { padding: 6px 10px; font-size: 13px; }
}

/* ===== 加载动画 ===== */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== 中英双语 ===== */
.en-text { display: none; }
html.lang-en .en-text { display: revert; }
html.lang-en .zh-text { display: none; }
html.lang-en .section-title .en-text { display: block; }

/* 语言切换按钮 */
.lang-toggle {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 300;
    background: rgba(255,255,255,0.92);
    color: #1A56DB;
    border: 1px solid rgba(26,86,219,0.35);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    backdrop-filter: blur(6px);
    transition: all 0.3s;
}
.lang-toggle:hover {
    background: #fff;
    transform: scale(1.05);
}
@media (max-width: 600px) {
    .lang-toggle {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
}
