:root {
    --primary-color: #1a56db;       /* WCAG 2.1 高对比度蓝色 */
    --primary-focus: #0b3fa8;
    --text-color: #1f2937;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --error-color: #dc2626;
    --border-color: #d1d5db;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 2rem 1rem;
}

/* 视觉障碍专用屏幕阅读器隐形文本区 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 40.625rem;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 2rem 1.5rem;
}

h1 {
    text-align: center;
    font-size: 1.625rem;
    color: #111827;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: bold;
    color: #374151;
    border-left: 4px solid var(--primary-color);
    padding-left: 0.75rem;
    margin: 2rem 0 1.25rem 0;
}

.section-title:first-of-type {
    margin-top: 0;
}

fieldset.form-group {
    border: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

label, legend {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.required::after {
    content: " (必填)";
    color: var(--error-color);
    font-size: 0.875rem;
    font-weight: normal;
}

input[type="text"], textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    background-color: var(--card-bg);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* 无障碍显式聚焦环：确保键盘访问用户获得强视觉指引 */
input[type="text"]:focus-visible, textarea:focus-visible, input[type="radio"]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

textarea {
    resize: vertical;
    min-height: 6rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.radio-option:hover {
    background-color: #f9fafb;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.anonymous-box {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.toggle-group {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.toggle-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.toggle-option input {
    margin-right: 0.5rem;
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary-color);
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.15s;
    margin-top: 2rem;
}

.submit-btn:hover {
    background-color: var(--primary-focus);
}

.submit-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* 默认结束感谢卡片 */
.thank-you-card {
    text-align: center;
    padding: 3rem 1.5rem;
}

.thank-you-icon {
    width: 4rem;
    height: 4rem;
    background-color: #d1fae5;
    color: #059669;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.thank-you-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.thank-you-msg {
    font-size: 1rem;
    color: #4b5563;
}