:root {
    /* 旅游/自然/高级呼吸感配色 */
    --primary: #2C5F2D; /* 沉稳的森林绿，主色调 */
    --primary-light: #97BC62; /* 浅草绿，用于点缀和渐变 */
    --bg-color: #F0F0E8; /* 浅沙色/燕麦色背景，比纯白更温和高级 */
    --card-bg: #FAFAFA; /* 极浅的暖白卡片 */
    --text-main: #2C3E2D; /* 深墨绿作为主文字，代替死板的纯黑 */
    --text-muted: #7A8B7A; /* 灰绿色作为次要文字 */
    --ai-bg: #E8EFE3; /* AI区域的浅青色背景 */
    --ai-text: #2C5F2D; /* AI文字深绿 */
    --input-bg: #EAEAE0; /* 输入框背景，融入沙色 */
    --border-color: #E2E2D6; /* 柔和的边框色 */
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0; /* 移除 body 的 padding */
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 100%; /* 移除之前的 400px 限制，允许全屏 */
    background: var(--card-bg);
    border-radius: 0; /* 移除大圆角，因为已经是全屏了 */
    box-shadow: none; /* 移除阴影 */
    padding: 20px 24px; /* 适配手机的边缘留白 */
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 让容器撑满整个屏幕高度 */
    max-height: none; /* 移除最大高度限制 */
    border: none; /* 移除边框 */
    overflow-x: hidden;
}

.page { display: none; opacity: 0; height: 100%; flex-direction: column; }
.page.active { display: flex; animation: fadeIn 0.6s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 { color: var(--text-main); font-size: 24px; margin-bottom: 8px; }
p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

/* --- 首页艺术感布局 (极简大排版) --- */
#homePage {
    justify-content: center;
    padding-top: 40px; /* 全屏模式下，顶部留白稍微加大 */
    position: relative;
    z-index: 1;
}

/* 增加高级感背景光晕/几何图形 */
.deco-circle {
    position: absolute;
    top: -20vw; /* 改用视口单位，适应全屏 */
    right: -20vw;
    width: 70vw;
    height: 70vw;
    max-width: 400px;
    max-height: 400px;
    background: radial-gradient(circle, rgba(151,188,98,0.15) 0%, rgba(151,188,98,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.home-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.typography-hero {
    text-align: left;
    padding: 0 10px;
}

.tag-line {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.en-deco {
    font-size: 10px;
    color: #A0AFA0;
    letter-spacing: 2px;
    font-weight: 400;
    text-transform: uppercase;
}

.art-title {
    font-size: 38px; /* 中文稍微缩小一点，避免太满 */
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.25; /* 中文行高稍微拉大一点 */
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
    /* 
       高级原生系统字体栈 (System Font Stack) - 衬线体/明朝体优先
       苹果系: Songti SC (华文宋体), STSong, STKaiti (华文楷体)
       Windows系: KaiTi (楷体), SimSun (中易宋体)
       兜底: serif
    */
    font-family: "Songti SC", "STSong", "STKaiti", "KaiTi", "SimSun", "Times New Roman", serif;
}

.art-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    font-family: "Songti SC", "STSong", "STKaiti", "KaiTi", "SimSun", "Times New Roman", serif;
}

.home-interaction {
    width: 100%;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #D0D0C8;
    padding-bottom: 8px;
    transition: border-color 0.4s ease;
}

.input-wrapper:focus-within {
    border-bottom-color: var(--primary);
}

input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 18px;
    color: var(--text-main);
    outline: none;
    margin: 0;
    text-align: left;
    box-shadow: none !important;
    position: relative;
    z-index: 2; /* 确保输入框在动态提示词上方 */
}

/* 动态提示词样式 */
.dynamic-placeholder {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-65%);
    color: #B0C0B0;
    font-size: 18px;
    font-weight: 300;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1;
}

/* 当输入框有内容或聚焦时隐藏模拟的提示词 */
input:focus ~ .dynamic-placeholder,
input:not(:placeholder-shown) ~ .dynamic-placeholder {
    opacity: 0;
}

.icon-submit-btn {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.2);
    position: absolute;
    right: 0;
    padding: 0;
    z-index: 3;
}
.icon-submit-btn:hover { 
    transform: scale(1.1) rotate(-15deg); /* 增加一点俏皮的旋转 */
    background: #1E421F; 
}

.secondary-actions {
    margin-top: 20px;
    text-align: left;
}

.text-btn {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    display: inline-flex;
    align-items: center;
    opacity: 0.8;
}
.text-btn:hover { 
    color: var(--primary); 
    opacity: 1;
    transform: translateX(4px); /* 悬停时微小的位移暗示 */
}

/* 覆盖之前多余的按钮和输入框全局样式 */
.action-row, .action-btn { display: none; }
input:focus {
    border-color: var(--primary-light);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(151, 188, 98, 0.15); /* 浅绿光环 */
}

