/* 基本重置和全局样式 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    background-color: #f0f2f5;
    color: #1c1e21;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 主容器样式 */
.container {
    background-color: #ffffff;
    padding: 40px 50px;
    border-radius: 16px;
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.12), 0 5px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 720px;
    text-align: left;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15), 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .container {
        padding: 30px 35px;
        max-width: 90%;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 25px 20px;
        max-width: 100%;
        border-radius: 12px;
    }
    body {
        padding: 10px;
    }
}

/* 标题和副标题 */
h1 {
    color: #121212;
    /*margin-bottom: 15px;*/
    font-size: 36px;
    font-weight: 700;
    text-align: center;
}

.tagline {
    color: #555;
    font-size: 15px;
    text-align: center;
    margin-bottom: 30px;
}

/* 将叶子图标颜色设置为与按钮一致的绿色 */
.tagline .fa-leaf {
    color: #2da44e; /* 使用和按钮一致的绿色，增强视觉统一性 */
    margin-right: 6px; /* 增加一点右边距，让图标和文字更协调 */
    font-size: 14px; /* 可以微调大小以匹配文字 */
}

/* 标题图标 */
h1 .fa-comment-sms {
    margin-right: 15px;
    color: #2da44e; /* 使用和按钮一致的绿色 */
    font-size: 35px;
}


/* --- 表单元素整合样式 (Flexbox 方案) --- */

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    font-size: 17px;
}

/* 包裹图标和输入框的容器，这是实现对齐的关键 */
.input-with-icon {
    display: flex;
    align-items: center; /* 垂直居中对齐 */
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background-color: #f6f8fa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0 20px; /* 在容器上设置左右内边距 */
}

/* 当容器内有元素获得焦点时，改变容器样式 */
.input-with-icon:focus-within {
    border-color: #0969da;
    box-shadow: 0 0 0 3.5px rgba(9, 105, 218, 0.2);
    background-color: #fff;
}

/* 输入框内的图标样式 */
.form-icon {
    color: #57606a;
    margin-right: 15px;
    font-size: 17px;
    transition: color 0.2s;
}

/* 获得焦点时图标也变色 */
.input-with-icon:focus-within .form-icon {
    color: #0969da;
}

/* 移除输入框和文本域自身的边框和背景，因为它们现在由父容器提供 */
.container form input[type="text"],
.container form textarea {
    flex-grow: 1;
    width: 100%;
    padding: 18px 0; /* 只保留上下内边距，左右由父容器控制 */
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: #1f2328;
    outline: none;
    font-family: inherit; /* 继承 body 的字体 */
}

/* 文本域的特定样式 */
.container form textarea {
    resize: vertical; /* 只允许垂直缩放文本域 */
    min-height: 150px;
    line-height: 1.5;
}


/* --- 提交按钮、验证码和状态消息样式 --- */

button[type="submit"] {
    background-color: #2da44e;
    color: white;
    padding: 16px 30px;
    border: 1px solid rgba(27, 31, 36, 0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1);
    width: 100%;
    display: block;
    text-align: center;
    box-shadow: 0 1px 0 rgba(27, 31, 36, 0.04), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}

button[type="submit"]:hover:not(:disabled) {
    background-color: #2c974b;
}

button[type="submit"]:active:not(:disabled) {
    background-color: #298e46;
    box-shadow: inset 0 1px 0 rgba(20, 70, 32, 0.2);
}

button[type="submit"]:disabled {
    background-color: #94d3a2;
    color: rgba(255, 255, 255, 0.8);
    cursor: not-allowed;
    border-color: rgba(27, 31, 36, 0.1);
}

/* 按钮内的图标样式 */
button[type="submit"] .fa-share-from-square {
    margin-right: 10px;
    font-size: 16px;
}

.cf-turnstile {
    margin: 30px auto;
    display: flex;
    justify-content: center;
}

.status-message {
    margin-top: 30px;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.success {
    background-color: #ddf4ff;
    color: #00529b;
    border: 1px solid #b6e0ff;
}

.status-message.error {
    background-color: #ffe3e6;
    color: #d8000c;
    border: 1px solid #ffb8c1;
}

.status-message.info {
    background-color: #e7e7e7;
    color: #4f4f4f;
    border: 1px solid #d7d7d7;
}