/* ==========================================================================
   1. Variables & Root Configuration
   ========================================================================== */
:root {
    --brand-red: #FF3D3D;
    --brand-orange: #FF8C00;
    --brand-blue: #1E3A8A;
    --brand-yellow: #FFD700;
    --brand-pink: #FF0080;
    --brand-purple: #7928CA;
    --brand-bg: #070707;
    --card-bg: #0F0F0F;
    --card-bg-hover: #151515;
    --text-light: #FFFFFF;
    --text-medium: #B4B4B4;
    --text-dim: #6B6B6B;
}

/* ==========================================================================
   2. Global Styles & Resets
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--brand-bg);
    /* From original first body */
    color: var(--text-medium);
    /* From original first body */
    font-family: 'Inter', sans-serif;
    /* From original first body */
    margin: 0;
    /* From original second body, good reset */
    overflow-x: hidden;
    /* Common to both, kept */
    /* overflow: hidden;                  From second body, might be too restrictive globally,
                                        preferring overflow-x: hidden from first if general scrolling is needed.
                                        If the entire page should not scroll, uncomment this and remove overflow-x */
}

/* ==========================================================================
   3. Custom Scrollbars
   ========================================================================== */
/* General custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0F0F0F;
    /* Consider var(--card-bg) for consistency */
}

::-webkit-scrollbar-thumb {
    background: var(--brand-red);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-pink);
}

/* Custom scrollbar for specific modal content */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.5);
    /* Corresponds to var(--brand-purple) with alpha */
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.7);
    /* Corresponds to var(--brand-purple) with alpha */
}


/* ==========================================================================
   4. Typography & Text Effects
   ========================================================================== */
.section-title {
    font-family: 'Teko', sans-serif;
    font-weight: 700;
}

/* Neon Text Effects */
.neon-text {
    text-shadow: 0 0 5px rgba(255, 61, 61, 0.5),
        /* Corresponds to var(--brand-red) */
        0 0 10px rgba(255, 61, 61, 0.3);
}

.neon-text-pink {
    text-shadow: 0 0 5px rgba(255, 0, 128, 0.5),
        /* Corresponds to var(--brand-pink) */
        0 0 10px rgba(255, 0, 128, 0.3);
}

.neon-text-blue {
    text-shadow: 0 0 5px rgba(30, 58, 138, 0.5),
        /* Corresponds to var(--brand-blue) */
        0 0 10px rgba(30, 58, 138, 0.3);
}

.neon-text-yellow {
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5),
        /* Corresponds to var(--brand-yellow) */
        0 0 10px rgba(255, 215, 0, 0.3);
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(to right, var(--brand-red), var(--brand-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-text-alt {
    background: linear-gradient(to right, var(--brand-yellow), var(--brand-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   5. UI Components & Effects
   ========================================================================== */

/* Border Effects (Neon) */
.neon-border {
    box-shadow: 0 0 5px rgba(255, 61, 61, 0.5),
        /* Corresponds to var(--brand-red) */
        0 0 10px rgba(255, 61, 61, 0.3);
}

.neon-border-pink {
    box-shadow: 0 0 5px rgba(255, 0, 128, 0.5),
        /* Corresponds to var(--brand-pink) */
        0 0 10px rgba(255, 0, 128, 0.3);
}

.neon-border-yellow {
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5),
        /* Corresponds to var(--brand-yellow) */
        0 0 10px rgba(255, 215, 0, 0.3);
}

/* Button Effects */
.glowing-btn {
    position: relative;
    overflow: hidden;
}

.glowing-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--brand-red), var(--brand-pink), var(--brand-purple), var(--brand-red));
    background-size: 400%;
    z-index: -1;
    animation: gradientShift 8s ease infinite;
    border-radius: 0.5rem;
    /* Consistent with other radius units */
}

/* Card and Section Effects */
.reveal-card {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.6s ease;
}

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

.backdrop-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glassmorphism {
    background: rgba(15, 15, 15, 0.7);
    /* Consider var(--card-bg) with alpha */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Consider var(--text-light) with alpha */
}

.section-divider {
    position: relative;
    height: 80px;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--brand-bg) 49.5%, transparent 50%);
    z-index: 10;
}

/* Timeline Specific Styles */
.timeline-line {
    background: linear-gradient(to bottom, var(--brand-red), var(--brand-pink));
}

.timeline-item {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(5) {
    animation-delay: 0.5s;
}


/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    /* Or var(--brand-bg) if it matches the theme */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.8s ease-out;
    overflow: hidden;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-container {
    position: relative;
    z-index: 2;
    /* Relative to #preloader */
}

.loader-track {
    width: 20rem;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: visible;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(224, 114, 249, 0.1);
    /* This pinkish color is not in vars, maybe add as --brand-loader-glow? */
}

.loader-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #E072F9 0%, #F0A0FA 50%, #BE8FF8 100%);
    /* Colors not in vars */
    border-radius: 12px;
    transition: width 0.3s ease-out;
    position: relative;
    overflow: visible;
    box-shadow:
        inset 0 0 8px rgba(255, 255, 255, 0.3),
        0 0 12px 2px rgba(224, 114, 249, 0.8),
        0 0 25px 5px rgba(240, 160, 250, 0.6),
        0 0 45px 10px rgba(190, 143, 248, 0.4),
        0 0 80px 20px rgba(224, 114, 249, 0.2);
    animation: bloom-pulse 2.5s ease-in-out infinite;
}

