:root {
    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    --math-line: #94a3b8;
}


/* 🔥 GLOBAL PERFORMANCE BOOST */

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;

    background: radial-gradient(circle at 20% 20%, rgba(56,189,248,0.2), transparent 45%),
                radial-gradient(circle at 80% 40%, rgba(99,102,241,0.2), transparent 45%),
                radial-gradient(circle at 50% 90%, rgba(14,165,233,0.15), transparent 50%),
                #020617;
}

/* 🔥 OPTIMIZED GLASS */
.glass {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: backdrop-filter;
}

/* Math */
.math-frac {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}
.math-top {
    border-bottom: 2px solid var(--math-line);
    padding: 0 8px 2px;
}
.math-bottom {
    padding: 2px 8px 0;
}

/* Sidebar */
#sidebar {


    transform: translateX(-100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);




}
#sidebar.open {
    transform: translateX(0);
}

/* Overlay */
#sidebarOverlay {
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}
#sidebarOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}
#sidebarOverlay:not(.hidden) {
    opacity: 1;
}

/* Content */
#contentArea {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Nav */
.nav-item.active {
    background-color: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 10px; }

/* Fade animation */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Canvas */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
footer {
    width: 100%;
    overflow-x: hidden;
}
/* 🔥 OPTIMIZED BACKGROUND GLOW */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(236,72,153,0.15), transparent 40%),
                radial-gradient(circle at 80% 30%, rgba(59,130,246,0.15), transparent 40%),
                radial-gradient(circle at 50% 80%, rgba(34,197,94,0.1), transparent 40%);
    filter: blur(40px);
    z-index: 1;

    will-change: transform;
    transform: translateZ(0);
}

nav, main, footer {
    position: relative;
    z-index: 10;
}

/* ===== PREMIUM LOGO ===== */

/* FAQ */
.faq-item {
    transition: transform 0.25s ease;
    will-change: transform;
    transform: translateZ(0);
}
.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.15);
}

.faq-answer-wrapper {
    overflow: hidden;
    transform: scaleY(0.95);
    opacity: 0;
    height: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.faq-item.active .faq-answer-wrapper {
    transform: scaleY(1);
    opacity: 1;
    height: auto;
}
/* Custom Result Cards Styling */
.vtu-card {
    background: #1e293b; /* Matches your dark slate theme */
    border-radius: 40px; /* Highly rounded corners as per image */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    text-align: center;
    transition: transform 0.3s ease;
}
@media (min-width: 768px) {
    .vtu-card {
        border-radius: 45px;
        min-height: 220px;
    }
}

.vtu-card:hover {
    transform: translateY(-5px);
}

.vtu-card-top {
    padding: 20px 10px 10px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #94a3b8; /* slate-400 */
    text-transform: uppercase;
}

.vtu-card-bottom {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px; /* Inner rounded effect */
    margin: 5px;
    padding: 20px;
}
@media (min-width: 768px) {
    .vtu-card-bottom {
        border-radius: 35px;
        margin: 8px;
        padding: 20px;
    }
}

/* Specific styling for the Division card text to wrap like the image */
#division {
    max-width: 200px;
    margin: 0 auto;
}
/* WhatsApp style bottom nav */
.nav-bottom-item {
    transition: all 0.25s ease;
}

.nav-bottom-item.active {
    color: #2256c5; /* WhatsApp green */
}

.nav-bottom-item.active svg {
    stroke: #3522c5;
}

/* Slight press effect */
.nav-bottom-item:active {
    transform: scale(0.92);
}
/* Mobile bottom spacing */
@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}
#bottomNav .glass {
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.support-tab {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    transition: 0.3s;
    background: transparent;
    padding: 4px 6px;
}

.support-tab:hover {
    color: #6366f1;
}

.support-tab.active {
    color: #6366f1;
    font-weight: 600;
}
.justify-text {
    text-align: justify;
    text-justify: inter-word;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.nav-bottom-item:active {
    transform: scale(0.95);
}
#bottomNav {
    min-height: 75px;
}
  @keyframes float-cap {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-2px); }
  }
  @keyframes pulse-plus {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15); }
  }
  .cap-icon { animation: float-cap 2.5s ease-in-out infinite; }
  .plus-icon { animation: pulse-plus 2.5s ease-in-out infinite; }
  .footer-link {
  position: relative;
}

.footer-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background: #6366f1;
  transition: 0.3s;
}

.footer-link:hover::after {
  width: 100%;
}
/* ACTIVE STATE */
.nav-bottom-item.active {
  color: #6366f1;
}

.nav-bottom-item.active svg {
  filter: drop-shadow(0 0 6px rgba(99,102,241,0.6));
}

/* HOVER (DESKTOP TESTING) */
.nav-bottom-item:hover {
  color: white;
}

/* ICON WRAPPER */
.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SPECIAL DESIGN FOR CALCULATOR MOBILE CENTER BUTTON */
.nav-bottom-item[data-page="calculator"] {
    background-color: #2563eb !important; /* Premium Blue */
    color: #ffffff !important;
}

.nav-bottom-item[data-page="calculator"]:hover {
    background-color: #3b82f6 !important; /* Lighter Blue hover */
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.05);
}

.nav-bottom-item[data-page="calculator"].active {
    background-color: #1d4ed8 !important; /* Darker Blue active */
    color: #ffffff !important;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.8) !important;
    transform: translateY(-6px) scale(1.1) !important; /* Popped up slightly more when active! */
}

.nav-bottom-item[data-page="calculator"] svg {
    stroke: #ffffff !important;
}

.nav-bottom-item[data-page="calculator"].active svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8)) !important;
    stroke: #ffffff !important;
}

.nav-bottom-item[data-page="calculator"].active + span {
    color: #ffffff !important; /* Bright white text highlight when active! */
    font-weight: 600;
}

/* SAFE CONTENT SPACING */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}
#navIndicator {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    display: block !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure the nav items are relative so the indicator can position itself */
.nav-container-class { /* Replace with your actual nav wrapper class */
    position: relative;
}
#sidebar .nav-item.active {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}


#sidebar nav {
    display: flex;
    flex-direction: column;
}

/* Remove spinner arrows from number inputs */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ===== MOBILE VIEW & HORIZONTAL SCROLL OPTIMIZATION ===== */
@media (max-width: 1023px) {
    html, body {
        overflow-x: hidden !important;
        position: relative;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Fix classic Flexbox child width expansion bug on mobile */
    main {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Constraint for all grid wrapper containers on mobile */
    .dashboard-grid, .max-w-5xl, .max-w-4xl, #aiInsightsBox {
        width: auto !important; /* Auto-width respects parent padding perfectly on mobile */
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Prevent grid items from expanding past their columns due to child dimensions */
    .dashboard-grid > div {
        min-width: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure charts, tables, SVGs, and other media scale within their container width */
    canvas, svg, img, table, iframe {
        max-width: 100% !important;
    }
}