button {
    background: linear-gradient(135deg, var(--primary) 0%, #4A7A4A 100%); /* 沉稳绿渐变 */
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 16px rgba(44, 95, 45, 0.2);
    width: 100%;
}
button:hover { transform: translateY(-2px); box-shadow: 0 12px 20px rgba(44, 95, 45, 0.3); }
button:active { transform: translateY(0); }

.action-row { display: flex; gap: 12px; margin-top: 10px; }
.action-btn { flex: 1; margin: 0; }
.action-btn:nth-child(2) {
    background: var(--input-bg);
    color: var(--primary);
    border: none;
    box-shadow: none;
}
.action-btn:nth-child(2):hover { background: #DFDFD3; }


#resultList, #historyList {
    margin-top: 10px;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    scrollbar-width: none;
}
#resultList::-webkit-scrollbar, #historyList::-webkit-scrollbar { display: none; }

.history-item {
    background: transparent;
    border-radius: 0;
    padding: 16px 0;
    margin-bottom: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.history-item:last-child { border-bottom: none; }

/* 悬停时整个条目背景微变，并在左侧浮现一个绿色的指示条 */
.history-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary);
    transition: height 0.3s ease;
}
.history-item:hover { 
    background: rgba(255, 255, 255, 0.4); 
    padding-left: 10px; /* 悬停时文字微微右移 */
    transform: none; /* 去掉之前的整体位移 */
}
.history-item:hover::before {
    height: 60%; /* 悬停时左侧绿线长出来 */
}

