/* CSS Design System for Travel Itinerary Web App */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f4f6fb;
  --bg-secondary: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-color: rgba(226, 232, 240, 0.8);
  --border-glass: rgba(255, 255, 255, 0.5);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Accent Colors */
  --primary: #3b82f6;
  --primary-gradient: linear-gradient(135deg, #2563eb, #3b82f6);
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-purple: #8b5cf6;
  --accent-rose: #f43f5e;

  /* City Specific Colors */
  --city-taian: #059669;    /* Taishan Emerald Mountain */
  --city-jinan: #0284c7;    /* Jinan Spring Water Cyan */
  --city-qingdao: #0d9488;  /* Qingdao Sea Teal */
  --city-nanjing: #7c3aed;  /* Nanjing Royal Imperial Purple */

  /* Type Badges */
  --badge-transit: #eff6ff;
  --badge-transit-text: #1d4ed8;
  --badge-spot: #f0fdf4;
  --badge-spot-text: #15803d;
  --badge-food: #fff7ed;
  --badge-food-text: #c2410c;
  --badge-night: #faf5ff;
  --badge-night-text: #6b21a8;
  --badge-tip: #fef2f2;
  --badge-tip-text: #b91c1c;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.25);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-glass: rgba(19, 27, 46, 0.75);
  --bg-card: rgba(22, 32, 54, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --badge-transit: rgba(37, 99, 235, 0.2);
  --badge-transit-text: #60a5fa;
  --badge-spot: rgba(16, 185, 129, 0.2);
  --badge-spot-text: #34d399;
  --badge-food: rgba(245, 158, 11, 0.2);
  --badge-food-text: #fbbf24;
  --badge-night: rgba(139, 92, 246, 0.2);
  --badge-night-text: #c084fc;
  --badge-tip: rgba(244, 63, 94, 0.2);
  --badge-tip-text: #f87171;

  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  padding-bottom: 60px;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: 'Noto Sans SC', 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.glass-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* FULLSCREEN HERO COVER HEADER (Title in Bottom-Left) */
.hero-header {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.6) 75%, var(--bg-primary) 100%), 
              url('./images/banner.jpg') center/cover no-repeat fixed;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 60px 0 48px;
  color: #fff;
  margin-bottom: 48px;
}

.hero-content {
  width: 100%;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
}

.hero-glass-box {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 36px 44px;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  max-width: 680px;
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  color: #f1f5f9;
}

.hero-stats {
  display: flex;
  justify-content: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fbbf24;
}

.stat-label {
  font-size: 0.775rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* BOUNCING SCROLL DOWN BUTTON (Positioned in Bottom Right) */
.scroll-down-btn {
  position: absolute;
  bottom: 48px;
  right: 48px;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  animation: bounceRight 2s infinite;
  z-index: 10;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  transition: var(--transition);
}

.scroll-down-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.scroll-arrow {
  font-size: 1.2rem;
  line-height: 1;
}

@keyframes bounceRight {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* TOP TOOLBAR & CONTROLS */
.header-actions {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* CITY MAP JOURNEY CONNECTOR */
.journey-section {
  margin-bottom: 36px;
}

.journey-title {
  font-size: 1.25rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  position: relative;
}

.journey-node {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.journey-node:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.journey-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.journey-node[data-city="taian"]::before { background: var(--city-taian); }
.journey-node[data-city="jinan"]::before { background: var(--city-jinan); }
.journey-node[data-city="qingdao"]::before { background: var(--city-qingdao); }
.journey-node[data-city="nanjing"]::before { background: var(--city-nanjing); }
.journey-node[data-city="start"]::before,
.journey-node[data-city="end"]::before { background: var(--accent-gold); }

.node-dates {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.node-city {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.node-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FILTER & CONTROL BAR */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 32px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 42px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* MAIN LAYOUT GRID */
.main-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

/* SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 24px;
  height: fit-content;
}

/* PROGRESS CARD */
.progress-card {
  padding: 24px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-title {
  font-size: 1rem;
  font-weight: 700;
}

.progress-count {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 12px;
}

[data-theme="dark"] .progress-bar-bg {
  background: rgba(255, 255, 255, 0.1);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient);
  border-radius: 50px;
  transition: width 0.5s ease;
}

.progress-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* CITY NAVIGATION CARD */
.city-nav-card {
  padding: 20px;
}

.city-nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.city-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
}

.city-nav-item:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateX(4px);
}

.city-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.city-info {
  display: flex;
  flex-direction: column;
}

.city-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.city-days {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* TIPS & PACKING CARD */
.tips-card {
  padding: 20px;
}

.tips-title {
  font-size: 1rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-rose);
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tip-item {
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--badge-tip);
  color: var(--badge-tip-text);
  line-height: 1.4;
  border-left: 3px solid var(--accent-rose);
}

/* TIMELINE SECTION */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.day-card {
  overflow: hidden;
  position: relative;
}

.day-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.05);
}

.day-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.day-badge {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.day-date-title {
  display: flex;
  flex-direction: column;
}

.day-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.day-headline {
  font-size: 1.35rem;
  font-weight: 800;
}

.day-city-tag {
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.day-city-tag[data-city="taian"] { background: rgba(5, 150, 105, 0.15); color: var(--city-taian); }
.day-city-tag[data-city="jinan"] { background: rgba(2, 132, 199, 0.15); color: var(--city-jinan); }
.day-city-tag[data-city="qingdao"] { background: rgba(13, 148, 136, 0.15); color: var(--city-qingdao); }
.day-city-tag[data-city="nanjing"] { background: rgba(124, 58, 237, 0.15); color: var(--city-nanjing); }

/* DAY ITEMS TIMELINE */
.day-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
}

.timeline-item:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  transform: translateX(4px);
}

.timeline-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 3px;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.time-slot {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.item-type-badge {
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
}

.item-type-badge.transit { background: var(--badge-transit); color: var(--badge-transit-text); }
.item-type-badge.spot { background: var(--badge-spot); color: var(--badge-spot-text); }
.item-type-badge.food { background: var(--badge-food); color: var(--badge-food-text); }
.item-type-badge.night { background: var(--badge-night); color: var(--badge-night-text); }
.item-type-badge.tip { background: var(--badge-tip); color: var(--badge-tip-text); }

.item-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.item-title.completed {
  text-decoration: line-through;
  opacity: 0.5;
}

.item-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.item-extra {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-gold);
  font-size: 0.825rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* FOOTER */
.site-footer {
  margin-top: 60px;
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-glass-box {
    padding: 28px 24px;
    max-width: 100%;
  }

  .scroll-down-btn {
    right: 24px;
    bottom: 24px;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .header-actions {
    top: 16px;
    right: 16px;
  }

  .action-btn span {
    display: none;
  }

  .day-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* PRINT STYLES */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .header-actions, .controls-bar, .search-box, .filter-group, .action-btn, .scroll-down-btn {
    display: none !important;
  }

  .hero-header {
    background: none !important;
    color: #000 !important;
    height: auto !important;
    min-height: auto !important;
    padding: 20px 0 !important;
    border-bottom: 2px solid #000 !important;
  }

  .hero-glass-box {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .hero-badge, .hero-title, .hero-subtitle {
    color: #000 !important;
    text-shadow: none !important;
  }

  .glass-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    backdrop-filter: none !important;
    page-break-inside: avoid;
  }

  .main-grid {
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    display: none !important;
  }
}
