:root {
    --navy: #011D30;
    --navy-light: #025582;
    --sky: #87CEEB;
    --sky-dim: #5BA8D4;
    --gold: #F5A623;
    --white: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(2, 85, 130, 0.4);
    --border: rgba(135, 206, 235, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--navy);
    color: var(--white);
    font-family: 'Comfortaa', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Exo 2', sans-serif; }

/* Loading Spinner */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--navy); z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.loading-spinner {
    width: 80px; height: 80px;
    animation: pulse-spin 3s infinite ease-in-out;
}
@keyframes pulse-spin {
    0% { transform: scale(0.9) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 15px var(--gold)); }
    100% { transform: scale(0.9) rotate(360deg); opacity: 0.8; }
}
.loading-text { margin-top: 1.5rem; color: var(--sky); font-size: 0.9rem; letter-spacing: 1px; }

/* Top Nav */
.top-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: rgba(1, 29, 48, 0.95); backdrop-filter: blur(10px); z-index: 100;
}
.nav-brand { display: flex; align-items: center; gap: 0.8rem; }
.nav-logo { width: 32px; height: 32px; }
.nav-brand h1 { font-size: 1.2rem; color: var(--sky); font-weight: 700; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }
.icon-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; position: relative; }
.badge {
    position: absolute; top: -5px; right: -8px; background: var(--gold); color: var(--navy);
    font-size: 0.6rem; font-weight: 700; padding: 2px 5px; border-radius: 10px;
}
.hidden { display: none; }
.profile-trigger { font-size: 0.85rem; color: var(--gold); font-weight: 600; cursor: pointer; }

/* Main Container */
.main-container { padding: 1.5rem; max-width: 800px; margin: 0 auto; padding-bottom: 80px; }

/* Calming Line */
.calming-line { text-align: center; margin-bottom: 2rem; }
.calming-line p { font-size: 1.1rem; color: var(--sky); font-style: italic; font-weight: 300; }

/* Breathe Widget */
.breathe-widget {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px;
    padding: 2rem; display: flex; flex-direction: column; align-items: center; text-align: center;
    margin-bottom: 2.5rem; position: relative; overflow: hidden;
}
.breathe-orb {
    width: 60px; height: 60px; background: var(--gold); border-radius: 50%;
    margin-bottom: 1.5rem; box-shadow: 0 0 30px rgba(245, 166, 35, 0.3);
    transition: transform 4s ease-in-out;
}
.breathe-widget.active .breathe-orb { transform: scale(2.5); }
.breathe-text h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.breathe-text p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* Buttons */
.btn-gold {
    background: var(--gold); color: var(--navy); border: none; padding: 0.7rem 1.5rem;
    border-radius: 50px; font-family: 'Exo 2', sans-serif; font-weight: 700; font-size: 0.9rem;
    cursor: pointer; transition: transform 0.2s;
}
.btn-gold:hover { transform: scale(1.05); }

/* Sanctuaries */
.section-title { font-size: 1rem; color: var(--text-muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }
.sanctuary-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.sanctuary-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px;
    padding: 1.5rem; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; transition: all 0.2s;
}
.sanctuary-card:hover { border-color: var(--sky); background: rgba(2, 85, 130, 0.6); }
.sanc-info h3 { font-size: 1.1rem; margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.5rem; }
.sanc-info p { font-size: 0.8rem; color: var(--text-muted); }
.sanc-presence { font-size: 0.75rem; color: var(--gold); display: flex; align-items: center; gap: 0.3rem; }
.presence-dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }

/* Bottom Nav */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(1, 29, 48, 0.98); border-top: 1px solid var(--border);
    display: flex; justify-content: space-around; padding: 0.8rem 0; backdrop-filter: blur(10px);
}
.nav-item { color: var(--text-muted); text-decoration: none; font-size: 0.75rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.nav-item.active { color: var(--gold); }

/* Responsive */
@media (min-width: 768px) {
    .sanctuary-grid { grid-template-columns: 1fr 1fr; }
    .bottom-nav { display: none; } /* Hide bottom nav on desktop, use top nav */
}