/* ============================================
   吉隆坡 & 槟城旅游攻略 - 度假风格样式
   ============================================ */

/* CSS Variables */
:root {
  --primary: #FF6B35;
  --primary-light: #FF8C5A;
  --primary-dark: #E55A2B;
  --secondary: #2EC4B6;
  --secondary-light: #4DD4C8;
  --accent: #FFD166;
  --accent-dark: #F0C040;
  --danger: #EF476F;
  --dark: #1A1A2E;
  --dark-light: #2D2D44;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg: #FFF8F0;
  --bg-card: #FFFFFF;
  --bg-sidebar: #FFFAF5;
  --border: #F0E6D8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: all 0.3s ease;
  --font-cn: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-cn);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; font-family: inherit; }

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--danger) 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(255,107,53,0.3);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
}

.header-logo .logo-icon {
  font-size: 1.8rem;
}

.header-date {
  font-size: 0.85rem;
  opacity: 0.9;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 0 24px 0;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-tab {
  padding: 10px 20px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: none;
  border-radius: 12px 12px 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
}

.nav-tab:hover {
  background: rgba(255,255,255,0.2);
  color: white;
}

.nav-tab.active {
  background: var(--bg);
  color: var(--primary);
  font-weight: 700;
}

.nav-tab .tab-emoji {
  margin-right: 6px;
}

/* ============================================
   Main Layout
   ============================================ */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 120px);
}

.page { display: none; }
.page.active { display: block; }

/* ============================================
   Overview Page (首页时间线)
   ============================================ */
.overview-hero {
  background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 50%, #FFD166 100%);
  border-radius: var(--radius);
  padding: 40px;
  color: white;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.overview-hero::before {
  content: '🌴';
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 80px;
  opacity: 0.2;
}

.overview-hero h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.overview-hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.overview-hero .cny-badge {
  display: inline-block;
  background: var(--danger);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-top: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.travelers-bar {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.traveler-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--primary);
  z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
  background: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary);
}

.timeline-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
}

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

.timeline-item:nth-child(even) .timeline-card {
  border-left-color: var(--secondary);
}

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

.timeline-date .date-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.timeline-item:nth-child(even) .date-num {
  color: var(--secondary);
}

.timeline-date .date-info {
  font-size: 0.85rem;
  color: var(--text-light);
}

.timeline-date .lunar-badge {
  background: var(--danger);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.timeline-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag-hotel {
  background: #EDE7F6;
  color: #5E35B1;
}

.tag-transport {
  background: #E3F2FD;
  color: #1565C0;
}

.tag-food {
  background: #FFF3E0;
  color: #E65100;
}

.tag-spring {
  background: #FCE4EC;
  color: #C62828;
}

/* ============================================
   Transport Cards
   ============================================ */
.transport-section {
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.transport-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.transport-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--secondary);
}

.transport-card .tc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.transport-card .tc-icon {
  font-size: 2rem;
}

.transport-card .tc-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.transport-card .tc-detail {
  font-size: 0.85rem;
  color: var(--text-light);
}

.transport-card .tc-route {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 12px 0;
}

.tc-route .tc-point {
  flex: 1;
  text-align: center;
}

.tc-route .tc-point .tc-time {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
}

.tc-route .tc-point .tc-place {
  font-size: 0.8rem;
  color: var(--text-light);
}

.tc-route .tc-arrow {
  font-size: 1.5rem;
  color: var(--secondary);
}

.tc-info {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.8;
}

.tc-info strong {
  color: var(--text);
}

/* ============================================
   Hotel Cards
   ============================================ */
.hotel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.hotel-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

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

.hotel-card .hc-image {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hotel-card .hc-dates {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
}

.hotel-card .hc-body {
  padding: 20px;
}

.hotel-card .hc-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hotel-card .hc-name-en {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.hotel-card .hc-info {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.8;
}

.hotel-card .hc-rooms {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.hotel-card .room-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  padding: 4px 0;
}

.room-item .room-type {
  background: #E8F5E9;
  color: #2E7D32;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}

/* ============================================
   Map Page Layout
   ============================================ */
.map-page-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - 180px);
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  min-height: 500px;
}

#map-kl, #map-penang-west, #map-penang-george {
  width: 100%;
  height: 100%;
}

