:root {
    --bg-color: #020617;
    --text-color: #e2e8f0;
    --primary-color: #00f3ff;
    --secondary-color: #7c3aed;
    --accent-color: #db2777;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(148, 163, 184, 0.1);
    --glass-blur: 12px;
    --font-main: 'Rajdhani', sans-serif;
    --bar-height: 60px;
}

@media (max-width: 768px) {
    :root {
        --bar-height: 50px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
    text-transform: uppercase;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    padding-top: var(--bar-height);
    padding-bottom: 0;
    min-height: 100dvh;
}

html {
    overflow-x: hidden;
    background-color: var(--bg-color);
    height: 100%;
}

html, body {
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: auto;
}

/* Prevent iOS bounce/overscroll showing white space */
@supports (-webkit-touch-callout: none) {
    html, body {
        height: -webkit-fill-available;
        min-height: -webkit-fill-available;
    }

    body::before {
        content: '';
        position: fixed;
        top: -100vh;
        left: 0;
        width: 100%;
        height: 300vh;
        background-color: var(--bg-color);
        z-index: -9999;
        pointer-events: none;
    }
}

/* Grid Background Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 243, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

/* Scanline Effect - Refined */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.4) 50%,
            transparent 100%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.15;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
}

h1 {
    font-size: 3.5rem;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: textShine 5s linear infinite;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Header */
.glass-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--bar-height);
    padding: 0 5%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* Hide header button on all screen sizes */
.glass-header .cta-button {
    display: none;
}

nav {
    width: 100%;
    max-width: 1400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: #fff;
}

.accent {
    color: var(--primary-color);
}

/* Buttons */
.cta-button {
    padding: 1rem 2.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    text-transform: uppercase;
    min-width: 200px;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Futuristic scan line effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.4), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    box-shadow:
        0 0 20px rgba(0, 243, 255, 0.8),
        0 0 40px rgba(0, 243, 255, 0.6),
        0 0 60px rgba(0, 243, 255, 0.4),
        inset 0 0 20px rgba(0, 243, 255, 0.2);
    transform: translateY(-4px) scale(1.08);
    border-color: #fff;
    color: #fff;
    animation: neonPulse 1.5s ease-in-out infinite;
}

.cta-button.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #000;
    border: none;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
}

.cta-button.primary:hover {
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    box-shadow:
        0 0 30px rgba(0, 243, 255, 1),
        0 0 60px rgba(0, 243, 255, 0.8),
        0 0 90px rgba(124, 58, 237, 0.6),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
    transform: translateY(-4px) scale(1.08);
    animation: neonPulse 1.5s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.cta-button.small {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
    clip-path: none;
    /* Keep small buttons simple or apply smaller clip */
    border: 1px solid var(--glass-border);
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary-color);
    color: #000;
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.3s;
    opacity: 0;
}

.skip-link:focus {
    top: 0;
    opacity: 1;
}

/* Hero Section */
.hero-section {
    min-height: calc(100dvh - var(--bar-height) * 2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 5% 0rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    /* Ensure text is above the canvas */
    width: 100%;
}

.subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.05em;
    text-align: center;
    border: none;
    padding: 0;
    position: relative;
}

.subtitle::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    margin: 1.5rem auto 0;
    box-shadow: 0 0 10px var(--primary-color);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Cinematic Background - Full Page Coverage */
.cinematic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: transparent;
    z-index: 0;
    pointer-events: none;
}

#liquidityNetwork {
    display: block;
    width: 100%;
    height: 100%;
}