.history-demand { 
    margin: 0; 
    color: var(--text-main); 
    font-weight: 800; 
    font-size: 16px; 
    line-height: 1.4;
    font-family: "Songti SC", "STSong", "KaiTi", serif; /* 需求内容使用宋体，增加文学感 */
}
.history-time { 
    margin: 0; 
    color: #A0AFA0; 
    font-size: 11px; 
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 历史记录里的餐厅预览标签 */
.history-preview {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.history-preview-tag {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--input-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 居左对齐 */
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    margin-top: 10px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px 0 8px; /* 调整内边距，让它看起来更紧凑 */
    background: transparent; /* 去除色块背景，使其变轻盈 */
    color: var(--text-muted); /* 默认颜色变浅，不抢戏 */
    border: 1px solid var(--border-color); /* 极细的边框维持按钮形状 */
    border-radius: 19px;
    font-size: 13px; /* 字体稍微缩小，增加精致感 */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}
.back-btn:hover { 
    background: transparent; 
    color: var(--text-main); /* 悬停时颜色变深，提供反馈 */
    border-color: #B0C0B0; /* 边框稍微变深 */
    transform: translateX(-4px); 
}
.back-btn svg {
    transition: transform 0.3s ease;
    opacity: 0.8;
}
.back-btn:hover svg {
    transform: translateX(-2px);
    opacity: 1;
}

/* --- 等待页高级艺术感布局 --- */
#loadingPage {
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 1;
    background: transparent;
}

.loading-art-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

/* 智能雷达波纹动画 */
.radar-pulse {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-core {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: 800;
    font-family: "Songti SC", serif;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(44, 95, 45, 0.4);
}

.radar-pulse .circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid var(--primary-light);
    opacity: 0;
    animation: pulseWave 3s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.circle-1 { width: 40px; height: 40px; animation-delay: 0s; }
.circle-2 { width: 40px; height: 40px; animation-delay: 1s; }
.circle-3 { width: 40px; height: 40px; animation-delay: 2s; }

@keyframes pulseWave {
    0% { width: 40px; height: 40px; opacity: 1; border-width: 2px; }
    100% { width: 160px; height: 160px; opacity: 0; border-width: 0px; }
}

/* 加载文案排版 */
.loading-title {
    font-size: 22px;
    color: var(--text-main);
    margin-bottom: 24px;
    font-family: "Songti SC", "STSong", "KaiTi", serif;
    font-weight: 800;
    letter-spacing: 2px;
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
}

.step-item {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.3;
    transition: all 0.5s ease;
    transform: translateY(5px);
}

.step-item.step-active {
    opacity: 1;
    color: var(--primary);
    transform: translateY(0);
    font-weight: 500;
}


/* 卡片样式 (高级排版) */
.card {
    background: transparent; /* 去除卡片底色，融入背景 */
    border-radius: 0;
    padding: 0 0 30px 0;
    margin-bottom: 30px;
    box-shadow: none;
    border: none;
    border-bottom: 1px dashed #D0D0C8; /* 虚线分割，像手账本 */
    text-align: left;
    position: relative;
}
.card:last-child { border-bottom: none; }
.card:hover { transform: none; box-shadow: none; } /* 移除悬停浮动效果 */

/* 卡片标题区 */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card h3 { 
    margin: 0; 
    font-size: 20px; 
    color: var(--text-main); 
    font-weight: 800; 
    line-height: 1.4;
    flex: 1;
    padding-right: 15px;
}

/* 餐厅类型徽章 */
.restaurant-type {
    display: inline-block;
    font-size: 11px;
    color: var(--text-muted);
    background: #EAEAE0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* 评分数字巨大化处理 */
.rating-badge {
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 8px 8px 8px 2px; /* 特殊的异形圆角 */
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.rating-badge span { font-size: 10px; font-weight: 400; opacity: 0.8; margin-top: 2px; }

/* 基础信息行：距离、人均、营业时间 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
    background: var(--card-bg);
    padding: 12px;
    border-radius: 12px;
}
.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.info-label { font-size: 11px; color: #A0AFA0; }
.info-value { font-size: 13px; color: var(--text-main); font-weight: 600; }

/* 特色内容区块 */
.feature-section {
    margin-bottom: 20px;
}
.feature-title {
    font-size: 11px;
    color: #A0AFA0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.feature-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
}

.tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
}
.tag { 
    background: transparent; 
    color: var(--primary); 
    padding: 3px 8px; 
    border-radius: 4px; 
    font-size: 12px; 
    font-weight: 500; 
    border: 1px solid rgba(44, 95, 45, 0.2); 
    white-space: nowrap; /* 保持标签不换行 */
}

/* AI推荐理由 - 杂志引言风格 */
.ai-reason {
    background: transparent;
    border-radius: 0;
    padding: 0 0 0 16px;
    margin-top: 0;
    position: relative;
    border-left: 2px solid var(--primary-light); /* 左侧细线 */
}
.ai-reason::before { content: none; } /* 移除旧的粗线 */
.ai-reason-title { 
    color: var(--primary); 
    font-size: 11px; 
    font-weight: 800; 
    margin-bottom: 8px; 
    letter-spacing: 1px;
    text-transform: uppercase;
}
.ai-reason p { 
    color: var(--text-muted); 
    font-size: 14px; 
    margin: 0; 
    line-height: 1.7; 
    font-family: "Songti SC", "STSong", "KaiTi", serif; /* 推荐理由使用宋体，增加阅读沉浸感 */
}

.hidden {
    display: none !important;
}

/* --- 独立用户模块：右上角悬浮 --- */
.home-header {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.user-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
}

.user-status-text {
    font-size: 12px;
    color: var(--text-main);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.user-actions-art {
    display: flex;
    gap: 12px;
    margin-left: 4px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.art-link {
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.art-link:hover {
    color: var(--primary);
}

/* --- 艺术感登录注册页 --- */
.auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
    position: relative;
}

.auth-back {
    position: absolute;
    top: 20px;
    left: 0;
    border: none;
}

.auth-art {
    margin-bottom: 50px;
    margin-top: 40px;
}

.auth-content-art {
    width: 100%;
    max-width: 320px;
}

.auth-tabs-art {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    font-family: "Songti SC", "STSong", "KaiTi", serif;
    font-size: 22px;
}

.art-tab {
    color: #A0AFA0;
    cursor: pointer;
    transition: color 0.4s;
    position: relative;
}

.art-tab.active {
    color: var(--text-main);
    font-weight: 800;
}

.art-tab.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.tab-divider {
    color: var(--border-color);
    font-weight: 300;
    font-size: 20px;
}

.auth-form-art {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 悬浮标签输入框 */
.input-group {
    position: relative;
    width: 100%;
}

.input-group input {
    width: 100%;
    height: 40px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    padding: 10px 0 4px 0;
    font-size: 16px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.3s;
    box-shadow: none;
}

.input-group label {
    position: absolute;
    top: 12px;
    left: 0;
    font-size: 15px;
    color: #A0AFA0;
    pointer-events: none;
    transition: all 0.3s ease;
    font-family: "Songti SC", "STSong", "KaiTi", serif;
}

.input-group input:focus,
.input-group input:valid {
    border-bottom-color: var(--primary);
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -10px;
    font-size: 11px;
    color: var(--primary);
}

.art-submit-btn {
    background: var(--text-main);
    color: var(--bg-color);
    border-radius: 0;
    height: 48px;
    margin-top: 16px;
    font-family: "Songti SC", "STSong", "KaiTi", serif;
    font-size: 16px;
    letter-spacing: 4px;
    box-shadow: none;
}

.art-submit-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(44, 95, 45, 0.15);
}

.auth-message {
    min-height: 20px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.auth-message.error {
    color: #B94A48;
}

.auth-message.success {
    color: var(--primary);
}

.get-code-btn {
    position: absolute;
    right: 0;
    bottom: 8px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 4px 12px;
    font-size: 12px;
    height: auto;
    width: auto;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.get-code-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.get-code-btn:disabled {
    color: #A0AFA0;
    border-color: #D0D0C8;
    background: transparent;
    cursor: not-allowed;
    transform: none;
}

/* --- 底部备案号 --- */
.beian-footer {
    position: absolute;
    bottom: 24px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.beian-footer .beian-text {
    color: var(--text-muted);
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: color 0.3s ease;
    letter-spacing: 0.5px;
    opacity: 0.7;
    cursor: default; /* 纯文本使用默认指针 */
}

.beian-footer .beian-text:hover {
    color: var(--primary);
    opacity: 1;
}

.beian-footer .gongan-beian img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}