.map-overlay-controls {
  position: absolute;
  top: 12px;
  left: 60px;
  z-index: 999;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.map-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: white;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  border: 2px solid transparent;
  transition: var(--transition);
}

.map-filter-btn:hover { background: #f5f5f5; }

.map-filter-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  background: #FFF3E8;
}

/* Sidebar */
.sidebar {
  background: var(--bg-sidebar);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-count {
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.sidebar-footer {
  padding: 16px 20px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

/* POI List in Sidebar */
.poi-list-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.poi-list-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.poi-list-item.selected {
  border-color: var(--primary);
  background: #FFF8F2;
}

.poi-list-item .poi-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-xs);
  object-fit: cover;
  flex-shrink: 0;
}

.poi-list-item .poi-info {
  flex: 1;
  min-width: 0;
}

.poi-list-item .poi-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.poi-list-item .poi-name .must-badge {
  background: var(--danger);
  color: white;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.65rem;
}

.poi-list-item .poi-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.poi-list-item .poi-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.poi-select-btn {
  align-self: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 1rem;
}

.poi-select-btn.selected {
  background: var(--primary);
  color: white;
}

/* ============================================
   POI Detail Modal
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: var(--transition);
}

.modal-close:hover { background: rgba(0,0,0,0.7); }

.modal-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.modal-body {
  padding: 24px;
}

.modal-body h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.modal-body .modal-name-en {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-info-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
}

.modal-info-item .info-icon {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.modal-info-item .info-label {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.modal-description {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-light);
  margin-bottom: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.modal-tips {
  padding: 16px;
  background: #FFF8E1;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.modal-tips::before {
  content: '💡 小贴士';
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent-dark);
}

.modal-warning {
  padding: 12px 16px;
  background: #FFEBEE;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #C62828;
}

.modal-must-try {
  margin-bottom: 16px;
}

.modal-must-try h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.must-try-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.must-try-tag {
  background: #FFF3E0;
  color: #E65100;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.modal-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary:hover { background: var(--primary-dark); }

.btn-primary.selected {
  background: var(--secondary);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover { background: #FFF3E8; }

.btn-generate {
  background: linear-gradient(135deg, var(--primary), var(--danger));
  color: white;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}

/* ============================================
   Itinerary Page
   ============================================ */
.itinerary-container {
  max-width: 900px;
  margin: 0 auto;
}

.day-plan {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.day-plan-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-plan-header h3 {
  font-size: 1.2rem;
}

.day-plan-header .day-weather {
  font-size: 0.85rem;
  opacity: 0.9;
}

.day-plan-body {
  padding: 20px 24px;
}

.plan-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.plan-time {
  width: 80px;
  flex-shrink: 0;
  text-align: center;
}

.plan-time .time {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.plan-time .period {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.plan-content {
  flex: 1;
}

.plan-content .plan-name {
  font-weight: 700;
  margin-bottom: 4px;
}

.plan-content .plan-desc {
  font-size: 0.85rem;
  color: var(--text-light);
}

.plan-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
}

.plan-type-food { background: #FFF3E0; color: #E65100; }
.plan-type-attraction { background: #E3F2FD; color: #1565C0; }
.plan-type-transport { background: #F3E5F5; color: #7B1FA2; }
.plan-type-hotel { background: #E8F5E9; color: #2E7D32; }
.plan-type-rest { background: #ECEFF1; color: #546E7A; }

/* Day Plan Map */
.day-plan-map {
  height: 300px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  overflow: hidden;
}

/* ============================================
   My Selections Panel
   ============================================ */
.my-selections {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.selection-day {
  margin-bottom: 16px;
}

.selection-day h4 {
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

.selection-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius-xs);
  margin-bottom: 4px;
  font-size: 0.85rem;
}

.selection-item .remove-btn {
  background: none;
  color: var(--danger);
  font-size: 1.2rem;
  padding: 0 4px;
}

/* ============================================
   Info Page
   ============================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 10px;
}

.info-card .tip {
  background: #FFF8E1;
  padding: 12px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  line-height: 1.7;
}

.emergency-list {
  list-style: none;
}

.emergency-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.emergency-list li:last-child { border-bottom: none; }

.emergency-list .em-number {
  font-weight: 700;
  color: var(--primary);
}

/* ============================================
   Spring Festival Section
   ============================================ */
.cny-section {
  background: linear-gradient(135deg, #B71C1C 0%, #D32F2F 100%);
  border-radius: var(--radius);
  padding: 32px;
  color: white;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.cny-section::before {
  content: '🧧';
  position: absolute;
  right: 30px;
  top: 20px;
  font-size: 60px;
  opacity: 0.3;
}

.cny-section::after {
  content: '🏮';
  position: absolute;
  right: 100px;
  bottom: 10px;
  font-size: 50px;
  opacity: 0.2;
}

.cny-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.cny-events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.cny-event-card {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 16px;
  backdrop-filter: blur(10px);
}

.cny-event-card h4 {
  margin-bottom: 8px;
}

.cny-event-card p {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.6;
}

.cny-event-card .cny-date {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 8px;
}

/* ============================================
   Leaflet Custom Styles
   ============================================ */
.custom-marker {
  background: none;
  border: none;
}

.marker-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border: 2px solid white;
  position: relative;
}

.marker-icon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid white;
}

.marker-hotel {
  background: #1a237e;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-popup-content {
  margin: 12px 16px !important;
  font-family: var(--font-cn) !important;
}

.popup-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.popup-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.popup-info {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.popup-actions {
  display: flex;
  gap: 8px;
}

.popup-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.popup-btn-detail {
  background: var(--primary);
  color: white;
}

.popup-btn-add {
  background: #E8F5E9;
  color: #2E7D32;
}

.popup-btn-add.added {
  background: #2E7D32;
  color: white;
}

/* Route line style */
.route-line {
  stroke: var(--primary);
  stroke-width: 3;
  stroke-dasharray: 10, 6;
  fill: none;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .map-page-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .map-container { min-height: 400px; }

  .sidebar {
    max-height: 50vh;
  }
}

@media (max-width: 768px) {
  .main-container { padding: 12px; }

  .overview-hero { padding: 24px; }
  .overview-hero h1 { font-size: 1.5rem; }

  .nav-tab { padding: 8px 14px; font-size: 0.8rem; }

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

  .modal-info-grid { grid-template-columns: 1fr; }

  .timeline { padding-left: 30px; }

  .header-inner { padding: 10px 16px; }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* ============================================
   Loading Animation
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-dots {
  display: flex;
  gap: 8px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

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

/* Tab switch animation */
.page { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Page Title
   ============================================ */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
}
.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: var(--transition);
}

/* ============================================
   Map Area Tabs
   ============================================ */
.map-area-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.map-area-tab {
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-light);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.map-area-tab:hover { border-color: var(--primary-light); color: var(--primary); }
.map-area-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================
   Day Detail Page
   ============================================ */
.day-detail-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--danger) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: white;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.day-detail-header .ddh-left h2 { font-size: 1.6rem; margin-bottom: 4px; }
.day-detail-header .ddh-left .ddh-sub {
  font-size: 0.9rem; opacity: 0.9;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.day-detail-header .ddh-right {
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.day-nav-btns {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.day-nav-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  background: rgba(255,255,255,0.2);
  color: white;
  transition: var(--transition);
}
.day-nav-btn:hover { background: rgba(255,255,255,0.3); }

/* Day Layout: Map + Timeline */
.day-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
}
.day-map-section {
  position: sticky;
  top: 130px;
  height: calc(100vh - 160px);
}
.day-map-container {
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Day Timeline */
.day-timeline {
  padding: 0;
}
.time-block {
  margin-bottom: 24px;
}
.time-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.time-block-header .tb-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.time-block-header h3 {
  font-size: 1rem;
  font-weight: 700;
}
.time-block-header .tb-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}
.time-block.morning .tb-icon { background: #FF9800; }
.time-block.noon .tb-icon { background: #F44336; }
.time-block.afternoon .tb-icon { background: #2196F3; }
.time-block.evening .tb-icon { background: #673AB7; }

/* Activity Card in Timeline */
.activity-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.activity-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(4px);
}
.activity-card.type-food { border-left-color: #FF9800; }
.activity-card.type-transport { border-left-color: #607d8b; }
.activity-card.type-hotel { border-left-color: #9b59b6; }
.activity-card.type-spring { border-left-color: #C62828; background: #FFF5F5; }

.activity-card .ac-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.activity-card .ac-icon { font-size: 1.3rem; }
.activity-card .ac-name { font-weight: 700; font-size: 0.95rem; flex: 1; }
.activity-card .ac-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}
.activity-card .ac-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
}
.activity-card .ac-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Transport connector between activities */
.transport-connector {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 4px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.transport-connector .tc-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  position: relative;
}
.transport-connector .tc-line::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 6px solid var(--border);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

/* Voucher in day timeline */
.voucher-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #F3E5F5;
  border-radius: var(--radius-xs);
  margin-top: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.voucher-card:hover { background: #E1BEE7; }
.voucher-card .vc-icon { font-size: 1.3rem; }
.voucher-card .vc-name { font-size: 0.85rem; font-weight: 500; flex: 1; }
.voucher-card .vc-view {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
   Packing List
   ============================================ */
.packing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.packing-header .page-title { margin-bottom: 0; }
.packing-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}
.progress-bar {
  width: 150px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}
.packing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.packing-category {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.packing-category-header {
  padding: 14px 20px;
  background: var(--bg);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
}
.packing-category-header .pc-count {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}
.packing-items { padding: 8px 12px; }
.packing-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}
.packing-item:last-child { border-bottom: none; }
.packing-item:hover { background: var(--bg); }
.packing-item.checked { opacity: 0.6; }
.packing-item.checked .pi-name { text-decoration: line-through; }
.packing-item .pi-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 0.75rem;
  color: transparent;
}
.packing-item.checked .pi-checkbox {
  background: var(--secondary);
  border-color: var(--secondary);
  color: white;
}
.packing-item .pi-name { flex: 1; }
.packing-item .pi-essential {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 8px;
  background: #FFEBEE;
  color: #C62828;
  font-weight: 600;
}
.packing-item .pi-custom {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 8px;
  background: #E8F5E9;
  color: #2E7D32;
  font-weight: 600;
}
.packing-item .pi-delete {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  flex-shrink: 0;
}
.packing-item:hover .pi-delete { opacity: 0.6; }
.packing-item .pi-delete:hover { opacity: 1; background: #FFEBEE; color: #C62828; }
/* 添加物品栏 */
.packing-add-bar {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-items: center;
}
.packing-cat-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
  min-width: 100px;
}
.packing-new-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--bg);
  color: var(--text);
}
.packing-new-input:focus { border-color: var(--primary); outline: none; }
.packing-add-btn {
  padding: 8px 16px;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.packing-add-btn:hover { opacity: 0.9; }
@media (max-width: 768px) {
  .packing-add-bar { flex-wrap: wrap; }
  .packing-cat-select { min-width: auto; flex: 1; }
  .packing-new-input { flex-basis: 100%; order: -1; }
  .packing-item .pi-delete { opacity: 0.5; }
}

/* ============================================
   Budget Tracker
   ============================================ */
.budget-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.budget-stat {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.budget-stat .bs-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}
.budget-stat .bs-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.budget-stat.total { background: linear-gradient(135deg, var(--primary), var(--danger)); }
.budget-stat.total .bs-amount { color: white; }
.budget-stat.total .bs-label { color: rgba(255,255,255,0.8); }

.budget-add-section {
  margin-bottom: 20px;
}
.budget-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.budget-day-group {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.budget-day-header {
  padding: 12px 20px;
  background: var(--bg);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.budget-day-header .bdh-total {
  color: var(--primary);
  font-weight: 700;
}
.budget-day-items { padding: 8px 12px; }
.budget-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.budget-item:last-child { border-bottom: none; }
.budget-item .bi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.budget-item .bi-info { flex: 1; }
.budget-item .bi-info .bi-note { font-weight: 500; }
.budget-item .bi-info .bi-category { font-size: 0.75rem; color: var(--text-muted); }
.budget-item .bi-amount { font-weight: 700; color: var(--primary); }
.budget-item .bi-delete {
  background: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  opacity: 0;
  transition: var(--transition);
}
.budget-item:hover .bi-delete { opacity: 1; }
.budget-item .bi-delete:hover { color: var(--danger); }

/* Expense Form Styles */
.expense-modal { max-width: 480px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
}
.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.category-chip {
  padding: 6px 14px;
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  background: white;
}
.category-chip.active {
  border-color: var(--primary);
  background: #FFF3E8;
  color: var(--primary);
  font-weight: 600;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* ============================================
   Discover Page (景点发现)
   ============================================ */
.discover-header {
  margin-bottom: 24px;
}
.discover-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.6;
}
.discover-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.discover-stats > span {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: #FFF3E8;
  padding: 6px 16px;
  border-radius: 20px;
}

/* Zone tabs */
.zone-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.zone-tab {
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  flex: 1;
  min-width: 200px;
  text-align: center;
}
.zone-tab:hover { border-color: var(--primary-light); }
.zone-tab.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}
.zone-tab .zt-hotel { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.zone-tab .zt-dates { font-size: 0.8rem; opacity: 0.8; }
.zone-tab .zt-count { font-size: 0.75rem; margin-top: 4px; }

/* Zone info panel */
.discover-zone-info {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.dzi-hotel-icon { font-size: 2.5rem; }
.dzi-info { flex: 1; min-width: 200px; }
.dzi-info h3 { font-size: 1.1rem; margin-bottom: 4px; }
.dzi-info .dzi-meta { font-size: 0.85rem; color: var(--text-light); }
.dzi-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.dzi-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
}
.dzi-legend-item.open { background: #E8F5E9; color: #2E7D32; }
.dzi-legend-item.special { background: #FFF3E0; color: #E65100; }
.dzi-legend-item.maybe { background: #FFF8E1; color: #F57F17; }
.dzi-legend-item.closed { background: #FFEBEE; color: #C62828; }

/* Discover grid */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.discover-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 3px solid transparent;
  position: relative;
}
.discover-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.discover-card.selected {
  border-color: var(--secondary);
}
.discover-card .dc-score {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: white;
  z-index: 2;
}
.dc-score.score-high { background: #2E7D32; }
.dc-score.score-mid { background: #FF9800; }
.dc-score.score-low { background: #9E9E9E; }

.discover-card .dc-top {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.discover-card .dc-body { padding: 16px; }
.discover-card .dc-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
  padding-right: 40px;
}
.discover-card .dc-name-en {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.discover-card .dc-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-light);
}
.dc-meta-item {
  display: flex;
  align-items: center;
  gap: 3px;
}
.discover-card .dc-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.discover-card .dc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.dc-tag {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
}
.dc-tag-cny { background: #FFEBEE; color: #C62828; }
.dc-tag-must { background: #E3F2FD; color: #1565C0; }
.dc-tag-elderly { background: #E8F5E9; color: #2E7D32; }
.dc-tag-young { background: #FFF3E0; color: #E65100; }
.dc-tag-open { background: #E8F5E9; color: #2E7D32; }
.dc-tag-maybe { background: #FFF8E1; color: #F57F17; }

/* External links row */
.dc-links {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.dc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
}
.dc-link-xhs {
  background: #FFE8E8;
  color: #FF2442;
}
.dc-link-xhs:hover { background: #FF2442; color: white; }
.dc-link-map {
  background: #E8F5E9;
  color: #2E7D32;
}
.dc-link-map:hover { background: #2E7D32; color: white; }
.dc-link-book {
  background: #E3F2FD;
  color: #1565C0;
}
.dc-link-book:hover { background: #1565C0; color: white; }

/* Select button */
.dc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dc-select-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
}
.dc-select-btn:hover { border-color: var(--primary); color: var(--primary); }
.dc-select-btn.selected {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
}
.dc-detail-btn {
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--primary);
  border: 2px solid var(--border);
  transition: var(--transition);
}
.dc-detail-btn:hover { border-color: var(--primary); }

/* Distance badge */
.dc-distance {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  z-index: 2;
}

/* ============================================
   Responsive (Updated)
   ============================================ */
@media (max-width: 1024px) {
  .day-layout {
    grid-template-columns: 1fr;
  }
  .day-map-section {
    position: relative;
    top: auto;
    height: 350px;
    margin-bottom: 16px;
  }
}

/* ============================================
   Discover Map
   ============================================ */
.discover-map-wrap {
  height: 360px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

/* Home Maps */
.home-maps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.home-map-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.home-map-card .hmc-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.home-map-card .hmc-map {
  height: 260px;
}

/* Time picker in discover card */
.dc-time-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  background: #F3E8FF;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
}
.dc-time-picker label { font-weight: 600; color: #7C3AED; white-space: nowrap; }
.dc-time-picker select {
  padding: 4px 8px;
  border: 1px solid #DDD6FE;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: inherit;
  background: white;
}
.dc-time-picker input[type="time"] {
  padding: 4px 8px;
  border: 1px solid #DDD6FE;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: inherit;
}

@media (max-width: 768px) {
  .home-maps { grid-template-columns: 1fr; }
  .home-map-card .hmc-map { height: 200px; }
  .discover-map-wrap { height: 280px; }
}

/* ============================================
   AI Search Feature
   ============================================ */
.btn-ai {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}
.btn-ai:hover { opacity: 0.9; transform: translateY(-1px); }

.ai-search-modal {
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
}

.ai-search-header h2 {
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.ai-search-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

.ai-search-zone { margin-bottom: 16px; }
.ai-search-zone label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.ai-search-zone select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-family: inherit;
  background: white;
}

.ai-search-input { margin-bottom: 16px; }
.ai-search-input label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.ai-search-input textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: var(--transition);
}
.ai-search-input textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

.ai-search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.ai-search-suggestions span {
  padding: 5px 12px;
  background: #f0edff;
  color: #667eea;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.ai-search-suggestions span:hover { background: #667eea; color: white; }

.ai-search-actions { margin-bottom: 16px; }
.btn-ai-search {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  transition: var(--transition);
  position: relative;
}
.btn-ai-search:hover { opacity: 0.9; }
.btn-ai-search:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ai-search .ai-btn-loading { display: inline-flex; align-items: center; gap: 8px; }

@keyframes aiPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.btn-ai-search:disabled .ai-btn-loading { animation: aiPulse 1.5s infinite; }

.ai-search-results {
  min-height: 0;
}

.ai-stream-box {
  background: #1a1a2e;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.ai-stream-status {
  padding: 10px 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-stream-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
  animation: streamBlink 1s infinite;
}
@keyframes streamBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ai-stream-text {
  padding: 12px 14px;
  margin: 0;
  color: #a5b4fc;
  font-size: 0.78rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  line-height: 1.6;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}
.ai-stream-text::-webkit-scrollbar { width: 4px; }
.ai-stream-text::-webkit-scrollbar-thumb { background: #667eea; border-radius: 2px; }

.ai-result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.ai-result-card:hover { box-shadow: var(--shadow); }
.ai-result-card.added { border-color: #2E7D32; background: #E8F5E9; }

.ai-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.ai-result-name {
  font-weight: 700;
  font-size: 1rem;
}
.ai-result-name-en {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.ai-result-score {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: white;
  background: linear-gradient(135deg, #667eea, #764ba2);
  flex-shrink: 0;
}

.ai-result-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.5;
}

.ai-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ai-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.ai-result-tags span {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: #f0edff;
  color: #667eea;
}
.ai-result-tags .tag-cny { background: #FFF3E0; color: #E65100; }

.ai-result-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.ai-result-links a {
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: #f5f5f5;
  color: var(--text-light);
  text-decoration: none;
}
.ai-result-links a:hover { background: #e0e0e0; }

.ai-result-actions {
  display: flex;
  gap: 8px;
}
.ai-result-add {
  flex: 1;
  padding: 8px;
  border: 2px solid #667eea;
  background: white;
  color: #667eea;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  transition: var(--transition);
}
.ai-result-add:hover { background: #667eea; color: white; }
.ai-result-add.added { background: #2E7D32; border-color: #2E7D32; color: white; }

.ai-search-config {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}
.btn-text:hover { color: var(--text); }

.ai-config-modal { max-width: 480px; }
.ai-config-modal small {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 4px;
}
.ai-config-modal small a { color: #667eea; }

.ai-error-msg {
  background: #FFEBEE;
  color: #C62828;
  padding: 12px;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.ai-no-key-hint {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
}
.ai-no-key-hint p { margin-bottom: 12px; }

.dc-ai-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .nav-tabs {
    display: none;
    flex-direction: column;
    padding: 8px 16px 16px;
    gap: 2px;
  }
  .nav-tabs.show { display: flex; }
  .nav-tab { border-radius: var(--radius-xs); }

  .header-logo span:not(.logo-icon) { font-size: 1rem; }

  .day-detail-header { padding: 20px; }
  .day-detail-header .ddh-left h2 { font-size: 1.2rem; }

  .packing-grid { grid-template-columns: 1fr; }

  .budget-summary { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr 1fr; }

  .day-layout { grid-template-columns: 1fr; }
  .day-map-section { height: 280px; }

  .discover-grid { grid-template-columns: 1fr; }
  .zone-tab { min-width: 120px; padding: 10px 14px; }
  .zone-tab .zt-hotel { font-size: 0.85rem; }
  .discover-zone-info { flex-direction: column; text-align: center; }

  .ai-search-modal { max-width: 100%; margin: 8px; }
  .discover-stats { flex-wrap: wrap; }
}

/* ============ Access Gate ============ */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  border: 1px solid rgba(255,255,255,0.15);
}
.gate-icon { font-size: 4rem; margin-bottom: 16px; }
.gate-card h2 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 8px;
  font-weight: 700;
}
.gate-card p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.gate-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 4px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.gate-input::placeholder { color: rgba(255,255,255,0.3); letter-spacing: 1px; }
.gate-input:focus { outline: none; border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.12); }
.gate-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #00b09b, #96c93d);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 2px;
}
.gate-btn:hover { opacity: 0.9; }
.gate-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
}

/* Guide Modal */
.guide-modal {
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
}
.guide-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.guide-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}
.guide-item strong {
  color: var(--primary);
}
.guide-item div {
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ============================================
   Plans Sharing
   ============================================ */
.btn-plans {
  background: linear-gradient(135deg, #7C4DFF, #536DFE);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}
.btn-plans:hover { opacity: 0.9; transform: translateY(-1px); }

.plans-modal { max-width: 540px; width: 95%; }
.plans-save-form { margin-bottom: 20px; }
.plans-form-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.plans-input {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  transition: var(--transition);
}
.plans-input:focus { border-color: var(--primary); outline: none; }
.plans-select {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
}
.plans-save-btn { white-space: nowrap; font-size: 0.88rem; }

.plans-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plans-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.plans-item:hover { border-color: var(--primary); }
.plans-item-name { font-weight: 600; font-size: 0.95rem; }
.plans-item-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.plans-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
  font-weight: 500;
}
.btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}
.btn-danger:hover { opacity: 0.85; }
