/* ============================================
   AI 智游攻略生成器 - 海洋主题样式
   ============================================ */

/* ----- CSS 变量 ----- */
:root {
    --primary: #1E88E5;
    --primary-light: #64B5F6;
    --primary-dark: #0D47A1;
    --accent: #FF7043;
    --accent-light: #FFAB91;
    --success: #4CAF50;
    --warning: #FFA726;
    --danger: #EF5350;
    --bg-gradient: linear-gradient(135deg, #0D47A1 0%, #1E88E5 50%, #64B5F6 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #1a2332;
    --text-secondary: #5a6a7a;
    --text-light: #8a9aaa;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ----- 全局样式 ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 背景图片懒加载（由 JS 添加此类后启用） */
html.bg-loaded, html.bg-loaded body {
    background: url('../assets/images/背景.jpg') center/cover no-repeat fixed;
}

html.bg-loaded .ocean-bg {
    background: url('../assets/images/背景.jpg') center/cover no-repeat;
}

body {
    position: relative;
    padding-bottom: 0;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(30, 136, 229, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 136, 229, 0.5);
}

/* ----- 海洋背景动画 ----- */
.ocean-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-gradient);
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50% 50% 0 0;
    animation: wave 8s ease-in-out infinite;
    transform-origin: center bottom;
}

.wave:nth-child(2) {
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    animation-delay: -2s;
    animation-duration: 10s;
}

.wave:nth-child(3) {
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    animation-delay: -4s;
    animation-duration: 12s;
}

@keyframes wave {
    0%, 100% { transform: translateY(0) scaleY(1); }
    25% { transform: translateY(-10px) scaleY(0.95); }
    50% { transform: translateY(5px) scaleY(1.05); }
    75% { transform: translateY(-5px) scaleY(0.98); }
}

/* ----- 启动画面 ----- */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: white;
    width: 100%;
    max-width: 360px;
    padding: 0 20px;
}

.splash-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 2s ease-in-out infinite;
}

.splash-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.splash-sub {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 24px;
}

/* 初始化进度条 */
.splash-progress-container {
    margin: 0 auto 20px;
    width: 100%;
}

.splash-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.splash-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #64B5F6, #ffffff);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.splash-progress-text {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 12px;
    min-height: 20px;
}

/* 初始化步骤列表 */
.splash-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    margin: 0 auto;
    width: 100%;
    max-width: 280px;
}

