/* Haritraa Styles - Enhanced & Animated */

/* --- Global Typography & Layout --- */
body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* --- Navigation Bar (Glassmorphism) --- */
.glass-nav {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

/* --- Creative Navigation Bar (Enhanced Glassmorphism) --- */
.creative-glass-nav {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.creative-glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
}

/* General Glass Card Utility */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Labs Button Gradient */
.btn-labs-gradient {
    background-size: 200% auto;
    background-image: linear-gradient(to right, #24c6dc 0%, #514a9d 51%, #24c6dc 100%);
    transition: 0.5s;
}

.btn-labs-gradient:hover {
    background-position: right center;
}

/* Nav Link Hover Effects (for non-button links) */
.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #4f46e5;
}

/* --- Hero Section & Animations --- */
.hero-bg {
    background: radial-gradient(circle at top right, #e0e7ff, #f3f4f6, #fff);
    position: relative;
    overflow: hidden;
}

/* Slideshow Styles */
.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s ease-in-out;
    transform: scale(1);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.05); /* Subtle zoom effect */
}

/* Animation Utilities */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out 3s infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* Typing Effect Cursor */
.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Marquee (Affirmation Band) --- */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Flip Cards --- */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 320px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -5px rgba(0,0,0,0.1);
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.flip-card-front {
    background-color: white;
    border: 1px solid #f3f4f6;
}

.flip-card-back {
    background: linear-gradient(135deg, #4f46e5 0%, #0d9488 100%);
    color: white;
    transform: rotateY(180deg);
}

/* --- Portal Cards (Hub Section) --- */
.portal-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: all 0.5s ease;
}

.portal-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.portal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.5), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* --- Shimmer Button --- */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    transform: skewX(-20deg) translateX(-150%);
    transition: transform 0.5s;
}

.btn-shimmer:hover::after {
    transform: skewX(-20deg) translateX(150%);
    transition: transform 1s ease-in-out;
}

/* --- Loader --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #eef2ff;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- FAQ Accordion --- */
.accordion-content {
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    max-height: 0;
    overflow: hidden;
}

.accordion-content.active {
    max-height: 500px;
    transition: max-height 0.5s ease-in-out;
}

/* --- Pulse Animation (Slow) --- */
.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* --- Card Shine Effect --- */
.card-shine {
    position: relative;
    overflow: hidden;
}
.card-shine::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s;
}
.card-shine:hover::before {
    left: 125%;
    transition: left 0.7s;
}

/* --- Neural Simulation Section Styles --- */
#neural-simulation {
    position: relative;
    overflow: hidden;
}

.simulation-container {
    position: relative;
}

#neuralCanvas {
    display: block;
    width: 100%;
    height: 600px;
    background: #0f172a; /* Slate 900 base fallback */
    cursor: crosshair;
}

/* UI Overlay Layering */
.simulation-ui {
    pointer-events: none; /* Allows clicks to pass through containers to the canvas */
}

.simulation-ui button, 
.simulation-ui .hud-panel {
    pointer-events: auto; /* Re-enables clicks on specific UI elements */
}

/* Interactive Button Shine */
.sim-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.sim-btn:hover::before {
    left: 100%;
}

/* Heads Up Display (HUD) */
.hud-panel {
    background: rgba(15, 23, 42, 0.7); /* Transparent Slate 900 */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Progress Bars */
.bar-container {
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    transition: width 0.5s ease-out, background-color 0.5s ease;
}

/* --- CREATIVE HEADER STYLES (Extracted from HTML) --- */

/* The Pill Container */
.neuro-nav-container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 10px 40px -10px rgba(31, 38, 135, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.neuro-nav-container.scrolled {
    background: rgba(255, 255, 255, 0.9);
    width: 90% !important; /* Shrink on scroll */
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 20px 50px -12px rgba(99, 102, 241, 0.15);
}

/* Brain Wave Canvas Background */
#header-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.25;
    border-radius: 9999px;
    pointer-events: none;
}

/* Nav Link Hover Effects */
.nav-item-creative {
    position: relative;
    overflow: hidden;
}

.nav-item-creative::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-item-creative:hover::after {
    width: 80%;
}

/* Glowing Button Effect */
.btn-neural {
    background: #111827;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s;
}

.btn-neural::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #4f46e5, #ec4899);
    z-index: -1;
    transition: opacity 0.3s;
    opacity: 0;
}

.btn-neural:hover::before {
    opacity: 1;
}

/* Login Scan Effect */
.login-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.4), transparent);
    transform: translateY(-100%);
}

.group:hover .login-scanner {
    animation: scan 1.5s linear infinite;
}

/* --- DASHBOARD SPECIFIC STYLES --- */

/* 3D Flip Effects for Goal Card */
.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

.is-flipped {
    transform: rotateY(180deg);
}

/* Custom Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.day {
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.day:hover {
    background-color: #f3f4f6;
}

.day.has-entry {
    background-color: #e0e7ff;
    color: #4338ca;
    font-weight: bold;
}

/* Mood Indicators in Calendar */
.day.mood-positive {
    border-bottom: 3px solid #22c55e;
}

.day.mood-negative {
    border-bottom: 3px solid #ef4444;
}

.day.mood-neutral {
    border-bottom: 3px solid #f59e0b;
}

.day.today {
    border: 2px solid #6366f1;
}

.day.selected {
    background-color: #4f46e5;
    color: white;
    transform: scale(1.1);
    border-bottom: none;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #f00;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Custom Checkbox for Goal Card */
.check-in-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.75rem;
}

.check-in-box {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #cbd5e1;
    border-radius: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

input:checked + .check-in-label .check-in-box {
    background-color: #22c55e;
    border-color: #22c55e;
    transform: scale(1.1);
}

input:checked + .check-in-label .check-in-box::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

/* Custom Scrollbar for Chat History */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Personal Trackers */
.type-btn {
    transition: all 0.2s ease;
}
.type-btn:hover {
    transform: translateY(-2px);
}
.type-btn.selected {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Blueprint Styles */
#personalizedSolutionContainer .fas {
    /* Ensure icons in the blueprint are centered */
}

/* Growth & Insights Section - Interactive Enhancements */
#lowestMetricInsight, #frictionInsight {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    cursor: default;
}

#lowestMetricInsight:hover, #frictionInsight:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Chart Canvas Sizing for Stability */
#wellnessRadarChart, #emotionalFrictionChart {
    max-height: 350px;
    width: 100% !important;
    height: auto !important;
}