/* Start Earning Modal - Slide Navigation Styles */

/* Blue light from below effect */
#startEarningModal .modal-content.bg-black {
    background: #000000 !important;
}

#startEarningModal .modal-body {
    background: 
        radial-gradient(ellipse 120% 80% at center 100%, 
            rgba(0, 87, 246, 0.3) 0%, 
            rgba(0, 87, 246, 0.2) 30%, 
            rgba(0, 87, 246, 0.1) 60%, 
            rgba(0, 87, 246, 0.05) 80%,
            transparent 100%),
        transparent !important;
    position: relative;
}

#startEarningModal .modal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 120% 80% at center 100%, 
            rgba(0, 87, 246, 0.4) 0%, 
            rgba(0, 87, 246, 0.25) 30%, 
            rgba(0, 87, 246, 0.12) 60%, 
            rgba(0, 87, 246, 0.05) 80%,
            transparent 100%);
    pointer-events: none;
    z-index: 0;
}

#startEarningModal .slides-container {
    position: relative;
    z-index: 1;
}

/* Slides Container - Essential Structure */
.slides-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Base Slide Styles - Essential for Transitions */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-sizing: border-box;
    overflow: visible;
}

.slide .content-text {
    width: 100%;
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

/* Active/Inactive States - Essential for Transitions */
.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-100%);
}

/* Desktop Scrolling - Minimal Essential Rules */
@media (min-width: 768px) {
    .slide {
        padding: 1rem;
        overflow: hidden;
    }
    
    /* Scrollable content detection */
    .slide.long-content:not([data-slide="1"]):not([data-slide="7"]) {
        align-items: flex-start;
        overflow-y: auto;
        padding-top: 2.5rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .slide.long-content::-webkit-scrollbar {
        display: none;
    }
    
    /* CRITICAL: Slide 7 positioning fix - prevents transition glitch */
    .slide[data-slide="7"] {
        align-items: flex-start;
        padding-top: 2.5rem;
    }
    
    /* CRITICAL: Slide 6 scrolling fix - force scrollable on desktop */
    .slide[data-slide="6"] {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding-top: 2.5rem !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .slide[data-slide="6"]::-webkit-scrollbar {
        display: none !important;
    }
    
    /* SMOOTH TRANSITIONS: Apply flex-start positioning to all content slides */
    .slide[data-slide="2"] {
        align-items: flex-start !important;
        padding-top: 2.5rem !important;
    }
    
    .slide[data-slide="3"] {
        align-items: flex-start !important;
        padding-top: 2.5rem !important;
    }
    
    .slide[data-slide="4"] {
        align-items: flex-start !important;
        padding-top: 2.5rem !important;
    }
    
    .slide[data-slide="5"] {
        align-items: flex-start !important;
        padding-top: 2.5rem !important;
    }
    
    .slide[data-slide="6"] {
        align-items: flex-start !important;
        padding-top: 2.5rem !important;
    }
    
    /* Force slide 7 to be centered on desktop (final call-to-action) */
    .slide[data-slide="7"] {
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
    }
    
    .slide .content-text {
        max-width: 1000px;
        padding: 0.5rem;
    }
}

/* Content Styling - Consolidated */
.slide .content-text h3 {
    text-shadow: 0 0 20px rgba(0, 200, 83, 0.6), 0 0 40px rgba(0, 200, 83, 0.3);
    border-bottom: 2px solid transparent;
    background: linear-gradient(90deg, transparent, rgba(0, 200, 83, 0.5), transparent) bottom;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    padding-bottom: 0.5rem;
    margin-bottom: 3rem;
    position: relative;
    text-align: center;
}

.slide .content-text h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, white, transparent);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

/* Add spacing after title introduction paragraphs */
.slide .content-text > p:first-of-type {
    margin-bottom: 2.5rem;
}

@keyframes titleGlow {
    0% { opacity: 0.7; box-shadow: 0 0 10px rgba(0, 200, 83, 0.6); }
    100% { opacity: 1; box-shadow: 0 0 20px rgba(0, 200, 83, 1); }
}

.slide .content-text h5,
.slide .content-text p {
    text-align: center;
}

.slide .content-text ul {
    text-align: left;
    display: inline-block;
    margin: 0 auto;
    list-style: none;
    padding-left: 0;
}

.slide .content-text li {
    text-align: center;
}

.slide .content-text div {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Brand styling for modal */
#startEarningModal .brand-text {
    color: #0057F6;
    text-shadow: 0 0 10px rgba(0, 87, 246, 0.3);
}

#startEarningModal .brand-highlight {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Slide Navigation Buttons */
.slide-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}

