/* 年货嘉年华登记系统样式 */

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

body {
    font-family: "Microsoft YaHei", "SimHei", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: transparent;
    overflow-x: hidden;
}

.page-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 0; /* 移除底部额外空间 */
    margin-bottom: 0;
    background-color: #d3182b;
    overflow: hidden; /* 隐藏溢出内容 */
}

/* 头部区域 - 使用bg.png */
.header-section {
    width: 100%;
    position: relative;
    background-color: #d3182b;
}

.header-background {
    width: 100%;
    background-image: url('../bg.png');
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
}

/* 使用伪元素来保持背景图片的宽高比 */
/* 图片尺寸：790*1881，宽高比 = 1881/790 ≈ 2.38，即 238% */
.header-background::before {
    content: '';
    display: block;
    padding-top: 238.10%; /* 1881/790 = 2.381，保持图片完整宽高比 */
}

/* 填写区域 - 使用info.png */
.form-container {
    width: 100%;
    position: relative;
    z-index: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
    padding-bottom: 0;
    min-height: 600px;
    background-color: #d3182b;
}

.form-background {
    position: absolute;
    top: 20px;
    left: 12px;
    width: 94%;
    height: 120%;
    background-image: url(../info.png);
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.form-background::before {
    content: '';
    display: block;
    padding-top: 50%; /* 根据info.png的实际宽高比调整，可根据实际图片修改 */
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-wrapper {
    border: none;
    padding: 20px;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 1; /* 确保表单在背景图之上 */
    width: 91%;
    max-width: 800px;
    margin-top: 55px;
}

/* 表单区域 */
.registration-form {
    /* background: #fefefe; */
    padding: 0;
    border-radius: 10px;
}

.form-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 4px solid #c41e3a;
}

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

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

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #fff;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 5px rgba(196, 30, 58, 0.2);
}

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

/* 复选框样式 */
.checkbox-group {
    margin: 15px 0;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #c41e3a;
    flex-shrink: 0;
}

.checkbox-text {
    color: #555;
    flex: 1;
}

/* 提交按钮区域 */
.submit-wrapper {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 15px;
}

.submit-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
}

.submit-button:hover {
    transform: scale(1.05);
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-button-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* 消息提示 */
.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* 成功弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-modal {
    background: #fff;
    border-radius: 15px;
    padding: 40px 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.3s ease-out;
    max-width: 90%;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #28a745;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 50px;
    font-weight: bold;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message {
    font-size: 20px;
    color: #333;
    font-weight: 500;
    line-height: 1.5;
}

/* 移动端弹窗适配 */
@media (max-width: 480px) {
    .success-modal {
        padding: 30px 30px;
        margin: 20px;
    }

    .success-icon {
        width: 60px;
        height: 60px;
        font-size: 40px;
    }

    .success-message {
        font-size: 18px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-background {
        background-size: 100% auto; /* 移动端保持宽度100%，高度自适应 */
    }
    
    .header-background::before {
        padding-top: 238.10%; /* 移动端也使用相同的宽高比，确保图片完整显示 */
    }

    .form-background {
        background-size: 100% auto;
    }

    .form-container {
        padding: 10px;
        min-height: 500px;
    }

    .form-wrapper {
        padding: 20px;
        margin-bottom: 0;
        width: 95%; /* 移动端稍微增加宽度 */
    }

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

    .section-title {
        font-size: 22px;
    }

    .form-group label {
        font-size: 14px;
    }

    .form-group input[type="text"],
    .form-group input[type="tel"],
    .form-group textarea {
        font-size: 14px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .header-background {
        background-size: 100% auto; /* 小屏幕也保持宽度100% */
    }
    
    .header-background::before {
        padding-top: 238.10%; /* 小屏幕保持相同宽高比 */
    }

    .form-background {
        background-size: 100% auto;
    }

    .form-container {
        padding: 8px;
        min-height: 400px;
    }

    .form-wrapper {
        padding: 15px;
        width: 96%; /* 小屏幕进一步增加宽度 */
    }
}

/* 尾部区域 - 使用end.png */
.footer-section {
    width: 100%;
    position: relative;
    background-color: #d3182b;
    text-align: center;
    padding: 0;
    margin: 0;
    margin-top: 145px;
    height: 74px;
}

.footer-image {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

/* 横屏适配 */
@media (max-width: 768px) and (orientation: landscape) {
    .header-background::before {
        padding-top: 238.10%; /* 横屏时也保持完整宽高比 */
    }
    
    .form-container {
        padding: 10px;
    }
}
