.container {
    padding: 20px;
    padding-bottom: 120px; /* Space for bottom nav */
    height: 100vh;
    overflow-y: auto; /* Internal scrolling! */
    -webkit-overflow-scrolling: touch;
}

/* SPA Views */
.spa-view { display: none; animation: slideIn 0.3s ease forwards; }
.spa-view.active { display: block; }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 420px; background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr;
    justify-items: center; align-items: end;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 100; transition: background 0.3s, border-color 0.3s;
}

@media (min-width: 500px) {
    .container {
        height: 100%;
    }
    .bottom-nav {
        position: absolute; left: 0; transform: none; width: 100%;
        border-bottom-left-radius: 40px; border-bottom-right-radius: 40px;
    }
}

.nav-item {
    background: none; border: none; color: var(--text-secondary);
    display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    font-size: 0.75rem; font-weight: 500; cursor: pointer;
    font-family: var(--font-family); transition: color 0.2s ease;
    width: 100%; padding-bottom: 0.3rem; margin-top: 5px;
}

.nav-item .icon { font-size: 1.3rem; margin-bottom: 2px; }
.nav-item.active { color: var(--accent-primary); font-weight: 700;}
.nav-item.active .icon { transform: scale(1.1); }

/* Clean FAB */
.nav-fab-container {
    display: flex; justify-content: center; align-items: center;
    padding: 0 10px; margin-top: -25px; /* Pull it up out of the bar */
}

.nav-fab {
    background: var(--accent-primary); color: var(--btn-text) !important;
    width: 55px; height: 55px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.8rem !important; box-shadow: 0 10px 20px var(--accent-light);
    transition: transform 0.2s, background 0.2s; border: none; cursor: pointer;
}
.nav-fab:hover { background: var(--accent-hover); transform: scale(1.05); }
.nav-fab .icon { margin: 0; transform: none !important; font-weight: 300;}