.loader-fill::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    bottom: -10px;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(224, 114, 249, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 60% 80%, rgba(240, 160, 250, 0.6) 1px, transparent 1px);
    background-size: 30px 30px, 45px 45px, 35px 35px;
    animation: sparkle 3s linear infinite;
    opacity: 0.7;
}

.loading-text {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(224, 114, 249, 0.8);
    /* Pinkish color, not in vars */
    font-family: 'Arial', sans-serif;
    /* Different from global 'Inter' */
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: text-glow 2s ease-in-out infinite;
}

/* Modal Animation Classes */
.modal-enter {
    animation: modalFadeIn 0.3s ease-out forwards;
}

.modal-exit {
    animation: modalFadeOut 0.2s ease-in forwards;
}


/* ==========================================================================
   6. Animation Utility Classes
   ========================================================================== */
.floating-orb {
    animation: float 6s ease-in-out infinite;
}

.floating-orb:nth-child(2) {
    animation-delay: -2s;
}

.floating-orb:nth-child(3) {
    animation-delay: -4s;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 7s ease-in-out infinite;
}

.animate-scroll-down {
    animation: scroll-down 2s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* Note: different from pulseGlow keyframe */
.animate-mobile-bounce {
    animation: mobile-bounce 4s ease-in-out infinite;
}

/* ==========================================================================
   7. Keyframe Animations
   ========================================================================== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {

    /* Consolidating duplicate float animations */
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-delayed {

    0%,
    100% {
        transform: translateY(0px) rotate(6deg);
    }

    50% {
        transform: translateY(-8px) rotate(6deg);
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0px) rotate(-12deg);
    }

    50% {
        transform: translateY(-6px) rotate(-12deg);
    }
}

@keyframes pulseGlow {

    /* Reddish glow */
    0%,
    100% {
        box-shadow: 0 0 20px 5px rgba(255, 61, 61, 0.3);
        /* var(--brand-red) */
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 30px 10px rgba(255, 61, 61, 0.5);
        /* var(--brand-red) */
        transform: scale(1.02);
    }
}

@keyframes pulse-glow {

    /* Pinkish glow (from later in original file) */
    0%,
    100% {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
    }

    /* Near var(--brand-pink) */
    50% {
        box-shadow: 0 0 40px rgba(236, 72, 153, 0.6);
    }
}

@keyframes glow {

    /* Purpleish glow */
    0%,
    100% {
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    }

    /* var(--brand-purple) */
    50% {
        box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bloom-pulse {

    /* For Preloader */
    0%,
    100% {
        box-shadow:
            inset 0 0 8px rgba(255, 255, 255, 0.3),
            0 0 12px 2px rgba(224, 114, 249, 0.8),
            0 0 25px 5px rgba(240, 160, 250, 0.6),
            0 0 45px 10px rgba(190, 143, 248, 0.4),
            0 0 80px 20px rgba(224, 114, 249, 0.2);
        transform: scaleY(1);
    }

    50% {
        box-shadow:
            inset 0 0 12px rgba(255, 255, 255, 0.5),
            0 0 18px 3px rgba(224, 114, 249, 1.0),
            0 0 35px 8px rgba(240, 160, 250, 0.8),
            0 0 60px 15px rgba(190, 143, 248, 0.6),
            0 0 100px 25px rgba(224, 114, 249, 0.3);
        transform: scaleY(1.1);
    }
}

@keyframes sparkle {

    /* For Preloader */
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes text-glow {

    /* For Preloader */
    0%,
    100% {
        opacity: 0.6;
        text-shadow: 0 0 10px rgba(224, 114, 249, 0.5);
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(224, 114, 249, 0.8);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.7);
    }
}

@keyframes scroll-down {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(6px);
        opacity: 0.5;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes mobile-bounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

/* ==========================================================================
   8. Demo Content (Example Page Styles)
   ========================================================================== */
.main-content {
    padding: 50px;
    text-align: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    /* These colors could be vars */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.main-content h1 {
    color: #E072F9;
    /* Pinkish color, not in vars */
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(224, 114, 249, 0.5);
}

.main-content p {
    color: rgba(255, 255, 255, 0.7);
    /* var(--text-light) with alpha */
    font-size: 1.2rem;
    max-width: 600px;
    line-height: 1.6;
}

/* ==========================================================================
   9. Media Queries & Responsive Adjustments
   ========================================================================== */

/* Mobile touch improvements & layout adjustments */
@media (max-width: 768px) {

    /* Timeline adjustments */
    .timeline-item {
        margin-bottom: 2rem;
    }

    .timeline-card {
        /* This class wasn't defined elsewhere, assuming it's part of timeline-item */
        margin-left: 2rem;
        margin-right: 0.5rem;
    }

    /* Mobile-specific optimizations/effects */
    .mobile-text-shadow {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    }

    .mobile-backdrop-blur {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Touch-friendly hover effects for mobile (tap effects) */
@media (hover: none) and (pointer: coarse) {
    .download-btn:active {
        /* .download-btn class wasn't defined elsewhere */
        transform: scale(0.98);
    }
}