.splash-step {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.splash-step::before {
    content: '⏳';
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.splash-step.done {
    background: rgba(76, 175, 80, 0.2);
}

.splash-step.done::before {
    content: '✅';
}

.splash-step.active {
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.splash-step.active::before {
    content: '🔄';
    animation: spin 1s linear infinite;
}

.splash-step.error {
    background: rgba(239, 83, 80, 0.2);
}

.splash-step.error::before {
    content: '⚠️';
}

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

.splash-loader {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.splash-loader span {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.splash-loader span:nth-child(2) { animation-delay: -0.16s; }
.splash-loader span:nth-child(3) { animation-delay: -0.32s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ----- 应用容器 ----- */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    padding: 0 0 80px 0;
}

/* ----- 页面通用样式 ----- */
.page {
    display: none;
    padding-top: 60px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.page-content {
    padding: 16px;
    padding-bottom: 100px;
}

/* ----- Logo ----- */
.app-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.nav-icon-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ----- API 状态 ----- */
.api-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
}

.api-status.configured {
    color: var(--success);
}

.api-status.unconfigured {
    color: var(--warning);
}

/* ----- 首页英雄区域 ----- */
.home-hero {
    text-align: center;
    padding: 20px 16px 12px;
    color: white;
}

.hero-text h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero-text p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

/* ----- 按钮样式 ----- */
.btn-icon {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: white;
}

.btn-icon:active {
    transform: scale(0.92);
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
    color: white;
}

.btn-icon-sm:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary.loading {
    opacity: 0.8;
    pointer-events: none;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-secondary {
    padding: 10px 20px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font);
    flex: 1;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: scale(0.97);
}

.btn-secondary.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-secondary.danger:hover {
    background: var(--danger);
    color: white;
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* ----- 输入组件 ----- */
.input-card {
    background:
        linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
        url('../assets/images/边框.jpg') center/cover no-repeat;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.input-group {
    margin-bottom: 14px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8edf2;
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    font-family: var(--font);
    background: #f8fafc;
    color: var(--text-primary);
}

.input-field:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.input-field::placeholder {
    color: var(--text-light);
}

.select-field {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8edf2;
    border-radius: var(--radius-sm);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
    font-family: var(--font);
    background: #f8fafc;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6a7a' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.select-field:focus {
    border-color: var(--primary);
    background-color: white;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.input-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ----- 偏好标签 ----- */
.pref-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pref-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #e8edf2;
    background: #f8fafc;
    color: var(--text-secondary);
    user-select: none;
}

.pref-tag:hover {
    border-color: var(--pref-color, var(--primary-light));
    background: rgba(30, 136, 229, 0.05);
    transform: translateY(-1px);
}

.pref-tag.active {
    border-color: var(--pref-color, var(--primary));
    background: var(--pref-color, var(--primary));
    color: white;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
}

.pref-tag:active {
    transform: scale(0.95);
}

/* ----- 生成按钮 ----- */
.btn-generate {
    margin-top: 18px;
    padding: 16px;
    font-size: 18px;
}

.btn-generate .btn-icon {
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    font-size: 20px;
}

/* ----- 小组件网格 ----- */
.widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.widget-card {
    background:
        linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
        url('../assets/images/边框.jpg') center/cover no-repeat;
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: default;
}

.widget-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.widget-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.widget-content {
    flex: 1;
    min-width: 0;
}

.widget-title {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.widget-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.widget-value.highlight {
    color: var(--accent);
}

.widget-sub {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.widget-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.widget-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    width: 100%;
}

/* 热门目的地列表 */
.trending-list {
    width: 100%;
}

.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: var(--transition);
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item:hover {
    padding-left: 8px;
    color: var(--primary);
}

.trending-name {
    font-size: 14px;
    font-weight: 500;
}

.trending-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* 统计数据 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    width: 100%;
    text-align: center;
}

.stat-item {
    padding: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ----- 攻略详情页 ----- */
.guide-content {
    padding-bottom: 120px;
}

.section-card {
    background:
        linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
        url('../assets/images/边框.jpg') center/cover no-repeat;
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mock-badge {
    text-align: center;
    padding: 8px 12px;
    background: rgba(255, 167, 38, 0.1);
    border: 1px solid rgba(255, 167, 38, 0.3);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--warning);
    margin-bottom: 12px;
}

/* 概览信息 */
.guide-header {
    margin-bottom: 16px;
}

.guide-destination {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.guide-title-icon {
    font-size: 24px;
}

.guide-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-item {
    font-size: 13px;
    color: var(--text-secondary);
    background: #f0f4f8;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-icon {
    font-size: 12px;
}

/* 概览卡片 */
.guide-overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.overview-card {
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.overview-card-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.overview-card-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.overview-card-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* 每日行程卡片 */
.day-card {
    background:
        linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
        url('../assets/images/边框.jpg') center/cover no-repeat;
    border: 1px solid #eef2f7;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.day-card:hover {
    box-shadow: var(--shadow-sm);
}

.day-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8fbff, #f0f5ff);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.day-header:hover {
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
}

.day-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.day-title-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

.day-toggle {
    font-size: 12px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.day-card.collapsed .day-toggle {
    transform: rotate(-90deg);
}

.day-card.collapsed .day-body {
    display: none;
}

.day-body {
    padding: 14px 16px;
}

/* 时间线 */
.day-timeline {
    position: relative;
    padding-left: 20px;
}

.day-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 14px;
    padding-left: 16px;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: white;
}

.timeline-dot.food {
    border-color: var(--warning);
    background: rgba(255, 167, 38, 0.15);
}

.timeline-dot.shop {
    border-color: var(--accent);
    background: rgba(255, 112, 67, 0.15);
}

.timeline-dot.sight {
    border-color: var(--success);
    background: rgba(76, 175, 80, 0.15);
}

.timeline-time {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 2px;
}

.timeline-activity {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.timeline-duration, .timeline-tips {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
    margin-right: 12px;
}

/* 餐饮推荐 */
.day-meals {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef2f7;
}

.meals-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.meals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.meal-item {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.meal-label {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.meal-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meal-cost, .meal-feature {
    font-size: 11px;
    color: var(--text-light);
}

/* 住宿 */
.day-accommodation {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f0f7ff, #e8f0fe);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.accommodation-icon {
    font-size: 28px;
}

.accommodation-name {
    font-size: 14px;
    font-weight: 600;
}

.accommodation-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.accommodation-feature {
    font-size: 12px;
    color: var(--primary);
}

/* 美食推荐网格 */
.food-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.food-card {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 12px;
    transition: var(--transition);
}

.food-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.food-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.food-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.food-type, .food-cost, .food-feature {
    font-size: 12px;
    color: var(--text-secondary);
}

.food-location {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 酒店推荐 */
.hotel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hotel-card {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 12px;
    position: relative;
    transition: var(--transition);
}

.hotel-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.hotel-level {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--primary-light);
    color: white;
}

.hotel-level.舒适 { background: var(--success); }
.hotel-level.豪华 { background: var(--primary-dark); }
.hotel-level.高档 { background: var(--accent); }
.hotel-level.经济 { background: var(--text-light); }

.hotel-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    padding-right: 40px;
}

.hotel-cost {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.hotel-feature {
    font-size: 12px;
    color: var(--text-secondary);
}

.hotel-location {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 注意事项 */
.notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.note-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: #fff8e1;
    border-left: 3px solid var(--warning);
    border-radius: 4px;
}

.note-bullet {
    color: var(--warning);
    font-weight: 700;
}

.note-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 攻略底部操作 */
.guide-actions {
    padding: 10px 0;
}

/* ----- 悬浮 AI 助手按钮 ----- */
.btn-assistant-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(30, 136, 229, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: var(--transition);
    z-index: 50;
    animation: pulse 2s ease-in-out infinite;
}

.btn-assistant-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(30, 136, 229, 0.5);
}

.btn-assistant-float:active {
    transform: scale(0.95);
}

.assistant-float-icon {
    font-size: 22px;
    line-height: 1;
}

.assistant-float-text {
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(30, 136, 229, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(30, 136, 229, 0.6); }
}

/* ----- AI 助手弹窗 ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.assistant-modal {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.assistant-avatar {
    font-size: 22px;
}

.assistant-header-actions {
    display: flex;
    gap: 6px;
}

.assistant-chat {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    min-height: 300px;
    max-height: 50vh;
    background: #f8fafc;
}

.chat-welcome {
    text-align: center;
    padding: 30px 20px;
}

.chat-welcome-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.chat-welcome-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.suggestion-chip {
    padding: 6px 14px;
    background: white;
    border: 1px solid #e8edf2;
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-chip:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: rgba(30, 136, 229, 0.05);
}

/* 聊天气泡 */
.chat-bubble {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    animation: bubbleIn 0.3s ease;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
    flex-direction: row-reverse;
}

.bubble-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.bubble-content {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-bubble.assistant .bubble-content {
    background: white;
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.chat-bubble.user .bubble-content {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
}

/* 输入区域 */
.assistant-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eef2f7;
    background: white;
}

.assistant-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e8edf2;
    border-radius: var(--radius-full);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    font-family: var(--font);
}

.assistant-input:focus {
    border-color: var(--primary);
}

.btn-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send:hover {
    transform: scale(1.1);
}

.btn-send:active {
    transform: scale(0.95);
}

/* 聊天加载 */
.chat-loading {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 0;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
    animation: typing 1.4s ease-in-out infinite both;
}

.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator span:nth-child(3) { animation-delay: -0.32s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* ----- 途经点编辑页 ----- */
.waypoint-map-container {
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.waypoint-list {
    min-height: 80px;
}

.waypoint-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: grab;
    transition: var(--transition);
    border: 1px solid #eef2f7;
}

.waypoint-item:hover {
    border-color: var(--primary-light);
    background: #f0f7ff;
}

.waypoint-item.dragging {
    opacity: 0.5;
    border-style: dashed;
}

.waypoint-order {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.waypoint-info {
    flex: 1;
    min-width: 0;
}

.waypoint-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.waypoint-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.waypoint-actions {
    display: flex;
    gap: 6px;
}

.btn-delete-waypoint {
    background: transparent !important;
    font-size: 16px !important;
}

.btn-delete-waypoint:hover {
    background: rgba(239, 83, 80, 0.1) !important;
}

/* 推荐途经点 */
.recommend-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.recommend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recommend-card {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid #eef2f7;
    transition: var(--transition);
}

.recommend-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.recommend-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.recommend-type {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 4px;
}

.recommend-desc, .recommend-duration, .recommend-reason {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.btn-add-recommend {
    width: 100%;
    padding: 6px;
    margin-top: 8px;
    border: 1px solid var(--primary);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.btn-add-recommend:hover {
    background: var(--primary);
    color: white;
}

/* ----- 设置页 ----- */
.settings-content {
    padding-bottom: 100px;
}

.test-result {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.test-result.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.test-result.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.about-card {
    text-align: center;
    margin-top: 20px;
}

.about-info {
    padding: 10px;
}

.about-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.about-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.about-version {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.about-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ----- 历史记录页 ----- */
.history-list {
    min-height: 200px;
}

.history-card {
    background:
        linear-gradient(rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
        url('../assets/images/边框.jpg') center/cover no-repeat;
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
}

.history-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.history-card.favorited {
    border-left: 3px solid var(--accent);
}

.history-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.history-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-destination {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.history-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.history-preferences {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pref-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(30, 136, 229, 0.1);
    color: var(--primary);
}

.history-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* ----- 底部导航 ----- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0,0,0,0.06);
    z-index: 100;
    padding: 0 4px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-item:hover {
    background: rgba(30, 136, 229, 0.05);
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-item.active .nav-label {
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

.nav-icon {
    font-size: 22px;
    transition: transform 0.2s ease;
}

.nav-label {
    font-size: 10px;
    color: var(--text-light);
    transition: var(--transition);
}

/* ----- Toast 消息 ----- */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    max-width: 400px;
    width: calc(100% - 32px);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex !important;
    align-items: center;
    gap: 8px;
    z-index: 300;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--primary); }

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}

.toast-close {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-light);
    padding: 2px;
    line-height: 1;
}

/* ----- 加载遮罩 ----- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 400;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
    animation: overlayIn 0.3s ease;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.wave-loader {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.wave-loader span {
    width: 8px;
    height: 40px;
    background: linear-gradient(to top, var(--primary-light), white);
    border-radius: 4px;
    animation: waveLoading 1.2s ease-in-out infinite;
}

.wave-loader span:nth-child(2) { animation-delay: 0.1s; }
.wave-loader span:nth-child(3) { animation-delay: 0.2s; }
.wave-loader span:nth-child(4) { animation-delay: 0.3s; }
.wave-loader span:nth-child(5) { animation-delay: 0.4s; }

@keyframes waveLoading {
    0%, 100% { height: 20px; }
    50% { height: 50px; }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.loading-sub {
    font-size: 13px;
    opacity: 0.7;
}

/* 生成按钮加载动画 */
.btn-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ----- 空状态 ----- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.empty-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 13px;
    color: var(--text-light);
}

/* ----- 地图容器（移动端防滚动冲突） ----- */
.leaflet-container {
    touch-action: none;
}

/* 地图弹出框样式 */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.custom-popup .leaflet-popup-content {
    margin: 8px 12px;
}

.leaflet-popup-close-button {
    font-size: 16px !important;
    padding: 4px !important;
}

/* 地图标记删除按钮 */
.marker-delete-btn:hover {
    color: #D32F2F !important;
    text-decoration: underline;
}

/* 地图标记序号 */
.marker-label {
    background: transparent !important;
    border: none !important;
}

.marker-label-text {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(30, 136, 229, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.map-section {
    padding: 14px;
}

/* ----- 响应式设计 ----- */
/* 平板 */
@media (min-width: 768px) {
    .app-container {
        max-width: 600px;
    }
    .page-header {
        max-width: 600px;
    }
    .bottom-nav {
        max-width: 600px;
    }
    .assistant-modal {
        max-width: 500px;
        margin-bottom: 20px;
        border-radius: var(--radius-xl);
    }
    .modal-overlay {
        align-items: center;
    }
    .food-grid, .hotel-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .home-hero {
        padding: 30px 16px 16px;
    }
    .hero-text h1 {
        font-size: 32px;
    }
}

/* 桌面 */
@media (min-width: 1024px) {
    .app-container {
        max-width: 720px;
    }
    .page-header {
        max-width: 720px;
    }
    .bottom-nav {
        max-width: 720px;
    }
    .guide-overview-cards {
        grid-template-columns: repeat(4, 1fr);
    }
    .meals-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .widgets-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
    .input-row {
        gap: 14px;
    }
}

/* 小屏手机适配 */
@media (max-width: 374px) {
    .hero-text h1 {
        font-size: 22px;
    }
    .input-row {
        grid-template-columns: 1fr;
    }
    .widgets-grid {
        grid-template-columns: 1fr;
    }
    .food-grid, .hotel-grid {
        grid-template-columns: 1fr;
    }
    .recommend-grid {
        grid-template-columns: 1fr;
    }
    .guide-overview-cards {
        grid-template-columns: 1fr 1fr;
    }
    .meals-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* 打印样式 */
@media print {
    .bottom-nav,
    .page-header,
    .btn-assistant-float,
    .btn-generate,
    .guide-actions,
    .modal-overlay,
    .toast,
    .loading-overlay {
        display: none !important;
    }
    .page {
        display: block !important;
        padding-top: 0 !important;
    }
    .page:not(.active) {
        display: none !important;
    }
    .ocean-bg {
        display: none;
    }
    body {
        background: white;
    }
    .section-card, .day-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ----- 辅助动画 ----- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ----- 工具类 ----- */
.no-data {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 13px;
}

/* 路线标记具体样式增强 */
.leaflet-marker-icon.marker-label {
    margin-left: -10px !important;
    margin-top: -30px !important;
}

/* ============================================
   新增：景点与食宿详情查看系统
   ============================================ */

/* 详情入口按钮 */
.detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    color: #fff;
    background: #64B5F6;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-left: auto;
    flex-shrink: 0;
    font-family: var(--font);
    line-height: 1.4;
}

.detail-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(100, 181, 246, 0.4);
}

.detail-btn:active {
    transform: scale(0.95);
}

/* 详情弹窗遮罩 */
.detail-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

/* 详情弹窗容器 */
.detail-modal {
    width: 92%;
    max-width: 560px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 弹窗头部 */
.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f8fbff, #f0f5ff);
}

.modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #0D47A1;
    flex: 1;
    line-height: 1.3;
}

.modal-score {
    font-size: 14px;
    color: #FF7043;
    font-weight: 500;
    white-space: nowrap;
}

.modal-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    background: #e8e8e8;
}

/* 图片展示区 */
.modal-image-slider {
    position: relative;
    width: 100%;
    height: 280px;
    background: #f0f4f8;
    overflow: hidden;
}

.image-list {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s ease;
}

.image-list img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    line-height: 1;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}

.slider-btn.prev {
    left: 12px;
}

.slider-btn.next {
    right: 12px;
}

.image-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 15px;
    flex-direction: column;
    gap: 8px;
}

/* 评价展示区 */
.modal-reviews {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
    max-height: 300px;
}

.modal-reviews h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.review-empty {
    text-align: center;
    padding: 24px;
    color: #999;
    font-size: 14px;
}

.review-card {
    padding: 12px 14px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
}

.review-card:last-child {
    margin-bottom: 0;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 12px;
    color: #999;
}

.review-content {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .detail-modal {
        width: 95%;
        max-height: 90vh;
    }
    .modal-image-slider {
        height: 220px;
    }
    .detail-btn {
        padding: 3px 8px;
        font-size: 11px;
    }
    .modal-reviews {
        max-height: 250px;
    }
}

@media (max-width: 374px) {
    .detail-btn {
        padding: 2px 6px;
        font-size: 10px;
        min-width: 36px;
        justify-content: center;
    }
    .modal-image-slider {
        height: 180px;
    }
    .modal-header {
        padding: 12px 14px;
    }
    .modal-title {
        font-size: 15px;
    }
}

/* ===== 图片弹窗布局修复（追加） ===== */

/* 修复图片区域溢出问题 */
.modal-image-slider {
    position: relative;
    width: 100%;
    height: 280px;
    background: #f8f9fa;
    overflow: hidden !important; /* 强制隐藏溢出，彻底解决右侧乱码 */
}

.image-list {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.image-item {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
}

/* 占位图样式优化 */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 100%);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .modal-image-slider {
        height: 220px;
    }
}

/* ===== 新增：途经城市选择弹窗 ===== */
.waycity-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.waycity-modal {
    width: 92%;
    max-width: 520px;
    max-height: 85vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    animation: modalIn 0.25s ease;
}

.waycity-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fbff, #e8f0fe);
    border-bottom: 1px solid #eef2f7;
}

.waycity-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #0D47A1;
    flex: 1;
}

.waycity-info {
    font-size: 12px;
    color: #1E88E5;
    background: rgba(30,136,229,0.1);
    padding: 3px 10px;
    border-radius: 12px;
}

.waycity-close {
    width: 28px; height: 28px;
    border: none;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waycity-body {
    padding: 14px 20px;
    overflow-y: auto;
    flex: 1;
}

.waycity-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #eef2f7;
    transition: border-color 0.2s;
}

.waycity-card:hover {
    border-color: #64B5F6;
}

.waycity-check {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.waycity-cb {
    width: 18px;
    height: 18px;
    accent-color: #1E88E5;
    cursor: pointer;
}

.waycity-info {
    flex: 1;
    min-width: 0;
}

.waycity-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a2332;
    margin-bottom: 4px;
}

.waycity-highlights {
    font-size: 12px;
    color: #1E88E5;
    margin-bottom: 4px;
}

.waycity-reason {
    font-size: 12px;
    color: #5a6a7a;
    margin-bottom: 8px;
}

.waycity-days-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}

.days-label {
    font-size: 12px;
    color: #8a9aaa;
}

.days-btn {
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.days-btn.active {
    background: #1E88E5;
    color: #fff;
    border-color: #1E88E5;
}

.days-btn:hover:not(.active) {
    border-color: #64B5F6;
}

.waycity-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
}

.waycity-footer .btn-secondary {
    flex: 1;
    font-size: 13px;
}

.waycity-footer .btn-primary {
    flex: 1;
    font-size: 13px;
}

/* ===== 新增：出行方式选择标签 ===== */
.travel-type-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.travel-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid #e8edf2;
    background: #f8fafc;
    color: var(--text-secondary);
    user-select: none;
}

.travel-tag:hover {
    border-color: var(--primary-light);
    background: rgba(30, 136, 229, 0.05);
    transform: translateY(-1px);
}

.travel-tag.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.2);
}

.travel-tag:active {
    transform: scale(0.95);
}

/* ===== 新增：同行人折叠面板 ===== */
.companion-panel {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #eef2f7;
}

.companion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.companion-header:hover {
    background: #f8fafc;
}

.companion-toggle {
    font-size: 12px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.companion-panel.expanded .companion-toggle {
    transform: rotate(180deg);
}

.companion-panel:not(.expanded) .companion-body {
    display: none;
}

.companion-body {
    padding: 4px 16px 16px;
    border-top: 1px solid #eef2f7;
}

.companion-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.companion-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 0;
}

.companion-label {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 22px;
    background: #ddd;
    border-radius: 11px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-input:checked + .toggle-slider::after {
    transform: translateX(18px);
}

.companion-age {
    width: 80px !important;
    flex-shrink: 0;
    text-align: center;
}

.companion-age:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.companion-hint {
    font-size: 12px;
    color: var(--text-light);
    flex: 1;
}

/* ===== 途经点编辑器增强样式 ===== */
.wp-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.wp-search-input {
    flex: 1;
}

.wp-search-btn {
    flex-shrink: 0;
}

.wp-add-mode-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.wp-add-mode-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.wp-list-items {
    max-height: 400px;
    overflow-y: auto;
}

.waypoint-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.2s;
    border: 1px solid #eef2f7;
}

.waypoint-item:hover {
    border-color: var(--primary-light);
    background: #f0f7ff;
}

.waypoint-item.dragging {
    opacity: 0.4;
    border-style: dashed;
}

.waypoint-item.invalid {
    border-left: 3px solid #EF5350;
}

.waypoint-order-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.waypoint-info {
    flex: 1;
    min-width: 0;
}

.waypoint-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.waypoint-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.waypoint-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-move-up, .btn-move-down, .btn-delete-wp {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-move-up:hover, .btn-move-down:hover {
    background: rgba(30,136,229,0.1);
}

.btn-delete-wp:hover {
    background: rgba(239,83,80,0.1);
}

.wp-update-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

.wp-update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .wp-search-row {
        flex-direction: column;
    }
    .waypoint-actions {
        gap: 2px;
    }
    .btn-move-up, .btn-move-down, .btn-delete-wp {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}

/* ===== 新增：更新确认弹窗 ===== */
.update-confirm-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.update-confirm-modal {
    width: 88%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    animation: modalIn 0.25s ease;
}

.update-confirm-header {
    padding: 18px 20px 0;
}

.update-confirm-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0D47A1;
}

.update-confirm-body {
    padding: 12px 20px 20px;
}

.update-confirm-body p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #5a6a7a;
    line-height: 1.5;
}

.update-confirm-body p:last-child {
    margin-bottom: 0;
}

.update-confirm-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eef2f7;
    background: #fafbfc;
}

.update-confirm-footer .btn-secondary {
    flex: 1;
}

.update-confirm-footer .btn-primary {
    flex: 1;
}

.update-confirm-footer .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== 行政区划搜索结果 ===== */
.wp-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 2px;
}

.wp-search-row {
    position: relative;
}

.wp-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f5f5f5;
}

.wp-search-item:last-child {
    border-bottom: none;
}

.wp-search-item:hover {
    background: #f0f7ff;
}

.wp-search-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #1a2332;
}

.wp-search-item-level {
    font-size: 11px;
    color: #8a9aaa;
    background: #f0f4f8;
    padding: 2px 8px;
    border-radius: 8px;
}
