﻿/* ... (保留之前的基础样式: body, .container, header, .required-mark, .form-group, label, .form-control, .validation-message, .btn, .btn-submit) ... */

/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    background-color: #269fd7;
    padding: 20px 0;
}

.container {
    max-width: 950px;text-align:left;margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.required-hint {
    color: #666;
}

.required-mark {
    color: #ff0000;
}

/* 表单字段集样式 */
fieldset {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 25px;
}

legend {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    padding: 0 10px;
    border-bottom: none;
    width: auto;
    margin-bottom: 15px;
}

/* 表单控件样式 */
.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

label {
    flex: 0 0 140px; /* 固定标签宽度 */
    font-weight: bold;
    padding-top: 8px;
}

.form-control {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

    .form-control:focus {
        border-color: #66afe9;
        outline: 0;
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
    }

.validation-message {
    flex: 1;
    margin-left: 140px; /* 与label对齐 */
    margin-top: -15px; /* 向上移动 */
    min-height: 20px;
    font-size: 12px;
    color: #a94442;
}

/* 特殊控件样式 */
.select-half {
    flex: 0 0 35%;
    margin-right:2%;
}

    .select-half:last-child {
        margin-right: 0;
    }

.agreement-group {
    flex-direction: column;
    align-items: stretch;
}

.agreement-textarea {
    width: 100%;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    color: #666;
    resize: vertical;
}

.form-check {
    margin-left: 140px; /* 与label对齐 */
}

/* 按钮样式 */
.form-actions {
    margin-top: 30px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
}

.btn-submit {
    color: #fff;
    background-color: #ff9833;
    border-color: #e67e22;
    padding: 12px 30px;
}

    .btn-submit:hover {
        background-color: #e67e22;
    }

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
    }

    label, .form-control, .validation-message, .form-check {
        width: 100%;
        margin-left: 0;
    }

    .validation-message {
        margin-top: 5px;
    }

    .select-half {
        width: 100%;
        flex: none;
        margin-right: 0;
        margin-bottom: 10px;
    }

        .select-half:last-child {
            margin-bottom: 0;
        }
}
