@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Poppins:wght@600;700;800&display=swap');

:root {
    --primary-cobalt: #0B4C8F;
    --accent-cyan: #08FEFE;
    --bg-sky: #E0F7FA;
    --primary-dark: #003666;
    --secondary-blue: var(--bg-sky);
    --accent-pink: #FF9F43;
    --accent-yellow: #FFD60A;
    --accent-gray: #F8FAFC;
    --text-dark: #0F172A;
    --text-main: #334155;
    --text-light: #64748B;
    --white: #ffffff;
    --shadow-soft: 0 8px 20px rgba(11, 76, 143, 0.05);
    --shadow-medium: 0 12px 28px rgba(11, 76, 143, 0.08);
    --shadow-premium: 0 24px 50px rgba(11, 76, 143, 0.15);
    --glass: rgba(255, 255, 255, 0.6);
    --premium-glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.65) 0%, rgba(8, 254, 254, 0.15) 100%);
    --nav-height: 85px;
    --border-radius: 24px;
    
    /* Patterns */
    --brand-pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M30 10c-11.046 0-20 8.954-20 20s8.954 20 20 20 20-8.954 20-20-8.954-20-20-20zm0 36c-8.837 0-16-7.163-16-16s7.163-16 16-16 16 7.163 16 16-7.163 16-16 16z'/%3E%3Cpath d='M22 24c0-1.105.895-2 2-2s2 .895 2 2-.895 2-2 2-2-.895-2-2zM34 24c0-1.105.895-2 2-2s2 .895 2 2-.895 2-2 2-2-.895-2-2z'/%3E%3Cpath d='M20 34c0 5.523 4.477 10 10 10s10-4.477 10-10H20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    color: var(--text-dark);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

h1, h2, h3, .logo-text, .premium-header h2 { font-family: 'Poppins', sans-serif; }

#app {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Splash Screen - Clean Minimalist */
.splash-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: #ffffff !important;
    background-image: none !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-container {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    animation: splashLogoScale 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-logo-img {
    width: 240px;
    max-width: 90%;
    height: auto;
    object-fit: contain;
}

@keyframes splashLogoScale {
    0% { transform: scale(0.9); opacity: 0; filter: blur(15px); }
    100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

@keyframes breathing {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.03); filter: brightness(1.1); }
    100% { transform: scale(1); filter: brightness(1); }
}

.logo-container {
    background: transparent !important;
    position: relative;
    overflow: hidden;
    animation: splashLogoScale 2s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               breathing 4s ease-in-out infinite 2s;
}

/* Efecto de brillo premium que recorre el logo */
.logo-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 20%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: rotate(30deg);
    animation: premiumSweep 6s infinite linear 3s;
}

@keyframes premiumSweep {
    0% { left: -150%; }
    20% { left: 250%; }
    100% { left: 250%; }
}

.maplibregl-ctrl, .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left {
    display: none !important;
}

button, .card, .nav-item {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}
button:active, .card:active {
    transform: scale(0.95);
}




.bottom-nav {
    position: absolute;
    bottom: max(35px, env(safe-area-inset-bottom, 20px));
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    height: 80px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.25) 100%);
    backdrop-filter: blur(80px) saturate(250%);
    -webkit-backdrop-filter: blur(80px) saturate(250%);
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 50px rgba(11, 76, 143, 0.15), inset 0 1px 3px rgba(255,255,255,0.7);
    z-index: 1500;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible !important;
    gap: max(8px, 1.5vw);
}

.bottom-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy nav translation */
    min-width: 40px;
    flex-shrink: 1;
    padding: 2px 0;
    z-index: 2;
    transform: scale(1);
}

.nav-item:active {
    transform: scale(0.85);
    /* Satisfying tactile squish */
}

