html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Inter', sans-serif;
    background: #FAFAF7;
    -webkit-font-smoothing: antialiased;
}
.font-serif { font-family: 'Instrument Serif', serif; }

.gradient-bg {
    background: linear-gradient(135deg, #C8F558 0%, #A8E040 100%);
}
.gradient-dark {
    background: linear-gradient(180deg, #0A0A0A 0%, #1a1a1a 100%);
}
.gradient-mesh {
    background:
        radial-gradient(at 20% 30%, rgba(200, 245, 88, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 20%, rgba(120, 119, 198, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 90%, rgba(200, 245, 88, 0.08) 0px, transparent 50%);
}

.phone-shadow {
    box-shadow:
        0 50px 100px -20px rgba(0, 0, 0, 0.35),
        0 30px 60px -30px rgba(0, 0, 0, 0.3),
        inset 0 -2px 6px rgba(255,255,255,0.1);
}
.card-shadow {
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
}
.card-shadow-lg {
    box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 20px 60px rgba(0,0,0,0.08);
}
.hover-lift {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 30px 80px rgba(0,0,0,0.12);
}

.noise {
    position: relative;
}
.noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
}
.glass-dark {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
}

.text-gradient {
    background: linear-gradient(135deg, #0A0A0A 0%, #4a4a4a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.text-gradient-lime {
    background: linear-gradient(135deg, #D4FF3A 0%, #C8F558 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 30px rgba(200, 245, 88, 0.4); 
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.marquee-track:hover {
    animation-play-state: paused;
}

.grid-pattern {
    background-image:
        linear-gradient(rgba(10,10,10,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10,10,10,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dot-pattern {
    background-image: radial-gradient(rgba(10,10,10,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.scroll-fade {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.card-hover-border {
    position: relative;
    background: white;
}
.card-hover-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(200,245,88,0), rgba(200,245,88,0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.5s;
}
.card-hover-border:hover::before {
    background: linear-gradient(135deg, rgba(200,245,88,1), rgba(200,245,88,0.2));
}

.shine {
    position: relative;
    overflow: hidden;
}
.shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.8s;
}
.shine:hover::before { left: 100%; }

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }

::selection {
    background: #C8F558;
    color: #0A0A0A;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

#mobileMenu {
    transition: all 0.3s ease-in-out;
}
.mobile-dropdown-content {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}
.mobile-dropdown-content.active {
    max-height: 500px;
}

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 100;
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}
.dropdown-item:hover { background: #FAFAF7; }
.dropdown-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 245, 88, 0.15);
    color: #0A0A0A;
    border-radius: 10px;
    font-size: 16px;
}
.dropdown-divider {
    height: 1px;
    background: rgba(0,0,0,0.05);
    margin: 8px 0;
}

/* Gold text for footer newsletter */
.gold-text {
    background: linear-gradient(135deg, #C8F558 0%, #D4FF3A 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Shake animation for error */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.6s ease-in-out;
}

/* Enhanced focus states */
.otp-input:focus {
    transform: scale(1.05);
}

/* Smooth transitions for inputs */
.otp-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   IPHONE-STYLE PRELOADER OVERLAY
============================================ */
.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preloader-overlay.active {
    opacity: 1;
}

/* ============================================
   IPHONE PRELOADER BOX
============================================ */
.preloader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 14px;
    width: 120px;
    height: 120px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preloader-overlay.active .preloader-content {
    transform: scale(1);
}

/* ============================================
   SPINNER - SMALL, FAST, CLEAN
============================================ */
.preloader-spinner {
    position: relative;
    width: 32px;
    height: 32px;
}

.preloader-spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2.5px solid rgba(0, 0, 0, 0.08);
    border-top-color: #000000;
    border-radius: 50%;
    animation: preloaderSpin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes preloaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   LOADING TEXT (Optional)
============================================ */
.preloader-text {
    font-family: -apple-system, 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.5);
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.preloader-text-dots span {
    display: inline-block;
    animation: preloaderDots 1.2s infinite;
}

.preloader-text-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.preloader-text-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes preloaderDots {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Button shimmer effect */
.btn-primary2:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Success state for inputs */
.otp-input.success {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
}

/* Error state for inputs */
.otp-input.error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

/* Pulse animation for security icon */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

.animate-ping {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   USER AREA HEADER STYLES
   ============================================ */

/* Mobile menu overlay */
#mobileMenuOverlay {
    transition: opacity 0.3s ease;
}

/* Mobile menu drawer */
#mobileMenuDrawer {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* User dropdown */
#userDropdown {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Notification dropdown */
#notificationDropdown {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Active nav link */
.nav-link-active {
    background: #0A0A0A;
    color: white;
}

/* Bottom nav for mobile */
.bottom-nav-item {
    transition: all 0.2s ease;
}
.bottom-nav-item.active {
    color: #7a982d;
}
.bottom-nav-item.active .bottom-nav-icon {
    background: #C8F558;
    color: #0A0A0A;
}

/* Padding for bottom nav on mobile */
@media (max-width: 768px) {
    main {
        padding-bottom: 80px;
    }
}

/* Back Navigator Styles */
.back-navigator {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.back-navigator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(200, 245, 88, 0.15), transparent);
    transition: left 0.6s;
}
.back-navigator:hover::before {
    left: 100%;
}
.back-navigator:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.back-navigator.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

/* Dark gradient hero section */
.dashboard-hero {
    background: linear-gradient(135deg, #0A0A0A 0%, #1a1a1a 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}
.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200, 245, 88, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

/* Dot Navigation Styles */
.card-dot,
.account-dot {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card-dot.active,
.account-dot.active {
    background: #C8F558 !important;
    width: 1.5rem !important;
    border-radius: 9999px;
}

.card-dot:hover:not(.active),
.account-dot:hover:not(.active) {
    background: rgba(200, 245, 88, 0.5);
}

/* Active Bubble (Mobile Nav) */
.active-bubble {
    background: linear-gradient(343deg, #C8F558 0%, #D4FF3A 100%);
    border: 3px solid #000000;
    border-bottom: 0 !important;
    position: relative;
    z-index: 20;
}

/* Create the bottom half border effect */
.active-bubble::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: #FAFAF7;
}

/* Footer top border that aligns with bubble */
nav.fixed.bottom-0 .bg-white {
    border-top: 3px solid #000000;
    position: relative;
}

/* Make the border flow seamlessly */
nav.fixed.bottom-0 .bg-white::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background: transparent;
}

/* Sidebar menu item */
.sidebar-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.sidebar-item:hover {
    background: #FAFAF7;
}
.sidebar-item.active {
    background: #0A0A0A;
    color: white;
}
.sidebar-item.active .sidebar-icon {
    color: #C8F558;
}
.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #C8F558;
    border-radius: 0 4px 4px 0;
}

/* Prevent mobile horizontal overflow */
.dashboard-layout {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Ensure all content respects container width */
.dashboard-layout * {
    box-sizing: border-box;
}

/* Quick action button - clean neutral style with soft lime tint */
.quick-action {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.quick-action:hover {
    transform: translateY(-3px);
    background: #FAFAF7;
    border-color: #C8F558;
    box-shadow: 0 10px 25px rgba(200, 245, 88, 0.15);
}
.quick-action:hover .qa-icon {
    background: rgba(200, 245, 88, 0.2);
    color: #0A0A0A;
    transform: scale(1.08);
}
.quick-action:hover .qa-label {
    color: #0A0A0A;
}

/* Transaction row hover */
.transaction-row {
    transition: all 0.2s ease;
}
.transaction-row:hover {
    background: #FAFAF7;
    transform: translateX(2px);
}

/* Scrollbar for sidebar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* Desktop layout offset */
@media (min-width: 1024px) {
    .dashboard-layout {
        padding-left: 300px;
    }
    .lg-footer-offset {
        margin-left: 300px;
    }
}

/* Mobile responsive fixes */
@media (max-width: 767px) {
    .dashboard-layout {
        width: 100%;
        padding-left: 0 !important;
        overflow-x: hidden;
    }
    
    .two-col-section {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .card-slide {
        width: 100% !important;
        max-width: 260px !important;
    }
    
    .account-card {
        width: 100% !important;
        max-width: 260px !important;
    }
}