/* Base Settings */
body { font-family: 'Plus Jakarta Sans', sans-serif; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c7c7c7; border-radius: 10px; }

/* Animations */
.fade-in { animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.slide-up { animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.scale-in { animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.animate-bounce-in { animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounceIn {
    0% { transform: translate(-50%, 20px) scale(0.9); opacity: 0; }
    100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-dark {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-tab {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Custom Checkbox */
.custom-checkbox:checked + div { background-color: #4f46e5; border-color: #4f46e5; }
.custom-checkbox:checked + div svg { display: block; }

/* Toggle Switch */
.toggle-checkbox:checked { right: 0; border-color: #ec4899; }
.toggle-checkbox:checked + .toggle-label { background-color: #ec4899; }

/* Meal Radio Button Visual State */
.meal-radio:checked + div {
    background-color: #0f172a;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #0f172a;
}

/* Weather Animations */
.pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }

/* AI Typing Effect */
.typing::after { content: '...'; animation: typing 1s infinite; }
@keyframes typing { 0% { content: '.'; } 33% { content: '..'; } 66% { content: '...'; } }

/* Chat Bubbles */
.chat-user {
    background: #0f172a;
    color: white;
    border-radius: 18px 18px 2px 18px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.chat-ai {
    background: white;
    color: #475569;
    border-radius: 18px 18px 18px 2px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}
.prose p { margin-bottom: 0.5em; }
.prose ul { list-style-type: disc; padding-left: 1.2em; margin-bottom: 0.5em; }
.prose strong { color: #4f46e5; font-weight: 700; }

/* AI Scanner Visuals */
.scan-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #6366f1;
    box-shadow: 0 0 15px #6366f1, 0 0 5px #6366f1;
    animation: scanMove 3s ease-in-out infinite;
    z-index: 10;
}
@keyframes scanMove {
    0%, 100% { top: 0%; }
    50% { top: 100%; }
}

/* Button & Card States */
.active-pill {
    transform: scale(1.05);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mood-btn.active {
    background: #fce7f3;
    border-color: #ec4899;
}
.sleep-q-btn.active {
    background: #e0e7ff;
    border-color: #6366f1;
}

.nav-btn.active {
    position: relative;
}
.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
}