:root {
    --primary-color: #b32428;
    --primary-hover: #1b45d9;
    --bg-color: #f7f9fc;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --focus-ring: rgba(46, 92, 255, 0.2);
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* background-color: var(--bg-color); */
    background-image: url(images/bg.jpg);
    /* 核心：背景图铺满整个容器 */
    background-size: cover;
    /* 背景图不重复 */
    background-repeat: no-repeat;
    /* 背景图固定在屏幕中间（不会随滚动移动） */
    background-position: center center;
    /* 可选：背景图固定，不随页面滚动（视差效果） */
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    padding: 2rem 1rem;
}

.form-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.zcontent {
    margin-top: 50px;
}

.con {
    margin-bottom: 50px;
}

.con h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.con h1::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 40px;
    /* 横线长度 */
    height: 5px;
    /* 横线粗细 */
    background: #b32428;
    /* 横线颜色 */
}

.form-header {
    text-align: center;
    /* margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color); */
}

.form-header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.form-section h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    background-color: var(--primary-color);
    margin-right: 12px;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row {
    /* display: flex; */
    /* gap: 1.5rem; */
}

.half-width {
    flex: 1;
}

label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

label.required::after {
    content: " *";
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
    transition: all 0.2s ease-in-out;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.error-message {
    font-size: 0.85rem;
    color: var(--error-color);
    margin-top: 0.35rem;
    display: none;
    animation: slideDown 0.2s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.error .error-message {
    display: block;
}

.file-upload {
    border: 2px dashed var(--border-color);
    padding: 2.5rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-upload:hover,
.file-upload.dragover {
    border-color: var(--primary-color);
    background-color: rgba(46, 92, 255, 0.04);
}

.file-upload .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.image-preview {
    margin-bottom: 1rem;
    max-height: 150px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-preview img {
    height: 100%;
    max-height: 150px;
    object-fit: contain;
}

.file-upload.has-preview .upload-icon {
    display: none;
}

.file-upload.has-preview .upload-text {
    font-size: 0.9rem;
    color: var(--text-light);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.upload-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

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

.uploading-svg {
    animation: upload-spin 1s linear infinite !important;
    opacity: 0.5 !important;
}

.upload-hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

.file-name {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    max-width: 90%;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.4;
    background: rgba(179, 36, 40, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: none;
    pointer-events: auto;
}

.file-name.visible {
    display: inline-block;
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
}

.checkbox-item input[type="checkbox"] {
    /* margin-top: 0.25rem; */
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0;
    cursor: pointer;
}

.agreement-item {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: var(--border-radius);
    align-items: center;
}

.agreement-item input[type="checkbox"] {
    margin-top: 0;
}

.form-actions {
    margin-top: 2rem;
    text-align: center;
}

.submit-btn {
    background-color: #b32428;
    color: #fff;
    font-size: 1.1rem;
    /* font-weight: 600; */
    /* padding: 1rem 3rem; */
    width: 22%;
    border: 1px solid #b32428;
    border-radius: 6px;
    height: 2.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 4px 6px rgba(92, 20, 112, 0.3); */
}

.submit-btn:hover {
    background-color: #b32428;
    color: #fff;
    transform: translateY(-2px);
    /* box-shadow: 0 6px 12px rgba(92, 20, 112, 0.4); */
}

.submit-btn:active {
    transform: translateY(0);
}


/* Cropper Modal */

.custom-cropper-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-cropper-modal-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.custom-cropper-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.custom-cropper-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.close-modal:hover {
    color: var(--error-color);
}

.cropper-container {
    height: 350px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.cropper-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.action-btn,
.cancel-btn,
.confirm-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.action-btn:hover,
.cancel-btn:hover {
    background: #f9fafb;
}

.custom-cropper-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.confirm-btn {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.confirm-btn:hover {
    background: var(--primary-hover);
}

footer {
    background-color: #222831;
    color: #ffffff;
    padding: 40px 60px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    text-align: center;
}

.footer-column {
    margin-bottom: 20px;
}

.footer-column h3 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 20px;
    position: relative;
}

.footer-column h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background-color: #fff;
    margin-top: 10px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 16px;
    font-size: 20px;
}

.footer-column .contact-item {
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-qrcode {
    text-align: right;
}

.footer-qrcode .logo {
    font-size: 32px;
    margin-bottom: 16px;
}

.footer-qrcode img {
    width: 180px;
    height: 180px;
    background-color: #fff;
    border-radius: 8px;
}

.footer-bottom {
    width: 100%;
    background-color: #111;
    color: #aaa;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    font-size: 18px;
}

.footer-bottom-links a {
    color: #aaa;
    text-decoration: none;
    margin-right: 40px;
}

.footer-bottom-info {
    text-align: right;
}

.banner-pic {
    width: 100%;
    display: block;
}

.banner-pic img {
    width: 100%;
}

.form-con {
    margin: 50px 0;
}

.form-con p {
    color: #000;
    line-height: 2em;
    font-size: 0.95rem;
}

textarea {
    padding: 10px !important;
    font-size: 0.95rem !important;
}

.form-xy {
    text-align: center;
    margin: 20px 0 40px 0;
}

.form-xy p {
    font-size: 0.95rem;
    line-height: 2em;
}

.form-xy img {
    width: 13rem;
}

.header {
    width: 100%;
    height: 80px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* 默认就固定在顶部 */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    transition: all 0.3s ease;
}


/* 滚动后添加的样式（可选：背景变深、加阴影等） */

.header.fixed {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header .logo {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    position: relative;
}

.logo span {
    width: 217px;
    height: 55px;
    display: block;
    margin-top: 20px;
}

.logo img {
    width: 100%;
}

.footer-bq {
    background-color: #222831;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    width: 100%;
    font-size: 0.8rem;
    margin-top: 50px;
}

.logout-btn {
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    padding: 0 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 2rem;
    line-height: 2rem;
    position: absolute;
    right: 0;
    top: 25px;
}

.logout-btn:hover {
    color: #c00;
    border-color: #ccc;
    background: #f8f8f8;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-container {
        padding: 1.5rem;
    }
    .file-upload {
        padding: 1rem;
    }
    .logo span {
        width: 50%;
        height: 55px;
        display: block;
        margin-top: 6%;
        margin-left: 10px;
    }
    .form-xy img {
        width: 10rem;
    }
    .header .logo {
        width: 100%;
    }
    .logout-btn {
        right: 2%;
    }
    .form-con {
        margin-top: 0;
    }
}