/* ========================================
   苗医莲中医馆 - 传统商务风格样式
   设计理念：传统中医文化 + 现代商务美学
   ======================================== */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', 'Source Han Serif CN', 'STSong', '宋体', serif;
    line-height: 1.8;
    color: #2C3E50;
    background: linear-gradient(135deg, #FAF9F6 0%, #F5F5DC 100%);
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 - 传统商务风格 */
.navbar {
    background: linear-gradient(135deg, #1a4d2e 0%, #2D5F3F 100%);
    color: #F5F5DC;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #D4AF37;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #F5F5DC;
}

.navbar-brand h1::before {
    content: '◆ ';
    color: #D4AF37;
    font-size: 20px;
}

.navbar-nav {
    display: flex;
    gap: 25px;
}

.nav-link {
    color: #F5F5DC;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D4AF37;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: #D4AF37;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #F5F5DC;
    border-radius: 3px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, #1a4d2e 0%, #2D5F3F 100%);
    z-index: 1001;
    transition: right 0.3s ease;
    border-left: 3px solid #D4AF37;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-content {
    padding: 20px;
    color: #F5F5DC;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #F5F5DC;
    font-size: 30px;
    cursor: pointer;
    float: right;
    margin-bottom: 20px;
}

.mobile-nav-link {
    display: block;
    color: #F5F5DC;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-link:hover {
    padding-left: 10px;
    color: #D4AF37;
}

/* 主内容区 */
.main {
    padding: 50px 0;
    min-height: calc(100vh - 200px);
}

.main h2 {
    font-size: 32px;
    margin-bottom: 25px;
    color: #1a4d2e;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 15px;
}

.main h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37 0%, #C41E3A 100%);
}

.main h3 {
    font-size: 24px;
    margin: 35px 0 20px;
    color: #1a4d2e;
    font-weight: 600;
    letter-spacing: 1px;
}

.main p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 2;
    color: #34495E;
}

/* 按钮 - 商务风格 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #2D5F3F 0%, #1a4d2e 100%);
    color: #F5F5DC;
    border: 2px solid #D4AF37;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: #1a4d2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #C41E3A 0%, #A01828 100%);
    color: #F5F5DC;
    border: 2px solid #D4AF37;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: #1a4d2e;
}

.btn-danger {
    background: linear-gradient(135deg, #C41E3A 0%, #A01828 100%);
    color: #F5F5DC;
    border: 2px solid #C41E3A;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #A01828 0%, #800020 100%);
}

/* 首页样式 - 传统商务 */
.hero {
    text-align: center;
    margin-bottom: 50px;
    padding: 60px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: 1px solid #D4AF37;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37 0%, #C41E3A 50%, #D4AF37 100%);
}

.hero h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #1a4d2e;
    font-weight: 700;
    letter-spacing: 3px;
}

.hero p {
    font-size: 18px;
    color: #34495E;
    line-height: 2;
}

.features {
    margin-bottom: 50px;
}

.features h3 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    color: #1a4d2e;
    position: relative;
    padding-bottom: 20px;
}

.features h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 35px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 1px solid #E8E4D9;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #D4AF37 0%, #C41E3A 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.feature-card h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1a4d2e;
    font-weight: 700;
    letter-spacing: 1px;
}

.feature-card p {
    margin-bottom: 25px;
    color: #34495E;
    line-height: 1.8;
}

.about {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #E8E4D9;
}

.about h3 {
    color: #1a4d2e;
    margin-bottom: 25px;
}

/* 体质辨识页 */
#constitution-form {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    border: 1px solid #E8E4D9;
}

.question-group {
    margin-bottom: 40px;
}

.question-group h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #D4AF37;
    color: #1a4d2e;
    font-weight: 600;
}

.question {
    margin-bottom: 25px;
}

.question p {
    margin-bottom: 12px;
    font-weight: 600;
    color: #2C3E50;
}

.options {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.options label:hover {
    background: rgba(212, 175, 55, 0.1);
}

#constitution-result {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 40px;
    border: 1px solid #E8E4D9;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
}

.result-info h4 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #1a4d2e;
    font-weight: 700;
}

.suggestions {
    margin-top: 30px;
}

.suggestions h4 {
    margin-bottom: 15px;
    color: #C41E3A;
    font-weight: 600;
}

.suggestions p {
    margin-bottom: 12px;
    line-height: 1.8;
}

/* AI问诊页 */
.consultation-container {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    border: 1px solid #E8E4D9;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 25px;
    background: #FAF9F6;
    min-height: 300px;
    border-radius: 8px;
    border: 1px solid #E8E4D9;
}