.nav-item .icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.nav-item .label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.nav-item.active { color: var(--primary-cobalt); } .go-nav-text { font-family: 'Poppins', sans-serif; font-weight: 900; font-size: 1.55rem; color: var(--primary-cobalt); letter-spacing: -1.5px; } .map-orb { background: white; width: 62px; height: 62px; border-radius: 50%; margin-top: -30px; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 35px rgba(11, 76, 143, 0.25), inset 0 2px 4px rgba(255,255,255,0.8); border: 3.2px solid var(--white); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .map-orb:hover { transform: scale(1.1) translateY(-5px); } .nav-item.active .map-orb { box-shadow: 0 0 30px rgba(11, 76, 143, 0.4); transform: translateY(-5px); }

.nav-item[data-page="map"] {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* utility classes */
.hidden {
    display: none !important;
}

#map-viewport-v11,
.map-viewport-v11 {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0;
    background: #eef2f7;
    overflow: hidden !important;
}

/* Magical Floating Markers */
@keyframes magical-float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes magical-glow {
    0% {
        filter: drop-shadow(0 0 5px rgba(67, 97, 238, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(67, 97, 238, 0.7));
    }

    100% {
        filter: drop-shadow(0 0 5px rgba(67, 97, 238, 0.3));
    }
}

        height: 0;
        opacity: 0;
        transform: scaleX(0.5);
    }

    20% {
        opacity: 0.6;
    }

    100% {
        height: 150px;
        opacity: 0;
        transform: scaleX(2);
    }
}

.highlight-poi::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 40px;
    height: 150px;
    background: linear-gradient(to top, var(--accent-pink), transparent);
    transform-origin: bottom center;
    transform: translateX(-50%);
    animation: magic-beam 3s infinite linear;
    pointer-events: none;
    z-index: -1;
}

.map-search-container {
    display: flex;
    flex-direction: row;
    gap: 10px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 15px 10px !important;
    padding: 0 !important;
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    z-index: 1000;
}

.map-search-container input::placeholder {
    color: #94a3b8 !important;
}

.map-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 15px 15px 15px;
    /* Added horizontal padding to prevent cut off */
    width: 100vw;
    max-width: 600px;
    position: absolute;
    top: 75px;
    left: 0;
    z-index: 999;
    box-sizing: border-box;
}

.map-filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.9) !important;
    color: var(--primary-cobalt) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 44, 119, 0.1) !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.filter-chip.active {
    background: var(--primary-cobalt) !important;
    color: white !important;
}

/* Branded Map Layer - Google-style */
.GoHappy-map-tiles.google-nav-mode {
    filter: saturate(1.15) contrast(1.02);
    /* Slight pop to Google's standard colors */
}

/* Ensure common Leaflet elements stay crisp */
.leaflet-container {
    background: #eef2f7 !important;
}

/* Profile & Gamification */
.profile-page {
    padding: 20px 20px 120px 20px;
    /* Increased bottom padding for QR visibility */
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Enforce centering */
}

.profile-hero {
    margin-bottom: 30px;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: var(--premium-shadow);
}

.gamification-card,
.invite-card {
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.level-badge {
    background: var(--primary-cobalt);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.level-progress-container {
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cobalt), var(--secondary-blue));
    transition: width 0.5s ease;
}

.referral-qr {
    margin: 20px auto;
    padding: 10px;
    background: white;
    width: fit-content;
    border-radius: 10px;
}

.referral-code-box {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed #ccc;
}

/* Star Rating System */
.star-rating {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 15px 0;
    font-size: 1.5rem;
}

.star {
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}

.star.active {
    color: #ffd700;
}

.post-input,
.review-input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 15px;
    font-family: inherit;
    resize: none;
    margin-bottom: 10px;
}

/* Page Transition */
.page-enter {
    animation: slideUpFade 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

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

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
    }

    100% {
        transform: scale(1);
    }
}

/* --- Premium Magic utility classes --- */
.premium-glass {
    background: var(--premium-glass-bg) !important;
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-medium), inset 0 1px 2px rgba(255, 255, 255, 0.8);
    border-radius: 32px;
}

.premium-shadow {
    box-shadow: var(--shadow-medium);
    transition: box-shadow 0.3s ease;
}

.premium-shadow:hover {
    box-shadow: var(--shadow-premium);
}

