/* 表单对联容器（PC端） - 使用背景图片 */
/* 图片尺寸：1200x675，比例约 1.78:1 */
.form-couple-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    /* 根据图片比例计算高度：1200/675 ≈ 1.78 */
    aspect-ratio: 1200 / 675;
    min-height: 400px;
    background-image: url('../../images/form-background.png');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #f5f7fa;
    border-radius: 20px;
    overflow: hidden;
}
.couple-left, .couple-right {
    display: none; /* 隐藏对联 */
}
/* 移动端适配 */
@media (max-width: 992px) {
    .form-couple-container {
        background-image: none; /* 移动端不显示背景图片 */
        aspect-ratio: auto; /* 移除固定比例 */
        min-height: auto; /* 自适应内容高度 */
        background-color: #ffffff; /* 移动端显示白色背景 */
        border-radius: 0; /* 移除圆角 */
    }
    .naming-form-section {
        background-color: #ffffff; /* 恢复白色背景 */
        border-radius: 12px; /* 恢复圆角 */
        box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* 恢复阴影 */
        max-width: 100%; /* 移动端全宽 */
    }
}

/* 起名表单样式 - 固定宽度650px居中 */
.naming-form-section {
    background-color: transparent;
    border-radius: 0;
    padding: 30px;
    box-shadow: none;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}
.form-title {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 25px;
    font-weight: 600;
    border-left: 4px solid #4299e1;
    padding-left: 15px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-label {
    font-size: 15px;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 500;
}
.form-control {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}
.form-control:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}
.form-select {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    color: #2d3748;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}
.form-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}
.submit-btn {
    grid-column: 1 / -1;
    padding: 14px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}
.submit-btn:hover {
    background-color: #3182ce;
}
.submit-btn.loading {
    background-color: #9f7aea;
    cursor: not-allowed;
}

/* 表单验证错误样式 */
.form-control.error,
.form-select.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}
.form-control.error:focus,
.form-select.error:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}
.form-error-message {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.form-error-message i {
    font-size: 12px;
}
.form-error-message:empty {
    display: none;
}

/* 日期选择器样式 */
.date-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.date-input-wrapper .form-control {
    padding-right: 40px;
    cursor: pointer;
    width: 100%;
}

.date-picker-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    pointer-events: auto;
    z-index: 10;
}

.date-input-wrapper:hover .date-picker-icon {
    color: #4299e1;
}

/* 日期选择器模态框 */
.date-picker-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.date-picker-backdrop.active {
    display: block;
}

.date-picker-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.date-picker-modal.active {
    transform: translateY(0);
}

.date-picker-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.date-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.date-picker-actions {
    display: flex;
    gap: 10px;
}

.date-picker-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.date-picker-cancel {
    background: #f5f5f5;
    color: #666;
}

.date-picker-cancel:hover {
    background: #e5e5e5;
}

.date-picker-confirm {
    background: #4299e1;
    color: white;
    font-weight: 600;
}

.date-picker-confirm:hover {
    background: #3182ce;
}

.date-picker-info {
    padding: 15px 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

/* 滚轮容器 - 5列布局 */
.date-picker-wheel-wrapper {
    display: flex;
    height: 240px;
    position: relative;
    overflow: hidden;
}

.date-picker-wheel-column {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 0;
}

/* 5列布局优化 */
.date-picker-wheel-column:nth-child(1) {
    flex: 0 0 22%; /* 年 */
}

.date-picker-wheel-column:nth-child(2) {
    flex: 0 0 18%; /* 月 */
}

.date-picker-wheel-column:nth-child(3) {
    flex: 0 0 18%; /* 日 */
}

.date-picker-wheel-column:nth-child(4) {
    flex: 0 0 21%; /* 时 */
}

.date-picker-wheel-column:nth-child(5) {
    flex: 0 0 21%; /* 分 */
}

.date-picker-wheel-scroll {
    list-style: none;
    position: absolute;
    width: 100%;
    top: 100px;
    transition: transform 0.1s ease-out;
    padding: 0;
    z-index: 5;
    margin: 0;
}

.date-picker-wheel-item {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
    font-weight: 500;
    color: #888;
    line-height: 40px;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10;
}

.date-picker-wheel-item.active {
    color: #2d3748 !important;
    font-weight: 600;
    z-index: 20;
    position: relative;
}

.date-picker-wheel-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.9) 0%, 
        rgba(255,255,255,0) 25%, 
        rgba(255,255,255,0) 75%, 
        rgba(255,255,255,0.9) 100%);
    z-index: 10;
}