.message {
    margin-bottom: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.8;
}

.ai-message {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    align-self: flex-start;
    border-top-left-radius: 0;
    border-left: 4px solid #2D5F3F;
}

.user-message {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    align-self: flex-end;
    margin-left: auto;
    border-top-right-radius: 0;
    border-right: 4px solid #D4AF37;
}

.thinking-chain {
    background: linear-gradient(135deg, #F5F5DC 0%, #E8E4D9 100%);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #D4AF37;
}

.thinking-content {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.8;
}

.input-area {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    background: #FAF9F6;
    border-top: 2px solid #D4AF37;
    flex-shrink: 0;
    border-radius: 0 0 8px 8px;
}

.input-area input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #E8E4D9;
    border-radius: 6px;
    font-size: 15px;
    min-width: 0;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-area input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.input-area button {
    white-space: nowrap;
    padding: 15px 30px;
}

#suggestions {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 40px;
    border: 1px solid #E8E4D9;
}

#suggestions-content {
    margin-bottom: 25px;
}

/* 用药参考页 */
.disclaimer-box {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 5px solid #D4AF37;
    border: 1px solid #D4AF37;
}

.medication-section {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    border: 1px solid #E8E4D9;
}

.medication-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.medication-item {
    padding: 25px;
    border: 2px solid #E8E4D9;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #FAF9F6;
}

.medication-item:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
    transform: translateY(-3px);
}

.medication-item h4 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1a4d2e;
    font-weight: 700;
}

.medication-item .warning {
    color: #C41E3A;
    font-weight: 700;
    font-size: 14px;
}

.medication-item .recommendation-reason {
    background: linear-gradient(135deg, #F5F5DC 0%, #E8E4D9 100%);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 14px;
    border-left: 3px solid #D4AF37;
}

.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    gap: 15px;
    max-width: 600px;
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #E8E4D9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.search-box button {
    padding: 15px 30px;
}

.loading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 25px;
    justify-content: center;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #E8E4D9;
    border-top: 3px solid #D4AF37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 50px;
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 8px;
    border: 1px solid #D4AF37;
}

.references-section {
    margin-top: 40px;
}

.reference-section {
    margin-bottom: 30px;
}

.reference-section h4 {
    color: #1a4d2e;
    margin-bottom: 15px;
    font-weight: 700;
}

.reference-list {
    background: linear-gradient(135deg, #FAF9F6 0%, #F5F5DC 100%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #E8E4D9;
}

.reference-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E8E4D9;
}

.reference-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.back-buttons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

/* 健康档案页 */
.data-management {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.records-section {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    border: 1px solid #E8E4D9;
}

.records-list {
    margin-top: 25px;
}

.record-item {
    padding: 25px;
    border: 2px solid #E8E4D9;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: #FAF9F6;
}

.record-item:hover {
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #7F8C8D;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #95A5A6;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: rgba(196, 30, 58, 0.1);
    color: #C41E3A;
}

/* 操作栏样式 */
.records-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #D4AF37;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    color: #2C3E50;
    font-weight: 500;
}

.select-all-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 记录复选框 */
.record-checkbox {
    margin-right: 15px;
    cursor: pointer;
}

.record-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 聊天头部 */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    border-bottom: 2px solid #D4AF37;
    flex-shrink: 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1a4d2e;
    font-weight: 700;
}

.btn-secondary {
    background: linear-gradient(135deg, #7F8C8D 0%, #95A5A6 100%);
    color: #F5F5DC;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #95A5A6 0%, #BDC3C7 100%);
    transform: translateY(-2px);
}

/* 问诊布局 */
.consultation-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 25px;
    width: 100%;
    min-height: 600px;
    align-items: stretch;
}

/* 主对话区域 */
.consultation-container {
    flex: 1;
    min-width: 0;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #E8E4D9;
}

/* 侧边栏 */
.thinking-sidebar {
    width: 380px;
    min-width: 320px;
    max-width: 420px;
    background: linear-gradient(135deg, #FAF9F6 0%, #F5F5DC 100%);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    border: 1px solid #E8E4D9;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #1a4d2e 0%, #2D5F3F 100%);
    color: #F5F5DC;
    border-radius: 8px 8px 0 0;
    border-bottom: 3px solid #D4AF37;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #F5F5DC;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.sidebar-header .icon {
    font-size: 20px;
}

.toggle-btn {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid #D4AF37;
    color: #F5F5DC;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: scale(1.05);
}

/* 思维链内容 */
.thinking-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
    min-height: 300px;
}