/* Staggered List Animation */
.stagger-group>* {
    opacity: 0;
    animation: slideUpFade 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.stagger-group>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-group>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-group>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-group>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-group>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* --- Component Styles --- */

/* Cards (News, Events) */
.content-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 24px;
    border-radius: 32px;
    box-shadow: 0 12px 30px rgba(11, 76, 143, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.card::before {
    /* Subtle internal shine */
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
}

.card:hover::before {
    left: 200%;
}

.card:active {
    transform: scale(0.96);
    box-shadow: 0 4px 10px rgba(0, 44, 119, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.badge {
    background-color: var(--secondary-blue);
    color: var(--primary-cobalt);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: var(--primary-cobalt);
}

.card p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.btn-text {
    background: none;
    border: none;
    color: var(--primary-cobalt);
    font-weight: 600;
    cursor: pointer;
}

/* Event Specifics */
.event-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.event-date-box {
    background: var(--secondary-blue);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    min-width: 60px;
}

.event-date-box .day {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-cobalt);
}

.event-date-box .month {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.event-details {
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-cobalt), #2A9DF4);
    color: var(--white);
    border: none;
    padding: 16px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(76, 201, 240, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: scale(0.5);
}

.btn-primary:hover::after {
    opacity: 1;
    transform: scale(1);
}

.btn-primary:active {
    transform: scale(0.92);
    box-shadow: 0 4px 10px rgba(76, 201, 240, 0.2);
}

/* Page Header - Mobile Optimized */
.page-header {
    padding: calc(env(safe-area-inset-top, 20px) + 15px) 20px 15px;
    text-align: center;
    width: 100%;
}

.page-header h2 {
    color: var(--primary-cobalt);
    font-weight: 800;
    margin-bottom: 5px;
}

/* Floating Action Button (FAB) */
.fab-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-cobalt), var(--primary-dark));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab-btn:active {
    transform: scale(0.9);
}

/* Marker Highlights & Pulses */
.locate-fab {
    bottom: max(115px, calc(env(safe-area-inset-bottom) + 90px));
    /* well above the bottom nav pill */
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    background: var(--white);
    color: var(--primary-cobalt);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.locate-fab:active {
    background: var(--secondary-blue);
}

/* User Marker Pulse */
.GoHappy-user-marker {
    position: relative;
    width: 45px;
    height: 45px;
}

.GoHappy-user-pin {
    position: relative;
    z-index: 2;
}

.user-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    background: var(--primary-cobalt);
    border-radius: 50%;
    z-index: 1;
    animation: gpsPulse 2s infinite ease-out;
}

@keyframes gpsPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

@keyframes marker-pulse {
    0% {
        transform: scale(1) rotateX(-25deg);
        filter: drop-shadow(0 0 0px var(--primary-cobalt));
    }

    50% {
        transform: scale(1.1) rotateX(-25deg);
        filter: drop-shadow(0 0 15px var(--primary-cobalt));
    }

    100% {
        transform: scale(1) rotateX(-25deg);
        filter: drop-shadow(0 0 0px var(--primary-cobalt));
    }
}

.highlight-poi .GoHappy-marker-pin {
    animation: marker-pulse 2s infinite ease-in-out;
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* padding-bottom: 80px; handled by main-content padding */
}

.chat-header {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.message.bot {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary-cobalt), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    position: fixed;
    /* Stick to bottom above nav */
    bottom: 85px;
    /* Above nav height */
    width: 100%;
    max-width: 600px;
    /* Match body max-width */
}

.chat-input-area input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid #ddd;
    outline: none;
    font-family: inherit;
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: var(--primary-cobalt);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Styles */
.profile-header {
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-cobalt), var(--primary-dark));
    color: white;
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-bottom: 20px;
}

.avatar-large {
    width: 80px;
    height: 80px;
    background: white;
    color: var(--primary-cobalt);
    border-radius: 50%;
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.rank-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 5px;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    background: white;
    padding: 15px;
    border-radius: 16px;
    min-width: 90px;
    box-shadow: var(--shadow);
}

.stat-item .count {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-cobalt);
}

.stat-item .label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.qr-section {
    text-align: center;
    padding: 20px;
    background: white;
    margin: 0 20px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

#qrcode img {
    margin-top: 15px;
    border-radius: 10px;
}