.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #0057F6;
    width: 55px;
    height: 55px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.8rem;
    text-shadow: 0 0 8px rgba(0, 87, 246, 0.6);
    pointer-events: auto;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.slide-nav-btn:hover {
    transform: translateY(-50%) scale(1.1);
    text-shadow: 0 0 12px rgba(0, 87, 246, 0.8);
    color: #4285F4;
}

.slide-nav-btn:focus,
.slide-nav-btn:active,
.slide-nav-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.prev-btn {
    left: 1rem;
}

.next-btn {
    right: 1rem;
}

/* Hide swipe hint on desktop by default */
.mobile-only-swipe-hint {
    display: none;
}

/* Slide Indicators */
.slide-indicators {
    display: flex;
    gap: 10px;
    padding: 0.5rem;
    justify-content: center;
    background: transparent;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #0057F6;
    box-shadow: 0 0 10px rgba(0, 87, 246, 0.5);
}

.indicator:hover {
    background: rgba(0, 87, 246, 0.7);
}

/* Mobile responsiveness for slides */
@media (max-width: 767px) {
    #startEarningModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        width: 100%;
        height: 100vh; /* Full viewport height */
        position: fixed; /* Fix to viewport to prevent peeking */
        top: 0;
        left: 0;
    }
    
    #startEarningModal .modal-content {
        height: 100vh; /* Full viewport height */
        border-radius: 0;
        overflow: hidden; /* Prevent any overflow */
    }
    
    #startEarningModal .modal-header {
        padding: 1rem 1.5rem 1.5rem 1.5rem; /* Added more bottom padding */
        flex-shrink: 0;
        border-bottom: 1px solid rgba(0, 200, 83, 0.2); /* Lighter border */
    }
    
    #startEarningModal .modal-footer {
        padding: 0.75rem 1rem;
        flex-shrink: 0;
    }
    
    .slides-container {
        height: 100%;
        overflow: hidden;
    }
    
    .slide {
        height: 100%;
        padding: 2.5rem 1rem 1rem 1rem; /* Increased top padding even more */
        align-items: center; /* Keep centered by default */
        justify-content: center; /* Center horizontally too */
        overflow: hidden; /* Hide overflow by default */
    }
    
    /* Only apply scrolling to slides that truly need it (not slide 1) */
    .slide.long-content:not([data-slide="1"]) {
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: 2rem; /* Increased to ensure no header overlap */
    }
    
    /* Pre-configure slides 2-6 for scrolling on mobile to prevent snapping */
    .slide[data-slide="2"],
    .slide[data-slide="3"], 
    .slide[data-slide="4"],
    .slide[data-slide="5"],
    .slide[data-slide="6"] {
        align-items: flex-start !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-top: 2rem !important; /* Increased to ensure no header overlap */
    }
    
    /* Force slide 1 and slide 7 to never scroll on mobile */
    .slide[data-slide="1"],
    .slide[data-slide="7"] {
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        padding: 1.5rem 0.5rem 0.5rem 0.5rem !important; /* Increased top padding */
    }
    
    /* Show swipe hint only on mobile */
    .mobile-only-swipe-hint {
        display: block !important;
    }
    
    .slide .content-text {
        width: 100%;
        max-height: none;
        text-align: center !important; /* Center all text on mobile */
        margin-top: 0.5rem; /* Add some top margin to prevent cutoff */
    }
    
    /* Smaller text sizes for mobile to fit better */
    .slide h3 {
        font-size: 1.1rem !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    .slide h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .slide p, .slide li {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
        text-align: center !important;
    }
    
    /* Add mobile spacing after introduction paragraphs */
    .slide .content-text > p:first-of-type {
        margin-bottom: 1.5rem !important;
    }
    
    /* Special styling for slide 1 to fit without scrolling */
    .slide[data-slide="1"] h3 {
        font-size: 1.3rem !important; /* Bigger than before */
        margin-bottom: 0.8rem !important;
    }
    
    .slide[data-slide="1"] p {
        font-size: 1rem !important; /* Bigger than before */
        line-height: 1.3 !important;
        margin-bottom: 0.6rem !important;
    }
    
    /* Adjust navigation buttons for mobile */
    .slide-nav-btn {
        width: 30px;
        height: 18px;
        font-size: 0.8rem;
        opacity: 0.7;
        transition: all 0.2s ease;
    }
    
    .prev-btn {
        left: 1rem;
    }
    
    .next-btn {
        right: 1rem;
    }
    
    /* Touch-active state for mobile navigation */
    .modal-body.touch-active .slide-nav-btn {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    
    /* Slide indicators positioning for mobile */
    .slide-indicators {
        gap: 8px;
        padding: 0.25rem;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
}

/* Visual section separators and improved layout */
.content-section {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.4rem;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.content-section h5 {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
    color: white !important;
}

.content-section:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Better content layout and centering */
.slide .content-text {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 1rem;
}