.empty-state {
    text-align: center;
    padding: 50px 25px;
    color: #7F8C8D;
}

.empty-state p {
    margin: 10px 0;
    font-size: 15px;
}

.empty-state .hint {
    font-size: 13px;
    color: #95A5A6;
}

/* 思维链节点 */
.thinking-node {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #D4AF37;
    border: 1px solid #E8E4D9;
    transition: all 0.3s ease;
}

.thinking-node:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.thinking-node:last-child {
    margin-bottom: 0;
}

.thinking-node h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    color: #1a4d2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.thinking-node h4 .step-number {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: #1a4d2e;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.thinking-node p {
    margin: 0;
    font-size: 14px;
    color: #2C3E50;
    line-height: 1.8;
}

.thinking-node .relation {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #E8E4D9;
    font-size: 13px;
    color: #7F8C8D;
}

/* 历史记录列表 */
.history-list {
    background: #ffffff;
    border-bottom: 2px solid #D4AF37;
    max-height: 250px;
    overflow-y: auto;
}

.history-header {
    padding: 12px 20px;
    background: linear-gradient(135deg, #FAF9F6 0%, #F5F5DC 100%);
    border-bottom: 1px solid #E8E4D9;
}

.history-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1a4d2e;
}

.history-items {
    padding: 10px;
}

.empty-history {
    text-align: center;
    padding: 20px;
    color: #95A5A6;
    font-size: 13px;
}

.history-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #FAF9F6 0%, #F5F5DC 100%);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.history-item:hover {
    background: linear-gradient(135deg, #F5F5DC 0%, #E8E4D9 100%);
    border-color: #D4AF37;
}

.history-item.active {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-color: #D4AF37;
}

.history-item .history-time {
    font-size: 12px;
    color: #7F8C8D;
    margin-bottom: 5px;
}

.history-item .history-summary {
    font-size: 13px;
    color: #2C3E50;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item .history-step-count {
    display: none;
}

/* 思维链标题 */
.thinking-title {
    font-weight: 700;
    color: #1a4d2e;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #D4AF37;
    font-size: 16px;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .thinking-sidebar {
        width: 320px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .consultation-layout {
        gap: 20px;
    }
    
    .thinking-sidebar {
        width: 300px;
        min-width: 250px;
    }
    
    .consultation-container {
        min-width: 280px;
    }
}

.record-content p {
    margin-bottom: 10px;
    font-size: 15px;
}

/* 隐私设置页 */
.privacy-section {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
    border: 1px solid #E8E4D9;
}

.privacy-section ul {
    margin-left: 25px;
    margin-bottom: 25px;
}

.privacy-section li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.note {
    font-size: 14px;
    color: #7F8C8D;
    margin-top: 15px;
}

.privacy-policy {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, #FAF9F6 0%, #F5F5DC 100%);
    border-radius: 8px;
    border: 1px solid #E8E4D9;
}

.privacy-policy h4 {
    margin-bottom: 20px;
    color: #1a4d2e;
    font-weight: 700;
}

.privacy-policy p {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.8;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #FAF9F6 100%);
    padding: 40px;
    border-radius: 8px;
    max-width: 550px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 2px solid #D4AF37;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #1a4d2e;
    font-weight: 700;
    font-size: 24px;
}

.modal-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.modal-content button {
    margin-top: 25px;
    float: right;
}

/* 固定免责栏 */
.disclaimer {
    background: linear-gradient(135deg, #1a4d2e 0%, #2D5F3F 100%);
    color: #F5F5DC;
    padding: 25px 0;
    text-align: center;
    position: relative;
    bottom: 0;
    width: 100%;
    border-top: 3px solid #D4AF37;
}

.disclaimer p {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .result-content {
        grid-template-columns: 1fr;
    }

    .input-area {
        flex-direction: column;
    }

    .input-area input {
        width: 100%;
    }

    .data-management {
        flex-direction: column;
    }

    .data-management button {
        width: 100%;
    }

    .back-buttons {
        flex-direction: column;
    }

    .back-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .medication-list {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 30px 0;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .main h2 {
        font-size: 26px;
    }

    .main h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .navbar-brand h1 {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .feature-card {
        padding: 25px;
    }

    #constitution-form,
    #constitution-result,
    .consultation-container,
    #suggestions,
    .medication-section,
    .records-section,
    .privacy-section {
        padding: 25px;
    }

    .modal-content {
        padding: 30px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(212,175,55,.3);
    border-radius: 50%;
    border-top-color: #D4AF37;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #FAF9F6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #B8941F 0%, #9A7B1A 100%);
}
