* { 
    font-family: 'Inter', sans-serif; 
    -webkit-tap-highlight-color: transparent; 
    transition: background-color 0.3s, color 0.3s; 
}
body { 
    background-color: #f0f4f8; 
    overflow: hidden; 
}

@keyframes bubblePop {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.page { 
    display: none; 
    animation: bubblePop 0.3s ease-out; 
    will-change: transform, opacity; 
}
.active-page { 
    display: block; 
}

.hide-scrollbar::-webkit-scrollbar { 
    display: none; 
}

.app-shell { 
    max-width: 100%; 
    margin: 0 auto; 
    background: #ffffff; 
    height: 100vh; 
    position: relative; 
    overflow: hidden; 
}
@media (min-width: 768px) {
    .app-shell { 
        max-width: 850px; 
        margin: 2vh auto; 
        height: 96vh; 
        border-radius: 3rem; 
        box-shadow: 0 40px 80px -15px rgba(0,0,0,0.15); 
    }
}

.auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background: linear-gradient(-45deg, #0f172a, #1e3a8a, #312e81, #1e40af);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}
.auth-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    z-index: 1;
}

.auth-content-box {
    position: relative;
    z-index: 10;
    background: white;
    border-radius: 35px 35px 0 0;
    padding: 40px 30px;
    margin-top: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
}
.auth-input {
    border-radius: 1.2rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 18px 22px;
    font-size: 1rem;
    transition: all 0.2s;
}
.auth-input:focus {
    border-color: #1e3a8a;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
    outline: none;
}

.toggle-btn-active { color: #1e3a8a !important; }
.toggle-btn-inactive { color: white !important; }
#toggle-bg { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.cat-item.active { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }

#side-drawer { position: fixed; inset: 0; z-index: 500; display: none; background: rgba(0,0,0,0.5); }
#drawer-content {
    width: 280px; height: 100%; background: white; position: relative; 
    transform: translateX(-100%); transition: transform 0.3s ease; 
}
#side-drawer.open { display: block; }
#side-drawer.open #drawer-content { transform: translateX(0); }

#scroll-area { scroll-behavior: smooth; }

.loading-overlay { 
    display: none; 
    position: fixed; 
    inset: 0; 
    background: rgba(255,255,255,0.8); 
    z-index: 9999; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
}
.loading-overlay.active { display: flex; }
.spinner { 
    width: 50px; 
    height: 50px; 
    border: 5px solid #e2e8f0; 
    border-top: 5px solid #1e3a8a; 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
