/* --- 全局和基础样式 (合并了 index, message, records 的公共部分) --- */
:root {
    --primary-color: #c84e45; /* 主题红色 */
    --secondary-color: #d89c5f; /* 主题橙色/棕色 */
    --background-color: #fffaf0; /* 背景米黄色 */
    --text-color: #5c3a21; /* 主要文字颜色 */
    --light-text-color: #a08c7d; /* 浅色文字 */
    --border-color: #f0e0c8; /* 边框颜色 */
    --label-color: #6a5542;
    --button-bg-color: #e0e0e0;
    --button-text-color: #757575;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    display: flex; justify-content: center; align-items: flex-start;
    min-height: 100vh; padding: 20px;
}
.container {
    width: 100%; max-width: 400px; background-color: rgba(255, 255, 255, 0.85);
    border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
/* 新增的 .banner 样式，将图片作为背景图 */
.banner {
    width: 100%;
    height: 300px; /* 固定高度以显示背景图片 */
    background-image: url('../images/head.181a042a.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.content-wrapper {
    padding: 0 40px 40px; 
    background-color: #fdf6e8; 
    border: 1px solid var(--border-color);
    border-top: none; 
    border-radius: 0 0 12px 12px; 
    margin-top: 0px;
    position: relative; 
    z-index: 1;
}
.tabs { display: flex; position: relative; z-index: 2; }
.tab-item {
    flex: 1; padding: 12px 0; text-align: center; font-size: 16px; font-weight: bold;
    cursor: pointer; transition: all 0.3s ease; border-bottom: 3px solid transparent;
    background-color: var(--secondary-color); color: white; opacity: 0.8;
    border-top-left-radius: 0; border-top-right-radius: 0;
}
.tab-item.active { background-color: var(--primary-color); opacity: 1; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.input-group { padding-top: 25px; }
.input-field {
    display: flex; align-items: center; background-color: white; border: 1px solid var(--border-color);
    border-radius: 8px; padding: 12px 15px; margin-bottom: 15px; position: relative; cursor: pointer;
}
.input-field::before {
    content: attr(data-label); display: inline-block; color: white; background-color: var(--primary-color);
    padding: 2px 6px; border-radius: 4px; font-size: 12px; margin-right: 10px; font-weight: bold;
}
.input-field.generic::before { display: none; }
.input-placeholder { flex-grow: 1; color: var(--light-text-color); font-size: 15px; }
.calendar-icon {
    width: 20px; height: 20px;
    background-image: url('../images/calendar-icon.svg');
    background-repeat: no-repeat; background-size: contain;
}
.agreement {
    display: flex;
    align-items: center; /* 垂直居中复选框和文字 */
    justify-content: center; /* 水平居中内容 */
    margin-top: 20px;
}
.agreement input[type="checkbox"] { margin-right: 8px; }
.agreement label { font-size: 12px; color: var(--light-text-color); }
.agreement label a { color: var(--secondary-color); text-decoration: none; }
.submit-btn {
    width: 100%; padding: 12px 0; margin-top: 15px; border: none; border-radius: 25px;
    background: linear-gradient(180deg, #f8695a, #d43c38); color: white; font-size: 18px;
    font-weight: bold; cursor: pointer; transition: transform 0.2s ease;
    box-shadow: 0 3px 8px rgba(212, 60, 56, 0.4); border-top: 1px solid #f98f84;
    border-bottom: 1px solid #b32a25;
}
.submit-btn:active { transform: scale(0.98); }
.footer-links { display: flex; justify-content: space-between; padding: 20px 10px 0; }
.footer-links a { font-size: 14px; color: var(--text-color); text-decoration: none; }

/* --- 日期选择器样式 (来自 index.html) --- */
.picker-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; justify-content: center; align-items: flex-end;
    z-index: 1000;
}
.picker-container {
    width: 100%; max-width: 400px; background-color: white;
    border-top-left-radius: 16px; border-top-right-radius: 16px;
    transform: translateY(100%); transition: transform 0.3s ease-out;
}
.picker-overlay.show .picker-container {
    transform: translateY(0);
}
.picker-header {
    text-align: center; padding: 15px;
    font-size: 14px; color: var(--text-color);
    border-bottom: 1px solid #eee;
}
.picker-content {
    display: flex; justify-content: center; padding: 10px 0;
    position: relative;
}
.picker-highlight {
    position: absolute; top: 50%; left: 10px; right: 10px;
    height: 40px; transform: translateY(-50%);
    border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;
    pointer-events: none;
}
.picker-column {
    flex: 1; height: 200px; overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.picker-column::-webkit-scrollbar { display: none; }
.picker-item {
    height: 40px; line-height: 40px; text-align: center;
    font-size: 18px; color: #aaa;
}
.picker-column-spacer {
    height: 80px;
}
.picker-actions {
    display: flex; border-top: 1px solid #eee;
}
.picker-actions button {
    flex: 1; padding: 15px; border: none; background: none;
    font-size: 16px; cursor: pointer;
}
.picker-actions .picker-cancel { color: #888; }
.picker-actions .picker-confirm { color: white; background-color: var(--primary-color); }

/* --- 留言页面样式 (来自 message.html) --- */
.message-container {
    background-color: transparent;
    box-shadow: none;
    padding: 0 10px;
}
.page-title {
    text-align: center;
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 10px;
}
.intro-text {
    text-align: center;
    color: var(--light-text-color);
    font-size: 14px;
    margin-bottom: 25px;
}
.message-form .form-group {
    margin-bottom: 15px;
}
.message-form label {
    display: block;
    font-size: 14px;
    color: var(--label-color);
    margin-bottom: 5px;
}
.message-form input[type="text"],
.message-form input[type="tel"],
.message-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-color);
    background-color: #fff;
    resize: vertical;
}
.message-form input::placeholder,
.message-form textarea::placeholder {
    color: var(--light-text-color);
}
.submit-btn {
    width: 100%; padding: 12px 0; border: none; border-radius: 25px;
    background: linear-gradient(180deg, #f8695a, #d43c38); color: white;
    font-size: 18px; font-weight: bold; cursor: pointer; transition: transform 0.2s ease;
    box-shadow: 0 3px 8px rgba(212, 60, 56, 0.4);
}
.back-link {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}

/* --- 记录页面样式 (来自 records.html) --- */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    margin-bottom: 20px;
}
.records-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 10px;
}
.record-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px;
}
.card-main {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 10px;
}
.card-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}
.card-dates {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: var(--text-color);
}
.card-dates .label {
    font-weight: bold;
    color: var(--light-text-color);
    margin-right: 5px;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.score-label {
    font-size: 14px;
    color: var(--light-text-color);
}
.score-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}
.details-link {
    font-size: 14px;
    color: var(--secondary-color);
    text-decoration: none;
}
.no-records {
    text-align: center;
    color: var(--light-text-color);
    margin-top: 50px;
}
.no-records .cta-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
}

/* 可选日期输入框样式 */
.optional-dates {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}
.optional-dates h3 {
    margin-top: 0;
    color: #495057;
    font-size: 16px;
    text-align: center;
}
.optional-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.optional-input-field {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    position: relative;
}
.optional-input-field .input-placeholder {
    color: #6c757d;
}
.remove-date-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
}
.optional-input-field:hover .remove-date-btn {
    display: block;
}
.add-date-btn {
    margin-top: 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}
.add-date-btn:hover {
    background-color: #218838;
}