.date-picker-wheel-highlight {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    height: 40px;
    border-radius: 8px;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    pointer-events: none;
    background: rgba(66, 153, 225, 0.15);
    border: 1px solid rgba(66, 153, 225, 0.3);
}

@media (max-width: 600px) {
    .date-picker-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }
    
    .date-picker-wheel-column {
        min-width: 0;
    }
    
    /* 移动端5列布局 */
    .date-picker-wheel-column:nth-child(1) {
        flex: 0 0 20%; /* 年 */
    }
    
    .date-picker-wheel-column:nth-child(2) {
        flex: 0 0 18%; /* 月 */
    }
    
    .date-picker-wheel-column:nth-child(3) {
        flex: 0 0 18%; /* 日 */
    }
    
    .date-picker-wheel-column:nth-child(4) {
        flex: 0 0 22%; /* 时 */
    }
    
    .date-picker-wheel-column:nth-child(5) {
        flex: 0 0 22%; /* 分 */
    }
    
    .date-picker-wheel-item {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 3px;
    }
}

/* 地址选择器样式 - 参照日期选择器 */
.address-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.address-input-wrapper .form-control {
    padding-right: 40px;
    cursor: pointer;
    width: 100%;
}

.address-picker-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    pointer-events: auto;
    z-index: 10;
}

.address-input-wrapper:hover .address-picker-icon {
    color: #4299e1;
}

/* 地址选择器模态框 */
.address-picker-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
}

.address-picker-backdrop.active {
    display: block;
}

.address-picker-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.address-picker-modal.active {
    transform: translateY(0);
}

.address-picker-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.address-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.address-picker-actions {
    display: flex;
    gap: 10px;
}

.address-picker-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.address-picker-cancel {
    background: #f5f5f5;
    color: #666;
}

.address-picker-cancel:hover {
    background: #e5e5e5;
}

.address-picker-confirm {
    background: #4299e1;
    color: white;
    font-weight: 600;
}

.address-picker-confirm:hover {
    background: #3182ce;
}

.address-picker-info {
    padding: 15px 20px;
    text-align: center;
    font-size: 16px;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #eee;
}

/* 地址选择器滚轮容器 - 3列布局 */
.address-picker-wheel-wrapper {
    display: flex;
    height: 240px;
    position: relative;
    overflow: hidden;
}

.address-picker-wheel-column {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 0;
}

/* 3列布局优化 */
.address-picker-wheel-column:nth-child(1) {
    flex: 0 0 33.33%; /* 省 */
}

.address-picker-wheel-column:nth-child(2) {
    flex: 0 0 33.33%; /* 市 */
}

.address-picker-wheel-column:nth-child(3) {
    flex: 0 0 33.34%; /* 区县 */
}

.address-picker-wheel-scroll {
    list-style: none;
    position: absolute;
    width: 100%;
    top: 100px;
    transition: transform 0.1s ease-out;
    padding: 0;
    z-index: 5;
    margin: 0;
}

.address-picker-wheel-item {
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
    font-weight: 500;
    color: #888;
    line-height: 40px;
    margin: 0;
    padding: 0 8px;
    position: relative;
    z-index: 10;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-picker-wheel-item.active {
    color: #2d3748 !important;
    font-weight: 600;
    z-index: 20;
    position: relative;
}

.address-picker-wheel-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to bottom, 
        rgba(255,255,255,0.9) 0%, 
        rgba(255,255,255,0) 25%, 
        rgba(255,255,255,0) 75%, 
        rgba(255,255,255,0.9) 100%);
    z-index: 10;
}

.address-picker-wheel-highlight {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    height: 40px;
    border-radius: 8px;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    pointer-events: none;
    background: rgba(66, 153, 225, 0.15);
    border: 1px solid rgba(66, 153, 225, 0.3);
}

@media (max-width: 600px) {
    .address-picker-modal {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }
    
    .address-picker-wheel-column {
        min-width: 0;
    }
    
    /* 移动端3列布局 */
    .address-picker-wheel-column:nth-child(1) {
        flex: 0 0 33.33%; /* 省 */
    }
    
    .address-picker-wheel-column:nth-child(2) {
        flex: 0 0 33.33%; /* 市 */
    }
    
    .address-picker-wheel-column:nth-child(3) {
        flex: 0 0 33.34%; /* 区县 */
    }
    
    .address-picker-wheel-item {
        font-size: 14px;
        padding: 0 5px;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .naming-form-section {
        padding: 20px;
    }
    .form-title {
        font-size: 18px;
    }
}