.btn-danger {
    display: block;
    width: calc(100% - 40px);
    margin: 20px 20px 40px;
    /* Added bottom margin */
    padding: 15px;
    background: white;
    color: #ff4d4d;
    border: 2px solid #ff4d4d;
    /* Outlined instead of solid block to reduce heavy red block */
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:active {
    background: #ff4d4d;
    color: white;
}

/* Auth Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 113, 252, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Centered instead of bottom-sheet for premium feel */
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 32px;
    padding: 45px 35px;
    box-shadow: 0 40px 100px -20px rgba(11, 113, 252, 0.3);
    animation: premiumPop 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes premiumPop {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.auth-card {
    text-align: center;
}

.logo-small svg {
    margin-bottom: 10px;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 16px;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    font-size: 1rem;
    background: #f8fafc;
    color: var(--primary-cobalt);
    transition: all 0.3s ease;
    outline: none;
}

.auth-input:focus {
    border-color: var(--primary-cobalt);
    background: white;
    box-shadow: 0 0 0 4px rgba(11, 113, 252, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-cobalt);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.divider {
    margin: 10px 0;
    color: #999;
}

.google-btn,
.apple-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    font-weight: 500;
    cursor: pointer;
}

/* =========================================
   EMERGENCY RESTORED STYLES
   ========================================= */

/* --- Consolidate Page Styles --- */
.premium-header {
    padding: calc(env(safe-area-inset-top, 20px) + 20px) 20px 10px;
}

.premium-header h2 {
    color: var(--primary-cobalt);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* News */
.news-card {
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: var(--shadow-soft) !important;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium) !important;
}

/* Events */
.event-card {
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 20px !important;
}

.event-date-box {
    background: var(--primary-cobalt) !important;
}

.event-date-box .day {
    color: white !important;
}

.event-date-box .month {
    color: rgba(255, 255, 255, 0.8);
}

/* Tribu */
.sticky-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-icon-pulse {
    width: 45px;
    height: 45px;
    border-radius: 16px;
    background: var(--primary-cobalt);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 44, 119, 0.2);
    transition: transform 0.2s;
}

.btn-icon-pulse:active {
    transform: scale(0.95);
}

.tribu-card,
.premium-glass,
.ranking-card,
.news-card,
.event-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    width: 95%;
    /* Better fit for centering */
    max-width: 460px;
    box-shadow: var(--premium-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tribu-header {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.tribu-avatar {
    width: 40px;
    height: 40px;
    background: var(--secondary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.tribu-info {
    display: flex;
    flex-direction: column;
}

.tribu-user {
    font-weight: 700;
    font-size: 0.95rem;
}

.tribu-time {
    font-size: 0.75rem;
    color: #94A3B8;
}

.tribu-content {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 15px;
}

.tribu-actions {
    display: flex;
    gap: 20px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.action-btn {
    background: none;
    border: none;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Ranking */
.center-text {
    text-align: center;
    margin-bottom: 20px;
}

.tab-scroller {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.tab-btn {
    background: #f1f5f9;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
}

.tab-btn.active {
    background: var(--primary-cobalt);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 44, 119, 0.2);
}


.rank-position {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 40px;
    text-align: center;
    font-weight: 800;
    color: var(--primary-cobalt);
}

.rank-info {
    flex: 1;
}

.rank-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-cobalt);
}

.rank-badge {
    background: rgba(0, 0, 0, 0.05);
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rank-score {
    font-weight: 700;
    color: var(--primary-cobalt);
}

.contributor-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-premium);
    border: 2px solid #FFD700;
}

.points-badge {
    background: #FFD700;
    color: var(--primary-cobalt);
    padding: 5px 12px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.85rem;
}

/* Chat */

.gradient-bg {
    background: linear-gradient(135deg, var(--primary-cobalt), var(--primary-cobalt));
    color: white;
}

.status-indicator {
    font-size: 0.7rem;
    color: #10B981;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.message {
    border-radius: 20px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
    padding: 10px 15px;
    display: inline-block;
    max-width: 80%;
}

.message.bot {
    background: white;
    border-bottom-left-radius: 5px !important;
    align-self: flex-start;
}

.message.user {
    background: var(--primary-cobalt);
    color: white;
    border-bottom-right-radius: 5px !important;
    align-self: flex-end;
}

@keyframes pulse-green {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* =========================================
   DEFINITIVE MAP ENGINE UI (v12 - Gemini)
   ========================================= */

/* Map Search Overlay */
.map-search-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 500px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-search-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 44, 119, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-search-bar:focus-within {
    background: white;
    box-shadow: 0 15px 40px rgba(0, 44, 119, 0.25);
    transform: scale(1.02);
}

.map-search-input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--primary-cobalt);
    outline: none;
}

#main-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 90px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gemini-sparkle {
    font-size: 1.2rem;
    margin-right: 5px;
    filter: drop-shadow(0 0 5px var(--primary-cobalt));
}

.locate-me-btn {
    background: var(--primary-cobalt);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 44, 119, 0.2);
    transition: all 0.2s;
}

.locate-me-btn:active {
    transform: scale(0.9);
}

/* Filter Chips */
.map-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0 10px;
    scrollbar-width: none;
}

