:root {
    --primary-color: #2585C6;
    --secondary-color: #F87509;
    --bg-color: #0c0f16;
    --bg-card: rgba(17, 24, 39, 0.4);
    --font-main: 'Outfit', system-ui, sans-serif;
    --header-height: 60px;
    --container-width: 1100px;
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* No scrolling */
}

body {
    background-color: var(--bg-color);
    color: #ffffff;
    font-family: var(--font-main);
    line-height: 1.6;
}

.no-scroll {
    overflow: hidden;
}

/* --- Loader & Transitions --- */

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-family: 'Bebas Neue', cursive;
    font-size: 5rem;
    color: var(--primary-color);
    letter-spacing: 15px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--primary-color));
    animation: loader-pulse 1.5s infinite alternate;
}

@keyframes loader-pulse {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 15px var(--primary-color));
    }

    100% {
        opacity: 0.7;
        transform: scale(0.95);
        filter: drop-shadow(0 0 25px var(--primary-color));
    }
}

.loader-bar {
    width: 250px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto 15px;
    position: relative;
    overflow: hidden;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: loader-slide 2s infinite ease-in-out;
}

@keyframes loader-slide {
    0% {
        left: -100%;
    }

    50% {
        left: 0;
    }

    100% {
        left: 100%;
    }
}

.loader-sub {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    color: #fff;
    opacity: 0.4;
    letter-spacing: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
}

.cursor {
    animation: blink 0.8s infinite;
    font-weight: bold;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

#loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.hidden-ui {
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hidden-ui.show {
    opacity: 1;
}

/* --- Global Elements --- */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Warp Stars --- */

#stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- Header & Nav --- */

#header {
    width: 100%;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

#header .container {
    height: 100%;
}

.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.nav-btn {
    padding: 14px 40px;
    /* Stronger presence */
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    /* Default text white */
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(37, 133, 198, 0.3);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
}

.nav-btn:hover {
    transform: translateY(-3px) scale(1.05) translate(var(--gj-x, 0), var(--gj-y, 0)) skew(var(--gj-s, 0deg));
    filter: hue-rotate(var(--gj-h, 0deg)) contrast(var(--gj-c, 1));
    color: #ffffff;
    background-color: var(--secondary-color);
    box-shadow: 0 0 30px rgba(248, 117, 9, 0.6);
    transition: transform 0.05s steps(1);
}

/* RGB ghosting for button */
.nav-btn::before,
.nav-btn::after {
    content: 'Buy $2026';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.nav-btn:hover::before {
    opacity: 0.5;
    color: #ff00c1;
    z-index: -1;
    animation: glitch-slice 0.4s infinite;
}

.nav-btn:hover::after {
    opacity: 0.5;
    color: #00fff2;
    z-index: -1;
    animation: glitch-slice 0.4s infinite reverse;
}

/* --- Buttons --- */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 20px rgba(37, 133, 198, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(37, 133, 198, 0.5);
}

/* --- Midnight Sparkler Cards --- */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px;
    /* Scaled to 0.8 */
    transition: var(--transition-slow);
    position: relative;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.2), transparent 60%);
    background-size: 200% 200%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s;
}

.card:hover::after {
    opacity: 1;
    animation: sparkler-shimmer 2s infinite linear;
}

@keyframes sparkler-shimmer {
    0% {
        background-position: -200% -200%;
    }

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

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: glow-pulse 4s infinite alternate ease-in-out;
}

@keyframes glow-pulse {
    0% {
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.25;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
}

.link-card:hover {
    transform: translateY(-5px) translate(var(--gj-x, 0), var(--gj-y, 0)) skew(var(--gj-s, 0deg));
    filter: hue-rotate(var(--gj-h, 0deg)) contrast(var(--gj-c, 1));
    transition: transform 0.05s steps(1);
}

/* Pseudo-element for digital "bars" on glitch */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 10;
}

.link-card:hover::before {
    animation: glitch-bars 0.3s steps(1) infinite;
}

/* Specific glows for cards */
.contract-container.card {
    --glow-color: var(--primary-color);
}

.link-card.card:first-child {
    --glow-color: var(--secondary-color);
}

.link-card.card:last-child {
    --glow-color: var(--primary-color);
}

/* --- Hero Section --- */

#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    /* Anchored to bottom */
    max-width: 850px;
    height: 100vh;
    padding: 0 0 100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-extra {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* --- Contract Box --- */

.contract-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contract-container.card {
    padding: 10px 16px;
    /* Scaled to 0.8 */
}

.copy-box {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px 16px;
    /* Scaled to 0.8 */
    position: relative;
    width: 100%;
}

#contract-address {
    font-family: monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
    /* Scaled to 0.8 */
    font-size: 0.8rem;
    /* Scaled to 0.8 */
    letter-spacing: 1px;
}

