:root {
    /* Brand Colors: Vibrant Indigo / Purple theme */
    --brand-primary: #4f46e5;
    --brand-primary-hover: #4338ca;
    --brand-secondary: #0ea5e9;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-blur: blur(12px);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    /* Enough room so content clears the fixed mobile bottom nav (including iOS safe area) */
    padding-bottom: calc(3.5rem + env(safe-area-inset-bottom));
    min-height: 100vh;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

/* Top App Bar Header */
.app-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1020;
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Card / Container styles for a premium look */
.premium-card {
    background: var(--surface-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Subtle interactive animations */
.interactive:active {
    transform: scale(0.97);
}

/* Bottom Mobile Navigation Shell */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.35rem 0;
    padding-top: 0.35rem;
    padding-bottom: calc(0.35rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.03);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.3rem 0.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    gap: 0.15rem;
}

.nav-item i {
    font-size: 1.1rem;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active {
    color: var(--brand-primary);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Buttons overrides */
.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    border-radius: 12px;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
    transition: all 0.2s;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-1px);
}

/* Utility */
.gradient-text {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.non-gradient-text {
    color: var(--brand-primary);
}

/* Desktop: hide mobile nav */
@media (min-width: 768px) {
    .mobile-nav {
        display: none !important;
    }
}