:root {
    /* Premium Color Palette */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #a855f7;
    --accent: #f43f5e;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #0ea5e9;

    /* Neutral / Surface */
    --bg-main: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;

    /* Shadows - Deep & Modern */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-premium: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Glass Effects */
    --glass-bg: #ffffff;
    --glass-border: #ffffff;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

* {
    caret-color: auto;
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    transition: none !important;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    width: 100vw;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

#app {
    pointer-events: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Native Physics Wrapper (Added in Pass 35) */
.webview-container {
    -webkit-overflow-scrolling: touch !important; /* Momentum scrolling on iOS/Android WebViews */
    overscroll-behavior-y: none !important; /* Prevent pull-to-refresh rubber-banding at the root */
    transform: translateZ(0); /* Force GPU acceleration for the scrolling container */
    will-change: transform, scroll-position;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.glass-panel {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-premium);
}

.modern-card {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(241, 245, 249, 1);
    box-shadow: none;
    transition: none;
}

.modern-card:active {
    transform: scale(0.98);
}

/* Floating Glass Navigation (Reference Match) */
.floating-nav {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    height: 80px;
    background: #ffffff;
    border-radius: 40px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-shadow: none;
    z-index: 1000;
    padding: 0 10px;
}

/* Header Textures */
.mesh-gradient {
    background: #1e1b4b;
}

/* Optimized Authentication Backgrounds */
.auth-bg {
    background-color: #f8fafc; /* Tailwind slate-50 */
    background-image: 
        radial-gradient(at 0% 0%, rgba(129, 140, 248, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(244, 114, 182, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(251, 113, 133, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.auth-bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.auth-bg-shapes::before,
.auth-bg-shapes::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    transform: translateZ(0); /* Force GPU acceleration */
    will-change: transform;
    animation: authFloat 10s infinite ease-in-out alternate;
}

.auth-bg-shapes::before {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    max-width: 400px;
    max-height: 400px;
    background: #818cf8; /* indigo-400 */
}

.auth-bg-shapes::after {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 500px;
    max-height: 500px;
    background: #f9a8d4; /* fuchsia-300 */
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes authFloat {
    0% { transform: translate(0, 0) scale(1) translateZ(0); }
    100% { transform: translate(30px, -30px) scale(1.05) translateZ(0); }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: none;
    opacity: 1;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.15s;
}

.delay-300 {
    animation-delay: 0.2s;
}

.delay-400 {
    animation-delay: 0.25s;
}

.delay-500 {
    animation-delay: 0.3s;
}

/* Background Blob Animation */
@keyframes blob {

    0%,
    100% {
        transform: translate(0px, 0px) scale(1);
    }

    50% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

.animate-blob {
    display: none;
}

/* Nav Active State (Reference Match) */
.nav-btn {
    position: relative;
    padding: 10px 16px;
    border-radius: 20px;
    transition: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 64px;
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn i,
.nav-btn svg,
.nav-btn .lucide {
    color: #64748b;
    /* Text Muted */
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
}

.nav-btn span {
    color: #64748b;
    /* Text Muted */
    font-size: 11px;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Active State: Vivid Purple, No Background */
.nav-btn.active i,
.nav-btn.active svg,
.nav-btn.active .lucide {
    color: #6366f1;
    /* Primary Purple */
    stroke: #6366f1;
}

.nav-btn.active span {
    color: #6366f1;
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 10px;
}

/* Floating Action Button */
.fab {
    position: absolute;
    bottom: 110px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: var(--primary);
    color: white;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: none;
    z-index: 900;
}

.fab:active {
    transform: scale(0.9) rotate(5deg);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 360px;
    border-radius: 32px;
    padding: 24px;
    box-shadow: none;
    max-height: 90%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-overlay.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content>* {
    flex-shrink: 0;
}

/* Hide scrollbar */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(6deg);
    }

    50% {
        transform: translateY(-10px) rotate(8deg);
    }
}

/* animate-float removed */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: none;
    opacity: 1;
}

.py-4\.5 {
    padding-top: 1.125rem;
    padding-bottom: 1.125rem;
}