/* app_style.css */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 90px; /* Space for bottom nav */
    background-color: #f8fafc;
}

/* Base dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
    }
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #111827;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}
#splash-screen.hidden-splash {
    opacity: 0;
    visibility: hidden;
}

.splash-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    animation: pulseGlow 2s infinite alternate ease-in-out;
}
.splash-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 10;
    animation: floatLogo 3s ease-in-out infinite;
}

.splash-loading-bar {
    width: 150px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin-top: 40px;
    overflow: hidden;
    position: relative;
}
.splash-loading-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f98930, #8b5cf6);
    animation: loadingBar 2s ease-in-out forwards;
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 20px rgba(249, 137, 48, 0.2)); }
    100% { filter: drop-shadow(0 0 40px rgba(249, 137, 48, 0.6)); }
}
@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes loadingBar {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Glassmorphism Top Header */
.glass-header {
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
@media (prefers-color-scheme: dark) {
    .glass-header {
        background: rgba(15, 23, 42, 0.85);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* Bottom Navigation Bar */
.bottom-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: env(safe-area-inset-bottom, 12px); 
    box-shadow: 0 -10px 40px rgba(0,0,0,0.03);
}

@media (prefers-color-scheme: dark) {
    .bottom-nav {
        background: rgba(15, 23, 42, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
    }
}

.nav-item {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-item.active {
    color: #f98930; 
    transform: translateY(-4px);
}
.nav-item.active .nav-icon-bg {
    background: rgba(249, 137, 48, 0.15);
    border-radius: 12px;
    padding: 6px 12px;
}

/* Page transitions */
.page-container {
    display: none;
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.page-container.active {
    display: block;
}

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

/* Install Prompt Toast */
.install-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
}
.install-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Cards micro animations */
.card-hover {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:active {
    transform: scale(0.97);
}

/* Accordion Custom Logic */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, padding 0.4s ease;
    opacity: 0;
}
.accordion-toggle.active i.fa-chevron-down {
    transform: rotate(180deg);
}
.accordion-toggle.active + .accordion-content {
    opacity: 1;
    max-height: 1500px; /* large enough */
    padding-bottom: 1.25rem;
}

/* Hide Scrollbar */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
