/* --- VARIABLES --- */
:root {
    --bg: #ffffff;
    --surface: #f9fafb;
    --text-main: #111827;
    --text-sub: #6b7280;
    --accent: #000000;
    --border: #e5e7eb;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --radius: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* --- PARTICLE BACKGROUND --- */
#particle-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none; opacity: 0.5;
}

/* --- ANIMATIONS --- */
.fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(20px); }
.fade-in { animation: fadeIn 0.5s ease forwards; opacity: 0; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* --- WIZARD CONTAINER --- */
.wizard-container {
    max-width: 550px; margin: 0 auto; height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 2rem; position: relative; z-index: 10;
}

h1 { font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.03em; }
.subtitle { text-align: center; color: var(--text-sub); font-size: 1.1rem; margin-bottom: 3rem; }

/* --- INPUTS & BUTTONS --- */
.search-box {
    display: flex; align-items: center; gap: 1rem;
    background: white; border: 1px solid var(--border);
    padding: 1.2rem 1.5rem; border-radius: 100px;
    box-shadow: var(--shadow-md); transition: all 0.2s ease;
}
.search-box:focus-within { border-color: var(--accent); transform: translateY(-2px); }
.search-box input { border: none; outline: none; width: 100%; font-size: 1.2rem; }
.search-box i { font-size: 1.4rem; color: var(--text-sub); }

.btn-primary {
    background: var(--accent); color: white;
    border: none; padding: 1.2rem 2.5rem;
    border-radius: 100px; font-size: 1.1rem; font-weight: 600;
    cursor: pointer; width: 100%; margin-top: 2rem;
    transition: all 0.2s; display: flex; justify-content: center; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-3px); }
.btn-nav {
    background: transparent; border: none; color: var(--text-sub);
    font-weight: 600; cursor: pointer; padding: 1rem;
}
.nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }

/* --- PILLS --- */
.grid-pills { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }
.pill {
    background: white; border: 1px solid var(--border);
    padding: 0.8rem 1.4rem; border-radius: 100px;
    cursor: pointer; font-weight: 500; transition: all 0.2s;
}
.pill:hover { transform: translateY(-2px); }
.pill.selected { background: var(--accent); color: white; border-color: var(--accent); transform: scale(1.05); }

/* --- DASHBOARD --- */
.dashboard-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    display: flex; background: var(--bg); z-index: 100;
}
.itinerary-sidebar {
    width: 420px; background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10;
}
.sidebar-header { padding: 2rem; border-bottom: 1px solid var(--border); }
.trip-title { font-size: 1.8rem; font-weight: 800; margin-top: 0.5rem; }
.itinerary-scroll { flex: 1; overflow-y: auto; padding: 2rem; }
.map-area { flex: 1; position: relative; }
#map { width: 100%; height: 100%; z-index: 1; }

.place-card {
    background: white; border: 1px solid var(--border);
    border-radius: 16px; padding: 1.2rem; margin-bottom: 1rem;
    cursor: pointer; transition: all 0.2s; box-shadow: var(--shadow-md);
    border-left: 4px solid transparent; /* Logic will add color here */
}
.place-card:hover { transform: scale(1.02); border-color: #d1d5db; }
.place-time { font-size: 0.85rem; font-weight: 600; color: var(--text-sub); background: #f3f4f6; padding: 4px 8px; border-radius: 6px; display: inline-block; margin-bottom: 0.5rem; }
.place-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.place-desc { font-size: 0.9rem; color: var(--text-sub); line-height: 1.5; }

.loader-ring {
    width: 60px; height: 60px; border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent); border-radius: 50%;
    animation: spin 1s linear infinite; margin: 0 auto 2rem auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- NEW: CUSTOM MAP PINS --- */
.custom-marker {
    display: flex !important;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50% 50% 50% 0; /* Teardrop shape */
    transform: rotate(-45deg); /* Point down */
    width: 36px !important;
    height: 36px !important;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    border: 2px solid white;
}

.custom-marker div {
    transform: rotate(45deg); /* Fix text rotation */
}