﻿
/* 已修改字段的高亮样式 */
.changed-field {
    background-color: #e8f5e9; /* 更明显的淡绿色背景 */
    border: 2px solid #66bb6a; /* 更粗、颜色更深的绿色边框 */
    box-shadow: 0 0 5px rgba(102, 187, 106, 0.5); /* 添加 subtle 的绿色辉光/阴影效果 */
    transition: background-color 0.3s, border-color 0.3s; /* 添加平滑的过渡效果 */
}

body {
    font-family: Arial, sans-serif;
    background-color: #f2f2f2;
}

h3 {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.div_container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
}


label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1rem;
    display: block;
}

/* --- 您原来的基础样式 (保留并作为默认状态) --- */
input, textarea {
    font-size: 1rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: none; /* 默认无边框，我们将在出错时添加 */
    border-radius: 5px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* 默认背景色 (用户未输入时) */
    background-color: #f7f7f7;
    /* 添加过渡效果，让颜色变化更平滑 */
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

    /* --- 【要求1】用户输入内容后改变底色 --- */
    /* 使用 :not(:placeholder-shown) 伪类，这是最现代、最准确的做法 */
    /* 它表示：当 placeholder 不再显示时 (即用户输入了内容) */
    input:not(:placeholder-shown),
    textarea:not(:placeholder-shown) {
        background-color: #ffffff; /* 输入后变为白色 */
    }

/* 为了让 :not(:placeholder-shown) 生效，输入框必须有一个 placeholder */
/* 如果某些输入框没有 placeholder，我们可以用 JavaScript 动态添加一个空的 */
/* 或者使用下面的备用方案（但不推荐） */


/* --- 【要求2】JS 判断必填项为空时的错误样式 --- */
/* 这是我们在 JS 中动态添加的 class */
.input-error {
    border: 1px solid #e74c3c; /* 出现错误时，添加1像素的红色边框 */
    box-shadow: 0px 2px 6px rgba(231, 76, 60, 0.5); /* 阴影也变为红色 */
}

/* 错误消息文本的样式 (与之前相同) */
.error-message {
    color: #e74c3c;
    font-size: 0.8em;
    display: block;
    margin-top: 5px;
}


/* --- 您原来的 readonly 样式 (保留) --- */
input[readonly] {
    background-color: #f2f2f2;
}

/* --- (可选但推荐) 增加 :focus 状态，提升用户体验 --- */
/* 当用户点击输入框时，给一个视觉反馈 */
input:focus, textarea:focus {
    outline: none; /* 移除浏览器默认的蓝色轮廓 */
    box-shadow: 0px 2px 6px rgba(52, 152, 219, 0.5); /* 变为蓝色阴影 */
}

.button1 {
    width: 100%;
    background-color: #2ecc71;
    /**
    *background-color: #007bff;
    */
    color: white;
    font-size: 1rem;
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 5px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

    .button1:hover {
        background-color: #3e8e41;
    }

.a-btn1 {
    display: block;
    width: 100%;
    background-color: #2ecc71;
    color: white;
    font-size: 1rem;
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 5px;
    box-sizing: border-box; /* 添加盒模型为"border-box" */
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
    border: none;
    /* 移除a标签的内边距和边框样式 */
    /* padding: 0; */

    cursor: pointer;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
}

    .a-btn1:hover {
        background-color: #3e8e41;
    }

.a-btn1-red {
    display: block;
    width: 100%;
    background-color: red;
    color: white;
    font-size: 1rem;
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 5px;
    box-sizing: border-box; /* 添加盒模型为"border-box" */
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
    border: none;
    /* 移除a标签的内边距和边框样式 */
    /* padding: 0; */

    cursor: pointer;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
}

    .a-btn1-red:hover {
        background-color: #3e8e41;
    }
/*将验证码和输入内容显示在同一行*/
.captcha-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .captcha-container img {
        height: 40px;
        vertical-align: middle;
        cursor: pointer;
        margin-left: 10px;
    }

