/* ============================================================
   Eco-Corp: Jezero – Custom Styles
   ============================================================ */

/* --- Global --- */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    transition: background 2s ease, color 1s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Glass Card --- */
.glass-card {
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* --- Balance Pulse Animation --- */
.balance-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.03);
    }
}

/* --- Floating Animation (Hero) --- */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* --- Pollution Slider --- */
.pollution-slider {
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg,
        hsl(200, 70%, 70%) 0%,
        hsl(150, 50%, 50%) 37%,
        hsl(80, 60%, 40%) 60%,
        hsl(30, 60%, 30%) 80%,
        hsl(0, 0%, 15%) 100%);
    border-radius: 9999px;
    outline: none;
    height: 12px;
}

.pollution-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.pollution-slider::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

.pollution-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(0, 0, 0, 0.15);
}

/* --- Pollution Badge Pulse --- */
.pollution-badge {
    animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* --- Input focus glow --- */
input:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
}

/* --- Mobile touch targets --- */
button,
a,
[role="button"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Fix for action cards to allow text-left */
form button.text-left {
    justify-content: flex-start;
}

/* --- Responsive fine-tuning --- */
@media (max-width: 640px) {
    .glass-card {
        border-radius: 16px;
    }
}

/* --- Transition for blur reveal on riddle solutions --- */
.blur-sm {
    transition: filter 0.3s ease;
}