:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --border: #334155;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#app {
    width: 100%;
    max-width: 480px; /* Mobile App feel */
    min-height: 100vh;
    background-color: var(--bg-dark);
    position: relative;
    padding-bottom: 80px; /* space for bottom nav */
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    overflow-x: hidden;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    height: 70px;
    background-color: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border);
    z-index: 1000;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 25%;
}

.nav-btn span:nth-child(2) {
    font-size: 0.75rem;
    font-weight: 500;
}

.nav-btn.active {
    color: var(--accent);
}

.nav-btn.active .material-icons-round {
    transform: translateY(-2px);
    text-shadow: var(--shadow-glow);
}

/* Main Content */
#main-content {
    padding: 24px 20px;
}

.view-container {
    animation: fadeIn 0.3s ease;
}

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

/* Typography */
h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-main);
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 12px auto;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

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

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

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.05);
}

/* Add Stop button specific */
.btn-small {
    padding: 8px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    width: auto;
}

/* Helpers */
.flex-row { display: flex; gap: 12px; }
.flex-row > * { flex: 1; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-4 { margin-top: 16px; }
.mt-2 { margin-top: 8px; }
.text-center { text-align: center; }

/* Stat Cards */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(145deg, var(--bg-card), rgba(30, 41, 59, 0.5));
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* List Items */
.list-item {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.list-item-title {
    font-weight: 600;
    color: var(--text-main);
}

.list-item-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: scaleIn 0.2s ease;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Google Places Autocomplete Dark Mode overrides */
.pac-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
    z-index: 3000 !important;
}

.pac-item {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 12px;
    color: var(--text-muted);
    cursor: pointer;
}

.pac-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.pac-item-query {
    font-size: 0.95rem;
    color: var(--text-main);
    padding-right: 6px;
}

.pac-matched {
    font-weight: 600;
    color: var(--accent);
}

.pac-icon {
    display: none; /* Hide default google pin */
}

