/* Cosmic Theme Landing Page */

html, body {
    margin: 0;
    padding: 0;
}

html.landing-mode body {
    background-color: #0f172a;
}

/* Light Mode Global Override */
html.landing-light-mode body {
    background-color: #f8fafc;
}

.landing-wrapper {
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    position: relative;
    /* Default Variables */
    --landing-title-color: #ffffff;
    --landing-subtitle-color: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-hover-shadow: rgba(0, 0, 0, 0.5);
    --glass-hover-border: rgba(99, 102, 241, 0.3);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-main: #ffffff;
}

/* Light Mode Wrapper */
.landing-wrapper.landing-light-mode {
    background: #ffffff; /* Fallback */
    color: #1e293b;
    --landing-title-color: #1e293b;
    --landing-subtitle-color: #475569;
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-hover-shadow: rgba(0, 0, 0, 0.1);
    --glass-hover-border: rgba(99, 102, 241, 0.5);
    --text-muted: #64748b;
    --text-main: #0f172a;
}

/* Light Mode Sections - Pastel Gradients */
.landing-wrapper.landing-light-mode {
    background: linear-gradient(
        180deg,
        #E0E7FF 0%,     /* Hero: Soft Indigo/Lavender */
        #E0E7FF 15%,
        #ECFCCB 30%,    /* How it works: Soft Lime/Mint */
        #F0FDFA 45%,    /* Deep Analysis: Teal/Cyan */
        #FEF3C7 60%,    /* Dashas: Amber/Cream */
        #FFE4E6 75%,    /* Match: Rose/Pink */
        #E0F2FE 85%,    /* Yogas/Ephemeris: Sky */
        #F3E8FF 100%    /* Footer: Purple */
    );
    background-attachment: scroll; /* Allow it to scroll with content */
}

/* Starlight Background Effect */
.landing-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
    position: fixed;
}

.landing-wrapper.landing-light-mode::before {
    display: none; /* Hide stars in light mode */
}

/* Content Layer */
.landing-content {
    position: relative;
    z-index: 1;
}

/* Typography */
.landing-title {
    font-family: 'Hind', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #a5b4fc 0%, #ffffff 50%, #c4b5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(165, 180, 252, 0.3);
}

.landing-wrapper.landing-light-mode .landing-title {
    background: none;
    -webkit-text-fill-color: #1e293b;
    color: #1e293b;
    text-shadow: none;
}

.landing-subtitle {
    font-size: 1.25rem;
    color: var(--landing-subtitle-color);
    font-weight: 300;
}

.landing-wrapper.landing-light-mode .landing-subtitle {
    font-weight: 400;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px var(--glass-hover-shadow);
    border-color: var(--glass-hover-border);
}

