/* ===== LUCID LENS DESIGN SYSTEM ===== */

/* Glass Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* 3D Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0) rotateX(2deg) rotateY(-5deg); }
    50% { transform: translateY(-20px) rotateX(5deg) rotateY(2deg); }
}
.animate-float {
    animation: float 8s ease-in-out infinite;
    transform-style: preserve-3d;
}

/* Subtle Glow Animation */
@keyframes subtle-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.4); }
}
.glow-button {
    animation: subtle-glow 4s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Perspective */
.perspective-lg {
    perspective: 2000px;
}

/* Floating Layer Transition */
.floating-layer {
    transition: transform 0.2s ease-out;
}

/* Reticle Corners */
.reticle-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #3B82F6;
}

/* Phone Scanner Animation */
@keyframes scan-move {
    0%, 100% { transform: translate(-10%, -10%); }
    50% { transform: translate(10%, 10%); }
}
.animate-scan {
    animation: scan-move 6s ease-in-out infinite;
}

/* Scanline animation */
@keyframes scanline {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Material Symbols adjustments */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ===== NAV OVERRIDES ===== */
/* Override the existing header styles for new nav */
#header-container.lucid-nav {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.3) !important;
    box-shadow: none !important;
    height: auto !important;
    padding: 0 !important;
}

#header-container.lucid-nav #header {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    height: auto !important;
    padding: 0 !important;
}

/* ===== DASHBOARD SIDEBAR LUCID ===== */
.lucid-sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    min-height: calc(100vh - 72px);
    height: calc(100vh - 72px);
    position: sticky;
    top: 72px; /* Header height */
    align-self: flex-start;
    overflow-y: auto;
    z-index: 99;
}

/* Correct dashboard container height to match our 72px nav */
.dashboard-container {
    height: calc(100vh - 72px);
}

/* On mobile/tablet: reset sidebar to auto height so it doesn't push content down */
@media (max-width: 992px) {
    .lucid-sidebar {
        min-height: auto !important;
        height: auto !important;
        position: relative !important;
        top: auto !important;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        overflow: visible !important;
    }
    .dashboard-container {
        height: auto !important;
    }
    /* Reset simplebar's absolute-positioned internals to normal flow on mobile.
       Simplebar uses position:absolute on simplebar-mask/offset which causes
       content to escape the sidebar and overlap the fixed header. */
    .lucid-sidebar .simplebar-wrapper,
    .lucid-sidebar .simplebar-mask,
    .lucid-sidebar .simplebar-offset,
    .lucid-sidebar .simplebar-content-wrapper,
    .lucid-sidebar .simplebar-content {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        height: auto !important;
        overflow: visible !important;
        direction: ltr !important;
    }
    .lucid-sidebar .simplebar-track {
        display: none !important;
    }
    .lucid-sidebar [data-simplebar] {
        overflow: visible !important;
    }
}

.lucid-sidebar .dashboard-nav-inner ul {
    padding: 0;
    list-style: none;
    margin-bottom: 1.5rem;
}

.lucid-sidebar .dashboard-nav-inner > ul::before {
    content: attr(data-submenu-title);
    display: block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.25rem;
}

.lucid-sidebar .dashboard-nav-inner ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.lucid-sidebar .dashboard-nav-inner ul li a:hover,
.lucid-sidebar .dashboard-nav-inner ul li.active a {
    background: #eff6ff;
    color: #3b82f6;
}

/* ===== BODY / GLOBAL ===== */
body {
    background-color: #F8FAFC;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Push body below fixed nav */
#wrapper {
    padding-top: 72px;
}

/* Dashboard wrapper — keep flex layout */
#wrapper.dashboard-wrapper {
    display: flex;
}

/* Prevent the native browser scrollbar on dashboard pages.
   body.dashboard-page stops the PAGE from scrolling; only
   the inner simplebar on .dashboard-content-container scrolls. */
body.dashboard-page {
    overflow: hidden;
}

/* Give the content container an explicit height so simplebar knows
   how tall its scrollable area is. */
#wrapper.dashboard-wrapper .dashboard-content-container {
    height: calc(100vh - 72px);
}

/* Lucid card style */
.lucid-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}
.lucid-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
}

/* Lucid stat card */
.lucid-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lucid-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Pricing plan lucid style */
.pricing-plan {
    background: #ffffff;
    border: 1px solid #e2e8f0 !important;
    border-radius: 1.5rem !important;
    padding: 2rem !important;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.pricing-plan:hover {
    box-shadow: 0 20px 40px -10px rgba(59,130,246,0.12);
    transform: translateY(-4px);
}
.pricing-plan.recommended {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px #3b82f6 !important;
}

/* Blog card lucid style */
.blog-compact-item-container {
    display: block;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.blog-compact-item-container:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

/* Font overrides for headlines */
h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
}

/* ===== PREMIUM BUTTON OVERRIDES ===== */
.button, 
button[type="submit"].button, 
.button.ripple-effect,
a.button.ripple-effect {
    background: #2563eb !important; /* bg-blue-600 */
    color: #ffffff !important;
    border-radius: 1rem !important; /* rounded-2xl */
    font-weight: 900 !important; /* font-black */
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.2em !important;
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.2), 0 8px 10px -6px rgba(37, 99, 235, 0.2) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.button:hover, 
button[type="submit"].button:hover, 
.button.ripple-effect:hover,
a.button.ripple-effect:hover {
    background: #1d4ed8 !important; /* bg-blue-700 */
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 25px 50px -12px rgba(29, 78, 216, 0.3) !important;
}

.button:active, 
button[type="submit"].button:active, 
.button.ripple-effect:active,
a.button.ripple-effect:active {
    transform: scale(0.95) !important;
}


/* ===== RESPONSIVE FIXES ===== */
/* Prevent any horizontal overflow at the root */
#wrapper {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Mobile nav height adjustment */
@media (max-width: 640px) {
    #wrapper {
        padding-top: 64px;
    }
    .lucid-card {
        padding: 1.25rem;
    }
    #mobile-menu {
        max-width: 100vw;
        overflow-x: hidden;
    }
    /* Dashboard content inner: reduce padding on small screens */
    .dashboard-content-inner {
        padding: 16px !important;
    }
    /* Stats grid: single column on phone */
    .lucid-stat-card {
        padding: 1rem;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .pricing-plans-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    /* Dashboard content inner: moderate padding */
    .dashboard-content-inner {
        padding: 20px !important;
    }
}

/* Ensure nav is always full-width and never overflows */
#header-container.lucid-nav nav {
    max-width: 100vw;
    overflow: visible;
}