#copy-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

#copy-btn svg {
    width: 18px;
    /* Scaled to 0.8 */
    height: 18px;
    /* Scaled to 0.8 */
}

#copy-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- Links Grid --- */

.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    /* Scaled to 0.8 */
    width: 100%;
    max-width: 520px;
    /* Scaled to 0.8 */
    margin: 0 auto;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: #ffffff;
}

.link-icon {
    width: 36px;
    /* Scaled to 0.8 */
    height: 36px;
    /* Scaled to 0.8 */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    /* Scaled to 0.8 */
    color: var(--primary-color);
    transition: var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.link-card h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.2rem;
    /* Scaled to 0.8 */
    letter-spacing: 1px;
    font-weight: 400;
}

.link-card:hover .link-icon {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-color);
}

/* --- Footer Hero --- */

#footer-hero {
    position: fixed;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 100;
}

.disclaimer {
    font-size: 0.75rem;
    opacity: 0.4;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Animations --- */

.firework-particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
}

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

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hard Digital Glitch Animations --- */

@keyframes digital-disruption {

    0%,
    100% {
        transform: translateY(-3px) scale(1.05) translate(0);
        filter: none;
    }

    50% {
        transform: translateY(-3px) scale(1.05) translate(-2px, 1px);
        filter: hue-rotate(10deg);
    }
}

@keyframes glitch-bars {
    0% {
        background: linear-gradient(transparent 20%, var(--primary-color) 21%, var(--primary-color) 23%, transparent 24%);
    }

    20% {
        background: linear-gradient(transparent 40%, var(--secondary-color) 41%, var(--secondary-color) 44%, transparent 45%);
    }

    40% {
        background: none;
    }

    60% {
        background: linear-gradient(transparent 70%, #fff 71%, #fff 72%, transparent 73%);
    }

    80% {
        background: linear-gradient(transparent 10%, var(--primary-color) 11%, var(--primary-color) 12%, transparent 13%);
    }

    100% {
        background: none;
    }
}

@keyframes glitch-slice {
    0% {
        clip-path: inset(80% 0 0 0);
        transform: translate(-15px, 8px);
    }

    10% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(15px, -8px);
    }

    20% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(-8px, 0);
    }

    30% {
        clip-path: inset(0% 0 90% 0);
        transform: translate(8px, 4px);
    }

    40% {
        clip-path: inset(40% 0 40% 0);
        transform: translate(0);
    }

    100% {
        clip-path: inset(80% 0 0 0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    html,
    body {
        overflow: hidden;
        height: 100%;
        position: fixed;
        /* Lock scroll */
        width: 100%;
    }

    /* Video Fitting: Shifted Up */
    .hero-bg {
        height: 70%;
        /* Reserve bottom 30% for UI */
        top: 0;
    }

    .bg-video {
        object-fit: contain;
        background: #000;
        transform: translateY(-5%);
        /* Nudge video up slightly */
    }

    #loader {
        padding: 20px;
    }

    .loader-text {
        font-size: 3rem;
        letter-spacing: 8px;
    }

    .nav-btn {
        padding: 14px 32px;
        /* Engorged for mobile presence */
        font-size: 1.25rem;
    }

    #hero {
        height: 100vh;
        padding-top: 60px;
        align-items: flex-end;
        /* Anchor content bottom */
    }

    .hero-content {
        height: auto;
        width: 100%;
        padding: 0 15px 200px;
        /* Lift interaction area higher to clear disclaimer */
        justify-content: flex-end;
        z-index: 20;
        /* Ensure UI is above everything */
    }

    /* Stack Strategy: Dexscreener at 'Visual Bottom' */
    .hero-extra {
        gap: 15px;
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* Contract Address (Top of stack) */
    .contract-container {
        order: 1;
        margin-bottom: 5px;
    }

    /* Links Grid (Bottom of stack) */
    .links-grid {
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Visual re-ordering of links: Communities (Top), Dex (Bottom) */
    .link-card:first-child {
        order: 1;
    }

    /* Communities */
    .link-card:last-child {
        order: 2;
    }

    /* Dexscreener */

    .copy-box {
        flex-direction: column;
        gap: 8px;
        padding: 10px;
    }

    #contract-address {
        font-size: 0.7rem;
        word-break: break-all;
    }

    #copy-btn {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Footer anchored very bottom */
    #footer-hero {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 15px 0 25px;
        /* Extra padding for safe area */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
        z-index: 5;
    }

    .disclaimer {
        font-size: 0.6rem;
        padding: 0 20px;
    }
}