.map-filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-cobalt);
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.filter-chip.active {
    background: var(--primary-cobalt);
    color: white;
    border-color: var(--primary-cobalt);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.4);
}

/* Custom Markers: Blue Star Glow */
.custom-div-icon {
    background: none;
    border: none;
}

.star-marker-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-icon {
    font-size: 26px;
    color: var(--primary-cobalt);
    filter: drop-shadow(0 0 8px rgba(76, 201, 240, 0.8));
    animation: starPulse 2s infinite ease-in-out;
}

@keyframes starPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(76, 201, 240, 0.8));
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 15px rgba(76, 201, 240, 1));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(76, 201, 240, 0.8));
    }
}

/* Premium Leaflet Popups */
.leaflet-popup-content-wrapper {
    border-radius: 20px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(0, 44, 119, 0.15);
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 240px !important;
}

.popup-premium {
    padding: 0;
}

.popup-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--secondary-blue);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.popup-body {
    padding: 15px;
}

.popup-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-cobalt);
    margin-bottom: 5px;
}

.popup-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.popup-rating {
    color: var(--accent-yellow);
    font-weight: 800;
}

.btn-external-maps {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: var(--primary-cobalt);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-external-maps:active {
    transform: scale(0.95);
    background: var(--primary-cobalt);
}

/* =========================================
   GoHappy QUEST - Misiones Familiares
   ========================================= */

.quests-page {
    padding: 0 0 120px 0;
}

.quest-stats-bar {
    display: flex;
    justify-content: space-around;
    margin: 10px 20px 15px;
    padding: 15px;
    border-radius: 20px;
}

.quest-stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-cobalt);
}

.stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quests-list {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quest-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quest-card:active {
    transform: scale(0.98);
}

.quest-done {
    opacity: 0.7;
}

.quest-card-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.quest-type-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.quest-meta {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: #888;
}

.quest-difficulty {
    font-weight: 600;
}

.quest-card-body {
    padding: 16px;
}

.quest-title {
    color: var(--primary-cobalt);
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.quest-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
}

.quest-objectives {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.quest-obj {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.quest-obj.obj-done {
    color: #27AE60;
    text-decoration: line-through;
    opacity: 0.7;
}

.obj-check {
    font-size: 16px;
}

.quest-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.quest-progress-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 10px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.quest-pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-cobalt);
    min-width: 35px;
}

.quest-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quest-reward {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-cobalt);
}

.quest-badge-done {
    font-size: 12px;
    color: #27AE60;
    font-weight: 700;
}

