body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #020617;
    color: #f8fafc;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-top: 4rem;
}

.text-gradient {
    background: linear-gradient(to right, #2dd4bf, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-value {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #475569;
}

#joinModal select {
    background-color: #0f172a;
    color: #f8fafc;
}

#joinModal select option {
    background-color: #0f172a;
    color: #f8fafc;
}

.glass-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.code-window {
    font-family: 'JetBrains Mono', monospace;
    background: #010409;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

/* DATA FLOW ANIMATION */
.rail {
    height: 1px;
    background: rgba(45, 212, 191, 0.15);
    position: relative;
    width: 100%;
}

.data-packet {
    position: absolute;
    height: 2px;
    width: 80px;
    background: linear-gradient(90deg, transparent, #2dd4bf, #fff, #2dd4bf, transparent);
    filter: drop-shadow(0 0 10px #2dd4bf);
    animation: flow 2.5s infinite ease-in-out;
}

.data-packet-blue {
    background: linear-gradient(90deg, transparent, #3b82f6, #fff, #3b82f6, transparent);
    filter: drop-shadow(0 0 10px #3b82f6);
}

@keyframes flow {
    0% {
        left: -20%;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        left: 120%;
        opacity: 0;
    }
}

/* HUB ANIMATION */
.logo-hub {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(45, 212, 191, 0.2);
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.hub-ring-inner {
    position: absolute;
    inset: 15px;
    border: 2px dashed rgba(45, 212, 191, 0.4);
    border-radius: 50%;
    animation: spin-reverse 15s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

#contactModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

/* SaturnX Floating Menu Style */
.nav-pill {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    background: rgba(15, 23, 42, 0.7);
    /* Translucent dark background */
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 0.6rem 2rem;
    z-index: 1000;
    transition: all 0.4s ease;
}

.nav-pill a {
    position: relative;
}

.nav-pill a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #2dd4bf;
    border-radius: 50%;
    transform: translateX(-50%) scale(0);
    transition: transform 0.3s ease;
}

.nav-pill a:hover::after {
    transform: translateX(-50%) scale(1);
}

/* Subtle glow on hover */
.nav-pill:hover {
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

/* SaturnX Gradient Button */
.contact-btn {
    background: linear-gradient(135deg, #2dd4bf 0%, #3b82f6 100%);
    color: #020617;
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(45, 212, 191, 0.4);
    filter: brightness(1.1);
}

/* Mobile Menu Overlay */
#mobileMenu {
    display: none;
    position: fixed;
    top: 5.5rem;
    /* Just below the nav pill */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 2rem;
    z-index: 999;
}

/* Show menu class */
#mobileMenu.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Hamburger Icon */
.menu-icon {
    display: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }
}

.contact-btn {
    display: inline-block;
    /* Crucial for <a> tags to respect padding */
    text-align: center;
    background: linear-gradient(135deg, #2dd4bf 0%, #3b82f6 100%);
    color: #020617;
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

/* ----- */

/* Vertical Data Packet for Mobile */
.data-packet-vertical {
    position: absolute;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #2dd4bf, #fff, #2dd4bf, transparent);
    filter: drop-shadow(0 0 8px #2dd4bf);
    animation: flow-vertical 2s infinite ease-in-out;
    left: -0.5px;
}

@keyframes flow-vertical {
    0% {
        top: -20%;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 120%;
        opacity: 0;
    }
}

/* Vertical Blue Data Packet for MFS Section */
.data-packet-vertical-blue {
    position: absolute;
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, #3b82f6, #fff, #3b82f6, transparent);
    filter: drop-shadow(0 0 8px #3b82f6);
    animation: flow-vertical 2s infinite ease-in-out;
    left: -0.5px;
}

/* Ensure Desktop packets have the blue class if needed */
.data-packet-blue {
    background: linear-gradient(to right, transparent, #3b82f6, #fff, #3b82f6, transparent) !important;
    filter: drop-shadow(0 0 8px #3b82f6) !important;
}

@keyframes flow-vertical {
    0% {
        top: -20%;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        top: 120%;
        opacity: 0;
    }
}

#mto-d3-diagram {
    min-height: 820px;
}

.mto-node {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    cursor: default;
}

.mto-initiator {
    background: rgba(45,212,191,0.08);
    border: 1px solid rgba(45,212,191,0.25);
    color: #e2e8f0;
}

.mto-teal {
    background: rgba(45,212,191,0.08);
    border: 1px solid rgba(45,212,191,0.3);
    color: #2dd4bf;
}

.mto-blue {
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.25);
    color: #60a5fa;
}

.mto-muted {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(255,255,255,0.08);
    color: #475569;
}

@media (max-width: 768px) {
    #mto-d3-diagram {
        min-height: 600px;
    }
    #node-paypal      { left: 2% !important; top: 8%  !important; }
    #node-skrill      { left: 2% !important; top: 22% !important; }
    #node-othermtos   { left: 2% !important; top: 36% !important; }
    #node-bkash       { right: 2% !important; top: 8%  !important; }
    #node-nagad       { right: 2% !important; top: 22% !important; }
    #node-upay        { right: 2% !important; top: 36% !important; }
    #node-mutualtrust { right: 2% !important; top: 50% !important; }
    #node-sonali      { right: 2% !important; top: 63% !important; }
    #node-krishi      { right: 2% !important; top: 76% !important; }
    #node-others      { right: 2% !important; top: 88% !important; }
    #node-blaze       { top: 48% !important; }
}

/* MTO Diagram Boxes */
.initiator-box {
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.initiator-muted {
    background: rgba(99,102,241,0.05);
    border: 1px dashed rgba(99,102,241,0.15);
    color: #475569;
}

.endpoint-box {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.endpoint-teal {
    background: rgba(45,212,191,0.08);
    border: 1px solid rgba(45,212,191,0.25);
    color: #2dd4bf;
}

.endpoint-indigo {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
    color: #a5b4fc;
}

/* Animated mobile vertical connector */
.mobile-connector {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(99,102,241,0.8), transparent);
    position: relative;
    overflow: hidden;
}

.mobile-connector::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.8), transparent);
    animation: mobileFlow 1.5s linear infinite;
}

@keyframes mobileFlow {
    to { top: 100%; }
}

.cf-turnstile {
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    #joinModal {
        align-items: flex-start;
        padding-top: 5rem;
    }

    #joinModal > div {
        max-height: 85vh;
        overflow-y: auto;
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
}
