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

:root {
  --bg: #05070a;
  --panel: rgba(15, 18, 25, 0.85);
  --card: #161b22;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --amber: #f59e0b;
  --purple: #a855f7;
  --green: #22c55e;
  --sidebar-w: 380px;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); height: 100vh; width: 100vw; overflow: hidden; -webkit-font-smoothing: antialiased; }

/* Main Layout */
.app-container { display: flex; height: 100vh; width: 100vw; position: relative; }

/* Floating Sidebar */
#sidebar {
  width: var(--sidebar-w);
  height: calc(100vh - 40px);
  margin: 20px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: absolute;
  left: 0;
  top: 0;
}

.sidebar-header { padding: 24px; border-bottom: 1px solid var(--border); }
.sidebar-header h1 { font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.sidebar-content { flex: 1; overflow-y: auto; padding: 24px; scrollbar-width: none; }
.sidebar-content::-webkit-scrollbar { display: none; }

/* Section Styling */
section { margin-bottom: 32px; }
section h2 { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); margin-bottom: 16px; }

/* Controls */
.layer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.layer-btn {
  padding: 12px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--text-muted);
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.layer-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
.layer-btn.active.brainstorm { border-color: var(--amber); color: var(--amber); background: rgba(245, 158, 11, 0.15); }
.layer-btn.active.proposal { border-color: var(--purple); color: var(--purple); background: rgba(168, 85, 247, 0.15); }
.layer-btn.active.transport { border-color: var(--accent); color: var(--accent); background: rgba(59, 130, 246, 0.15); }
.layer-btn.active.plan { border-color: var(--green); color: var(--green); background: rgba(34, 197, 94, 0.15); }

/* Item Cards */
.item-card {
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.2s;
}
.item-card:hover { transform: translateY(-2px); background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.item-card.active { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.1); }
.item-card .title { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: #fff; }
.item-card .meta { font-size: 0.75rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }

/* Timeline Overlay */
#timeline-container {
  position: absolute; top: 20px; left: calc(var(--sidebar-w) + 60px); right: 20px;
  z-index: 900; display: flex; gap: 12px; overflow-x: auto; padding-bottom: 15px; scrollbar-width: none;
}
.day-pill {
  background: var(--panel); backdrop-filter: blur(20px); border: 1px solid var(--border);
  padding: 10px 20px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; color: #fff; cursor: pointer; transition: all 0.2s;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.day-pill:hover { border-color: var(--accent); background: rgba(59, 130, 246, 0.1); }

/* Kit Status Bar */
#kit-bar {
  position: absolute; bottom: 20px; left: calc(var(--sidebar-w) + 60px); right: 20px;
  z-index: 900; background: var(--panel); backdrop-filter: blur(20px);
  border: 1px solid var(--border); padding: 12px 24px; border-radius: 16px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
#kit-msg { color: var(--accent); font-weight: 600; font-size: 0.8rem; display: flex; align-items: center; gap: 8px; }
#kit-time { font-size: 0.7rem; color: var(--text-muted); font-family: monospace; }

/* Landing Screen */
#landing {
  position: fixed; inset: 0; background: var(--bg); z-index: 2000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; text-align: center;
}
#landing h1 { font-size: 3rem; font-weight: 800; margin-bottom: 40px; letter-spacing: -0.04em; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; width: 100%; max-width: 1200px; }

/* Map View */
#map { width: 100%; height: 100%; position: absolute; inset: 0; z-index: 1; }

/* Leaflet UI Overrides */
.leaflet-container { background: #05070a !important; }
.leaflet-bar { border: 1px solid var(--border) !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important; }
.leaflet-bar a { background: var(--panel) !important; backdrop-filter: blur(10px); color: #fff !important; border: none !important; width: 40px !important; height: 40px !important; line-height: 40px !important; }
.leaflet-bar a:hover { background: rgba(255,255,255,0.1) !important; }