.btn-quest-action {
    background: linear-gradient(135deg, var(--primary-cobalt), var(--primary-cobalt));
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-quest-action:active {
    transform: scale(0.95);
}

/* =========================================
   GoHappy SAFE - Alertas de Seguridad
   ========================================= */

.safe-page {
    padding: 0 0 120px;
}

.alerts-list {
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-card {
    background: white;
    border-radius: 16px;
    display: flex;
    gap: 12px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s;
}

.alert-card:active {
    transform: scale(0.98);
}

.alert-card-left {
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.alert-card-body {
    flex: 1;
}

.report-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.type-btn {
    background: #f5f5f5;
    border: 2px solid transparent;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn.selected {
    border-color: var(--primary-cobalt);
    background: var(--secondary-blue);
    color: var(--primary-cobalt);
}

/* =========================================
   GoHappy MEMORIES - Diario Familiar
   ========================================= */

.memories-page {
    padding: 0 0 120px;
}

.memory-summary-card {
    margin: 10px 20px 15px;
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary-cobalt), #003D99);
    color: white;
}

.memory-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.memory-month {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.memory-emoji {
    font-size: 1.5rem;
}

.memory-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.memory-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 8px;
    border-radius: 16px;
}

.mem-stat-icon {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.mem-stat-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
}

.mem-stat-label {
    display: block;
    font-size: 0.6rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.memory-reflection {
    margin: 0 20px 15px;
    padding: 18px;
    border-radius: 20px;
}

.reflection-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-cobalt);
    margin-bottom: 8px;
}

.reflection-body {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    font-style: italic;
}

.memory-timeline {
    padding: 0 20px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 30px;
    bottom: -10px;
    width: 2px;
    background: #eee;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.timeline-content {
    flex: 1;
    padding: 12px 16px;
    border-radius: 16px;
}

.timeline-date {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.timeline-icon {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.timeline-content h4 {
    font-size: 14px;
    color: var(--primary-cobalt);
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.timeline-points {
    font-size: 11px;
    font-weight: 700;
    color: #27AE60;
    display: inline-block;
    margin-top: 6px;
}

/* Clean Navigator Mode GPS Styles */
.navigator-view .leaflet-pane.leaflet-map-pane {
    /* Perspective removed to make it native 2D flat Google style */
    transition: transform 0.5s ease;
}

.GoHappy-map-tiles.nav-brand-mode {
    filter: saturate(1.2) contrast(1.05);
}

.nav-mode-btn {
    background: linear-gradient(135deg, #1A2980, #26D0CE) !important;
    color: white !important;
    border-radius: 12px !important;
    margin-right: 5px !important;
    font-size: 14px !important;
    padding: 0 10px !important;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(38, 208, 206, 0.5);
    transition: all 0.3s ease;
}

.nav-mode-btn.active {
    background: linear-gradient(135deg, #FF416C, #FF4B2B) !important;
    box-shadow: 0 4px 15px rgba(255, 65, 108, 0.6);
    animation: navPulse 2s infinite;
}

@keyframes navPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.family-car-icon {
    font-size: 35px;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 15px rgba(76, 201, 240, 0.9);
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5));
    transform: translateY(-20px);
    animation: floatCar 2s ease-in-out infinite;
    position: relative;
}

.family-car-icon::after {
    content: "Fam";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF4B2B;
    color: white;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

@keyframes floatCar {

    0%,
    100% {
        transform: translateY(-20px) scale(1);
    }

    50% {
        transform: translateY(-25px) scale(1.05);
    }
}

/* =========================================
   USER PROFILE & GAMIFICATION UPGRADES
   ========================================= */

.profile-avatar-large {
    font-size: 4rem;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--secondary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 24px rgba(0, 44, 119, 0.15);
    border: 3px solid var(--white);
    animation: pulse 3s infinite ease-in-out;
}

.profile-name {
    color: var(--primary-cobalt);
    font-weight: 800;
    margin-bottom: 5px;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.level-badge {
    color: var(--primary-cobalt);
    font-weight: 800;
    background: var(--secondary-blue);
    padding: 4px 12px;
    border-radius: 20px;
}

.points-total {
    color: var(--primary-cobalt);
    background: rgba(76, 201, 240, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.level-progress-container {
    width: 100%;
    height: 16px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.level-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cobalt), #A2D2FF);
    border-radius: 20px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.level-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }

    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

.level-footer {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Ranking & Podium UI */
.ranking-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.podium-section {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    padding: 20px 10px;
    margin-bottom: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(76, 201, 240, 0.05) 100%);
    border-radius: 0 0 40px 40px;
}

.podium-card {
    background: var(--white);
    border-radius: 20px;
    padding: 12px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    flex: 1;
    max-width: 110px;
}

.podium-card.large {
    max-width: 130px;
    padding: 15px;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--accent-yellow);
    z-index: 2;
}

.podium-rank {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.podium-image,
.podium-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid var(--white);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.large .podium-image,
.large .podium-avatar {
    width: 80px;
    height: 80px;
}

.podium-info h4 {
    font-size: 12px;
    margin: 5px 0;
    color: var(--primary-cobalt);
}

.podium-info span {
    font-size: 11px;
    font-weight: 700;
    color: #FBC02D;
}

.ranking-rows {
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-row {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 12px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: transform 0.2s;
}

.ranking-row:active {
    transform: scale(0.98);
}

.row-rank {
    font-weight: 900;
    color: var(--text-light);
    min-width: 30px;
    font-size: 12px;
}

.row-thumb,
.row-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    margin-right: 12px;
    flex-shrink: 0;
}

.row-avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.row-info {
    flex: 1;
    overflow: hidden;
}

.row-info h4 {
    margin: 0;
    font-size: 14px;
    color: var(--primary-cobalt);
}

.row-type {
    font-size: 11px;
    color: var(--text-light);
}

.row-score {
    font-weight: 800;
    color: var(--primary-cobalt);
    font-size: 13px;
}

.is-me {
    border: 1px solid var(--primary-cobalt);
    background: rgba(76, 201, 240, 0.05);
}

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Profile Premium Styling */
.profile-hero-premium {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    margin-bottom: 10px;
}

.profile-avatar-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.profile-glow {
    border: 4px solid var(--white);
    /* Removed blue shadow as per user request */
}

.level-label-bubble {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-cobalt);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-name-premium {
    color: var(--primary-cobalt);
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    text-align: center;
}

.profile-badge-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.p-badge {
    background: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 5px;
}

.gamification-dashboard {
    margin: 0 20px 20px 20px;
    padding: 20px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.points-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-cobalt);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(0, 44, 119, 0.2);
}

.big-pts {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.pts-label {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.premium-progress-container {
    height: 12px;
    background: #eef2f6;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.premium-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cobalt), #4361ee);
    border-radius: 10px;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite linear;
}

.progress-flavor-text {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    font-weight: 600;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px 20px 20px;
}

.quick-card {
    background: white;
    padding: 15px;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.q-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.quick-card h4 {
    font-size: 13px;
    color: var(--primary-cobalt);
    margin: 0;
}

.quick-card p {
    font-size: 10px;
    color: #aaa;
    margin-top: 3px;
}

.referral-premium-box {
    margin: 0 20px 20px 20px;
    padding: 20px;
    border-radius: 28px;
    text-align: center;
}

.ref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    text-align: left;
}

.ref-texts h3 {
    font-size: 15px;
    color: var(--primary-cobalt);
    margin: 0;
}

.ref-texts p {
    font-size: 11px;
    color: var(--text-light);
    margin: 4px 0 0 0;
}

.ref-code-big {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-cobalt);
    background: rgba(76, 201, 240, 0.1);
    padding: 8px 15px;
    border-radius: 12px;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary-cobalt) 0%, #001A4A 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.qr-preview {
    margin: 20px auto 0 auto;
    background: white;
    padding: 10px;
    border-radius: 15px;
    width: 120px;
    display: flex;
    justify-content: center;
}

.account-actions-list {
    padding: 0 20px 50px 20px;
}

.action-list-item {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid #f0f4f8;
    padding: 18px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-cobalt);
    font-size: 14px;
    cursor: pointer;
}

.action-list-item.danger {
    color: #e63946;
    border-bottom: none;
}

/* --- Today Tab Enhanced Styles --- */
.questionnaire-container {
    padding: 25px;
    background: var(--white);
    border-radius: 30px;
    box-shadow: var(--shadow-premium);
    margin: 10px;
    border: 1px solid rgba(0, 44, 119, 0.05);
}

.q-step {
    margin-bottom: 25px;
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.5s forwards;
}

.q-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-cobalt);
    margin-bottom: 12px;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-chip {
    padding: 10px 18px;
    border-radius: 50px;
    background: #f1f5f9;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
}

.option-chip.selected {
    background: var(--primary-cobalt);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 44, 119, 0.2);
}

.today-card-premium {
    background: var(--white);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(76, 201, 240, 0.1);
    position: relative;
    overflow: hidden;
}

.today-card-premium .card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.today-card-premium .age-badge {
    background: rgba(76, 201, 240, 0.12);
    color: var(--primary-cobalt);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary-cobalt), #0045BD);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 44, 119, 0.2);
    transition: all 0.3s ease;
}

.btn-primary-gradient:active {
    transform: scale(0.96);
}

.usage-limit-banner {
    background: #FFF9C4;
    padding: 15px;
    border-radius: 16px;
    margin: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: #827717;
    border: 1px solid #FBC02D;
}

/* End of main.css */

