:root {
  --primary: #8b5a33;
  --secondary: #2c4c3b;
  --accent: #d49a71;
  --bg-color: #f7f5f0;
  --card-bg: #ffffff;
  --text-dark: #2c2a29;
  --text-light: #7a7571;
  --shadow: 0 8px 30px rgba(0,0,0,0.08);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --timeline-line: #e0e0e0;
  --info-bg: #f8faf9;
  --weather-bg: #f0f8fc;
  --flight-bg: #fdf6f0;
}

[data-theme="dark"] {
  --primary: #d49a71;
  --secondary: #6b9c81;
  --accent: #8b5a33;
  --bg-color: #121212;
  --card-bg: #1e1e1e;
  --text-dark: #e0e0e0;
  --text-light: #a0a0a0;
  --shadow: 0 8px 30px rgba(0,0,0,0.5);
  --timeline-line: #444;
  --info-bg: #2a2a2a;
  --weather-bg: #1e2a33;
  --flight-bg: #33241a;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  padding-bottom: 80px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  position: relative;
  height: 280px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transform: scale(1.05);
  animation: heroZoom 20s infinite alternate linear;
}

@keyframes heroZoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 2;
}

.header-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.05);
}

.icon-btn.active-kid {
  background: #f1c40f;
  color: #333;
  border-color: #f1c40f;
}

.header-content {
  position: relative;
  z-index: 3;
  padding: 30px 20px;
  text-align: center;
  color: white;
  width: 100%;
}

.header-content h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav.tabs {
  display: flex;
  overflow-x: auto;
  background: var(--card-bg);
  padding: 10px 15px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  scrollbar-width: none;
  gap: 10px;
  transition: background-color 0.3s ease;
}

nav.tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  padding: 10px 20px;
  border: none;
  background: var(--bg-color);
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 10px rgba(44, 76, 59, 0.3);
}

main.content {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.day-view {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.day-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: slideUp 0.4s ease forwards;
}

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

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease;
}

.card-image-container {
  margin: -25px -25px 20px -25px;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

h2 {
  margin-top: 0;
  color: var(--secondary);
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.date-badge {
  display: inline-block;
  background: rgba(212, 154, 113, 0.15);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.info-box {
  background: var(--info-bg);
  border-left: 4px solid var(--secondary);
  padding: 15px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-size: 0.95rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.3s ease;
}

.info-box.weather {
  border-left-color: #5ab1e6;
  background: var(--weather-bg);
  position: relative;
}

.live-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2ecc71;
  color: white;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.info-box.flight {
  border-left-color: #e67e22;
  background: var(--flight-bg);
}

.info-icon {
  font-size: 1.5rem;
}

ul.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

ul.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 15px;
  width: 2px;
  background: var(--timeline-line);
}

ul.timeline li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 25px;
}

ul.timeline li:last-child {
  margin-bottom: 0;
}

ul.timeline li::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 9px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--primary);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--card-bg);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.time-label {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.activity-desc {
  font-size: 1rem;
  color: var(--text-dark);
}

.activity-desc ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

.activity-desc ul li {
  padding-left: 0;
  margin-bottom: 6px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.activity-desc ul li::before {
  display: none;
}

.activity-desc .map-btn {
  margin-right: 6px;
}

.activity-desc small {
  display: block;
  margin-top: 8px;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-color);
  color: var(--secondary);
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 10px;
  transition: var(--transition);
  border: 1px solid var(--timeline-line);
}

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

/* Parent Tips */
.parent-tip {
  display: none;
  background: rgba(241, 196, 15, 0.15);
  border-left: 3px solid #f1c40f;
  padding: 10px;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  margin-top: 10px;
  color: var(--text-dark);
}

.parent-tip strong {
  color: #d35400;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Checklist Styling */
.checklist-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--timeline-line);
  cursor: pointer;
  transition: var(--transition);
}

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

.checklist-item:hover {
  background: rgba(0,0,0,0.02);
}

[data-theme="dark"] .checklist-item:hover {
  background: rgba(255,255,255,0.05);
}

.check-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--primary);
  border-radius: 6px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: var(--transition);
}

.checklist-item.checked .check-box {
  background: var(--primary);
  color: white;
}

.checklist-item.checked .check-text {
  text-decoration: line-through;
  opacity: 0.6;
}

.check-text {
  font-weight: 500;
  flex: 1;
  transition: var(--transition);
}

.check-tag {
  font-size: 0.7rem;
  background: var(--secondary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Map Styling */
#leaflet-map {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius);
  z-index: 1;
}

/* Offline Banner */
.offline-banner {
  background: #e74c3c;
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