/* Features Section */
.features-section {
    padding: 2rem 5% calc(var(--bar-height) + 2rem);
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    position: relative;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.glass-card:hover::before {
    transform: translateX(100%);
}

.icon-wrapper {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.glass-card:hover .icon-wrapper {
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.feature-card p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
    text-transform: none;
    /* Keep body text readable */
}

/* Social Cards Section */
.social-section-title {
    margin-top: 4rem;
}

.social-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 0;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.social-card .icon-wrapper {
    margin-bottom: 1.5rem;
}

.social-card .x-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.social-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.social-card p {
    color: #94a3b8;
    font-size: 0.9rem;
    text-transform: none;
}

.social-card:hover .icon-wrapper {
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
}

/* Footer */
.glass-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    border-top: 1px solid var(--glass-border);
    height: var(--bar-height);
    padding: 0 5%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(var(--glass-blur));
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
}

.copyright {
    font-size: 0.85rem;
    color: #64748b;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.delay-1 {
    animation-delay: 0.1s;
    transition-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
    transition-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .glass-header,
    .glass-footer {
        padding: 0 1rem;
    }

    nav {
        gap: 0;
        /* Remove gap as we are centering */
        justify-content: center;
        /* Center the logo */
        width: 100%;
    }

    .glass-header .cta-button {
        display: none;
        /* Hide the Launch App button in topbar */
    }

    .logo {
        font-size: 1.4rem;
        white-space: nowrap;
        font-weight: 400;
        /* Make logo not bold */
    }

    .cta-button.small {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
        min-width: auto;
    }

    /* Disable hover scaling on mobile to prevent overlap */
    .cta-button:hover,
    .cta-button.primary:hover {
        transform: none;
        box-shadow: none;
        /* Optional: reduce shadow intensity if needed */
    }

    .hero-content h1 {
        font-size: 1.8rem;
        overflow-wrap: break-word;
        word-break: break-word;
        max-width: 100%;
        min-height: 5rem;
        height: 5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }



    .social-cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .social-card {
        padding: 1.5rem;
    }

    .social-section-title {
        margin-top: 4rem;
    }

    .copyright {
        font-size: 0.75rem;
        opacity: 0.7;
    }
}

/* Trade Counter - Holographic HUD */
/* Trade Counter - Holographic HUD */
.trade-counter-container {
    margin-bottom: 3rem;
    padding: 0.8rem 1.5rem;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 250px;
    z-index: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Spinning Gradient Border */
.trade-counter-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%;
    height: 250%;
    background: conic-gradient(transparent, transparent, transparent, var(--primary-color));
    animation: rotateBorder 4s linear infinite;
    transform: translate(-50%, -50%);
    z-index: -2;
}

/* Inner Background (Mask) */
.trade-counter-container::after {
    content: '';
    position: absolute;
    inset: 2px;
    /* Border thickness */
    background: rgba(2, 6, 23, 0.95);
    /* Dark background to contrast with border */
    border-radius: 8px;
    z-index: -1;
    /* Re-add the grid pattern here if desired, or keep it clean */
    background-image:
        linear-gradient(90deg, transparent 50%, rgba(0, 243, 255, 0.03) 50%),
        linear-gradient(0deg, transparent 50%, rgba(0, 243, 255, 0.03) 50%);
    background-size: 20px 20px;
}

@keyframes rotateBorder {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes scanVertical {
    0% {
        top: 0;
        height: 0;
        opacity: 0;
    }

    50% {
        top: 0;
        height: 100%;
        opacity: 1;
    }

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

.counter-label {
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 0.2em;
    margin-bottom: 0.5rem;
}

.counter-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.live-indicator {
    font-size: 0.7rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.blink {
    animation: blinker 1.5s cubic-bezier(0.5, 0, 1, 1) infinite alternate;
    font-size: 1.2em;
}

@keyframes blinker {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0 1rem;
        margin-bottom: 3rem;
        line-height: 1.3;
    }

    p {
        font-size: 0.9rem;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .cta-button {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .trade-counter-container {
        min-width: auto;
        width: 90%;
        margin: 2rem auto;
    }

    #trade-counter {
        font-size: 2.5rem;
    }

}

/* Disable Text Selection */
body {
    -webkit-user-select: none;
    /* Safari */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* IE10+/Edge */
    user-select: none;
    /* Standard */
}