.landing-wrapper.landing-light-mode .glass-card {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Enhanced Login Box */
.login-box {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    min-height: 300px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.landing-wrapper.landing-light-mode .login-box {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.1);
    color: #1e293b !important;
}

.login-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.login-box p {
    font-size: 1.1rem;
}

.landing-wrapper.landing-light-mode .login-box h2,
.landing-wrapper.landing-light-mode .login-box p,
.landing-wrapper.landing-light-mode .login-box span,
.landing-wrapper.landing-light-mode .login-box i {
    color: #334155 !important;
}
.landing-wrapper.landing-light-mode .login-box .text-white-50 {
    color: #64748b !important;
}

/* Shared State Highlight */
.shared-highlight {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e7ff;
}

.landing-wrapper.landing-light-mode .shared-highlight {
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.4);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}
.animate-bounce { animation: bounce 2s infinite; }

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhancing CTA Prominence */
.hero-cta-btn {
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.landing-wrapper.landing-light-mode .hero-cta-btn {
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}
.landing-wrapper.landing-light-mode .hero-cta-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding-bottom: 2rem;
    padding-left: 5%; /* Start with some padding */
    padding-right: 5%;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    cursor: grab;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.scroll-card {
    width: 85vw; /* Mobile */
    flex-shrink: 0;
    scroll-snap-align: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .scroll-card {
        width: 380px; /* Tablet fixed width */
    }
}

@media (min-width: 992px) {
    .horizontal-scroll-container {
        padding-left: calc((100vw - 960px) / 2); /* Align with lg container */
        padding-right: calc((100vw - 960px) / 2);
    }
    .scroll-card {
        width: 420px; /* Desktop fixed width */
    }
}

@media (min-width: 1200px) {
    .horizontal-scroll-container {
        padding-left: calc((100vw - 1140px) / 2); /* Align with xl container */
        padding-right: calc((100vw - 1140px) / 2);
    }
}

.scroll-card:hover {
    border-color: var(--glass-hover-border);
}

.scroll-image-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16; /* Mobile/Tablet: Portrait */
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

@media (min-width: 992px) {
    .scroll-image-wrapper {
        aspect-ratio: 16 / 10; /* Desktop */
    }
}

.scroll-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.scroll-card:hover .scroll-image-wrapper img {
    transform: scale(1.02);
}

/* Feature Large Section (Single Highlight) */
.feature-large {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Step Badges ("How it Works") */
.step-badge {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Accordion Customization (FAQ) */
.accordion-button {
    color: #e2e8f0;
    transition: background-color 0.2s;
}
.accordion-button:not(.collapsed) {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(255,255,255,0.1);
}
.accordion-button::after {
    filter: invert(1); /* Make arrow white */
}

.landing-wrapper.landing-light-mode .accordion-button {
    color: #475569;
}
.landing-wrapper.landing-light-mode .accordion-button:not(.collapsed) {
    color: #0f172a;
    background-color: rgba(99, 102, 241, 0.1);
}
.landing-wrapper.landing-light-mode .accordion-button::after {
    filter: none; /* Dark arrow */
}

/* Footer Links */
.landing-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    margin-top: 2rem;
    color: #64748b;
}

.landing-wrapper.landing-light-mode .landing-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

.landing-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.landing-footer a:hover {
    color: #f8fafc;
}

.landing-wrapper.landing-light-mode .landing-footer a {
    color: #64748b;
}
.landing-wrapper.landing-light-mode .landing-footer a:hover {
    color: #0f172a;
}

/* Alternate Section Style */
.landing-section-alt {
    background-color: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(5px); /* subtle blur for depth */
}

.landing-wrapper.landing-light-mode .landing-section-alt {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
}

/* Utilities */
.bg-opacity-5 { --bs-bg-opacity: 0.05; }
.hover-bg-opacity-5:hover { background-color: rgba(255, 255, 255, 0.05) !important; }
.transition { transition: all 0.3s ease; }
.opacity-10 { opacity: 0.1 !important; }
.opacity-20 { opacity: 0.2 !important; }

/* Light Mode Overrides for Bootstrap Utilities */
.landing-wrapper.landing-light-mode .text-white { color: #1e293b !important; }
.landing-wrapper.landing-light-mode .text-white-50 { color: #64748b !important; }
.landing-wrapper.landing-light-mode .border-white { border-color: #cbd5e1 !important; }
.landing-wrapper.landing-light-mode .bg-black { background-color: transparent !important; }
.landing-wrapper.landing-light-mode .btn-outline-light { color: #0f172a; border-color: #cbd5e1; }
.landing-wrapper.landing-light-mode .btn-outline-light:hover { background-color: #0f172a; color: #fff; }

/* Video Blend Mask */
.landing-wrapper.landing-light-mode .video-blend-overlay {
    background: linear-gradient(to bottom, transparent, #E0E7FF);
}
.video-blend-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #0f172a);
    pointer-events: none;
    z-index: 2;
}

/* Feature Icons */
.feature-icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.landing-wrapper.landing-light-mode .feature-icon-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

/* Comparison Table */
.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.compare-table th,
.compare-table td {
    padding: 1.25rem 1rem;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid var(--glass-border);
}

.compare-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

/* Feature Column */
.compare-table td:first-child,
.compare-table th:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-main);
    padding-left: 2rem;
}

/* Highlight Column (Our App) */
.col-highlight {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
    position: relative;
}

/* Top corners rounded for highlight */
.compare-table th.col-highlight {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

/* Bottom corners rounded for highlight */
.compare-table tr:last-child td.col-highlight {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

/* Add borders to highlight column */
.col-highlight {
    border-left: 1px solid rgba(99, 102, 241, 0.2);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
}

.compare-table th.col-highlight {
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc; /* Tint the header text */
}

.compare-table tr:last-child td.col-highlight {
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

/* Light Mode Overrides for Highlight */
.landing-wrapper.landing-light-mode .col-highlight {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

.landing-wrapper.landing-light-mode .compare-table th.col-highlight {
    color: #4f46e5;
}

.landing-wrapper.landing-light-mode .compare-table th {
    color: #64748b;
}

.landing-wrapper.landing-light-mode .compare-table td:first-child {
    color: #1e293b;
}

/* Mobile Responsive Wrapper for Table */
.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem; /* Negative margin on mobile to span full width */
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .table-responsive-custom {
        margin: 0;
        padding: 0;
    }
}

/* Mobile Card Layout for Comparison Table */
@media (max-width: 767.98px) {
    .compare-table,
    .compare-table tbody,
    .compare-table tr,
    .compare-table td {
        display: block;
        width: 100%;
        text-align: left; /* Reset center alignment */
    }

    /* Hide the main header row */
    .compare-table thead {
        display: none;
    }

    /* Card Style for Rows */
    .compare-table tr {
        margin-bottom: 1.5rem;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 1rem;
        padding: 0;
        overflow: hidden;
    }

    /* First Cell (Feature Title) becomes Card Header */
    .compare-table td:first-child {
        background: rgba(255, 255, 255, 0.05);
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--glass-border);
        color: var(--text-main);
    }

    .landing-wrapper.landing-light-mode .compare-table td:first-child {
        background: rgba(0, 0, 0, 0.02);
    }

    /* Other cells become list items */
    .compare-table td {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .landing-wrapper.landing-light-mode .compare-table td {
        border-bottom-color: rgba(0, 0, 0, 0.05);
    }

    .compare-table td:last-child {
        border-bottom: none;
    }

    /* Highlight Column mobile tweaks */
    .col-highlight {
        background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
        border: none; /* Remove desktop borders */
        border-bottom: 1px solid rgba(99, 102, 241, 0.2) !important;
    }

    .landing-wrapper.landing-light-mode .col-highlight {
        background: rgba(99, 102, 241, 0.05);
    }

    /* Reset rounded corners from desktop */
    .compare-table tr:last-child td.col-highlight {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}
