:root {
    --royal-purple: #4B0082;
    --gold: #FFD700;
    --text-color: #FFFFFF;
    --background: #000000;
    --silver: #C0C0C0;
    --shimmer-white: #FFFFFF;
    --shimmer-light: #F0F0F0;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
    position: relative;
}

a { text-decoration: none; color: inherit; }

#stars { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    background-color: var(--royal-purple); 
    z-index: 1000; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding: 0 6px; 
    height: 80px; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); 
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    max-width: 1200px; 
    position: relative; 
}

.nav-links { 
    display: flex; 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    align-items: center; 
}
.nav-links a { 
    font-family: 'Jost', sans-serif; 
    font-weight: bold; 
    transition: color 0.3s, transform 0.3s; 
    text-transform: uppercase; 
}

.nav-links li { margin: 0 15px; }

.nav-links a:hover { 
    color: var(--gold); 
    transform: scale(1.1); 
}

.shill-text { 
    font-family: 'Jost', sans-serif; 
    font-size: 2.5em; 
    color: white; 
    font-weight: 900; 
}

.logo { 
    flex-shrink: 0; 
    position: relative; 
    transform: translateY(20px); 
    padding: 10px; 
    cursor: pointer; 
}

.logo-flip {
    position: relative;
    width: 100px;
    height: 100px;
    transition: transform 0.8s ease-in-out;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    pointer-events: auto;
}

.logo-front, .logo-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
}

.logo-front {
    transform: rotateY(0deg);
    z-index: 2;
}

.logo-back {
    transform: rotateY(180deg);
}

.logo:hover .logo-flip,
.logo.flipped .logo-flip {
    transform: rotateY(180deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    left: 10px;
}
.hamburger span {
    height: 3px;
    background-color: var(--text-color);
    width: 100%;
    transition: all 0.3s;
}
.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: var(--royal-purple);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999;
}
.mobile-menu.open {
    display: flex;
}
.mobile-menu a {
    font-family: 'Jost', sans-serif;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s;
    text-transform: uppercase;
}
.mobile-menu a:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

section { padding: 40px 20px 40px; text-align: center; }

.section-title { 
    font-family: 'Poppins', sans-serif; 
    font-size: 2.1em; 
    background: linear-gradient(45deg, var(--shimmer-white) 0%, var(--shimmer-light) 50%, var(--shimmer-white) 100%);
    background-size: 200% 200%;
    color: black;
    padding: 7px 21px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 40px;
    animation: shimmer 2s ease-in-out infinite;
    text-shadow: none;
    border: none;
}
.section-title:hover { transform: scale(1.05); }

@keyframes shimmer {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

#hero { 
    position: relative; 
    height: 100vh; 
    background-image: url('/desktophero.png'); /* Default desktop image */
    background-size: cover; 
    width: 85%; /* 75% width on desktop */
    max-width: 1800px; /* Optional cap for very wide screens */
    margin: 120px auto 0; /* Separation from navbar */
    border-radius: 30px; /* Rounded edges */
    overflow: hidden; /* Ensure rounded edges apply */
    overflow-x: hidden; /* Enforce no horizontal overflow */
    background-position: center; 
    padding: 0; 
    animation: heroFade 30s infinite; /* Fade between 3 images */
    will-change: background-image, opacity; /* Optimize rendering */
}

/* Preload images to prevent loading delays */
#hero::before {
    content: '';
    position: absolute;
    top: -9999px;
    left: -9999px;
    background-image: url('/desktophero.png'), url('/desktophero3.png'), url('/desktophero2.png');
    visibility: hidden;
}

/* Media query for mobile view (below 768px) */
@media (max-width: 768px) {
  #hero {
        height: 100vh;
        background-position: center;
        background-size: cover;
        width: 100%;
        max-width: 100%;
        margin: 60px auto 0;
        border-radius: 10px;
        animation: heroFadeMobile 30s infinite ease-in-out;
        will-change: background-image, opacity;
    }
    #hero::before {
        content: '';
        position: absolute;
        top: -9999px;
        left: -9999px;
        background-image: url('/mobilehero.png'), url('/mobilehero2.png'), url('/mobilehero3.png');
        visibility: hidden;
    }
    .left-links, .right-links { display: none; }
    .hamburger { display: flex; }
    .logo { margin: 0 auto; transform: translateY(10px); }
    .cta-buttons { flex-direction: column; gap: 10px; }
    section { padding: 70px 10px 20px; }
    .images-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, auto); }
    .section-title { font-size: 1.75em; padding: 5px 15px; }
    .overview { font-size: 1.2em; }
    #about .section-title, #images .section-title { margin-top: -10px; }
    .video-placeholder { height: 30vh; margin-top: 10px; }
    .shill-text { font-size: 1.75em; font-weight: 900; }
}

.cta-container { 
    position: absolute; 
    bottom: 20%; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100%; 
    display: flex; 
    justify-content: center; 
}
.cta-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
}
.cta-button { 
    font-family: 'Poppins', sans-serif; 
    background-color: var(--gold);
    color: black; 
    padding: 10px 20px; 
    font-weight: bold; 
    border-radius: 5px; 
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    position: relative;
    /* Removed overflow: hidden to allow border glow to extend */
    animation: active-shimmer 1.5s ease-in-out infinite;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.cta-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid rgba(255, 215, 0, 0.8);
    border-radius: 7px;
    box-shadow: 0 0 0 rgba(255, 215, 0, 0); /* Default no glow */
    z-index: -1; /* Behind the button for layering */
}
.cta-button:hover { 
    transform: translateY(-5px); 
    background-color: #FFC107; /* Added background color change for more noticeability */
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.7);
}
.cta-button:hover::before {
    animation: border-glow 0.8s ease-in-out infinite;
}

#about { background-color: transparent; } /* Changed to transparent to show stars */
#about .section-title { margin-top: -5px; }
.overview { 
    font-family: 'Poppins', sans-serif; 
    font-size: 1.5em; 
    max-width: 800px; 
    margin: 0 auto; /* Remove bottom margin to prevent collapse */
    padding: 20px; 
    line-height: 1.6; 
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.7); /* Semi-translucent royal purple */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 60px; /* Increased margin to ensure separation */
}

.about-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; /* Ensure gap is respected */
    max-width: 1200px; 
    margin: 0 auto; 
    padding-top: 20px; /* Add padding to prevent overlap with .overview */
}
.about-card { 
    background-color: rgba(75, 0, 130, 1); /* Solid purple */
    padding: 20px; 
    border-radius: 10px; 
    transition: transform 0.3s, box-shadow 0.3s; 
    color: var(--text-color); /* White text */
}
.about-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3); 
}
.about-card img {
    width: 100%;
    max-width: 300px; /* Cap width to match 3:2 */
    height: 200px;
    aspect-ratio: 3/2; /* Enforce intrinsic ratio */
    object-fit: contain; /* Preserve image clarity */
    border-radius: 10px;
    margin-bottom: 10px;
    transition: filter 0.3s;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    overflow: hidden;
    clip-path: inset(0 0 0 0 round 10px);
}
.about-card img:hover { filter: brightness(1.2); }
.about-card p { font-family: 'Poppins', sans-serif; }
.about-card h3 { font-family: 'Jost', sans-serif; font-weight: bold; }

/* ... Previous CSS (unchanged up to #legend) ... */

#legend {
    background-color: transparent; /* Transparent to show stars */
    color: #000000; /* Black text for contrast */
}
#legend .section-title { margin-top: -20px; }
#legend .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
#legend .about-card {
    background-color: var(--gold); /* Solid gold */
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    color: #000000; /* Black text */
}
#legend .about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); /* Black shadow */
}
#legend .about-card img {
   width: 100%;
    max-width: 300px; /* Cap width to match 3:2 */
    height: 200px;
    aspect-ratio: 3/2; /* Enforce intrinsic ratio */
    object-fit: contain; /* Preserve image clarity */
    border-radius: 10px;
    margin-bottom: 10px;
    transition: filter 0.3s, transform 0.3s;
    animation: pulse 3s ease-in-out infinite;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    overflow: hidden;
    clip-path: inset(0 0 0 0 round 10px);
}
#legend .about-card img:hover {
    filter: brightness(1.2);
    animation-play-state: paused; /* Pause pulsing on hover */
}
#legend .about-card p { font-family: 'Poppins', sans-serif; }
#legend .about-card h3 { font-family: 'Jost', sans-serif; font-weight: bold; }


#images { background-color: rgba(0, 0, 0, 0.6); }
#images .section-title { margin-top: -20px; }
.images-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    grid-template-rows: repeat(4, auto); 
    gap: 10px; 
    max-width: 1800px; 
    margin: 0 auto; 
}
.images-grid img { 
    width: 100%; 
    height: auto; 
    aspect-ratio: 1/1; 
    object-fit: cover; 
    border-radius: 5px; 
    transition: transform 0.3s, box-shadow 0.3s; 
    cursor: pointer; 
}
.images-grid img:hover { 
    transform: scale(1.1); 
    box-shadow: 0 5px 15px var(--gold); 
}

/* ... Previous CSS (unchanged up to #video) ... */

#video {
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: 40px;
}
.video-container {
    width: 100%;
    max-width: 80%; /* 80% width on desktop */
    margin: 0 auto; /* Center horizontally */
    text-align: center;
}
.video-item {
    width: 100%;
    max-width: 100%; /* Full width within container */
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
    object-fit: cover;
    display: block;
    background: #000;
}
.video-spacing {
    height: 20px;
}

/* ... Other sections unchanged (e.g., #images, #tokenomics) ... */

@media (max-width: 768px) {
    /* ... Other @media rules unchanged ... */
    .video-container {
        max-width: 100%; /* Full width on mobile */
        padding: 0 10px;
        max-width: 100vw; /* Full width on mobile */
    }
    .video-item {
        max-width: 100%; /* Full width on mobile */
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 5px;
        background: #000;
    }
}

/* ... Rest of CSS unchanged ... */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 80vw; /* Fit viewport width */
    max-height: 80vh; /* Limit height */
    height: auto;
    margin-top: 10vh;
    aspect-ratio: 1/1; /* Maintain square aspect ratio */
    object-fit: contain; /* Preserve image without cropping */
    box-sizing: border-box;
}

.close {
    color: var(--gold);
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-width: 90vw;
        max-height: 90vh;
        margin-top: 5vh;
        aspect-ratio: 1/1; /* Maintain square aspect ratio on mobile */
        object-fit: contain;
    }
}

/* ... Rest of CSS unchanged (footer, etc.) ... */

footer { background-color: rgba(75, 0, 130, 0.6); padding: 20px; text-align: center; }
.social-icons { display: flex; justify-content: center; gap: 40px; }
.social-icon { display: inline-block; transition: transform 0.3s; }
.social-logo { width: 32px; height: 32px; transition: filter 0.3s; }
.social-icon:hover .social-logo { filter: brightness(1.5); transform: rotate(15deg) scale(1.2); }
.social-icon:hover { color: #FFF; }
.social-icon:hover .social-logo { filter: brightness(1.5); transform: rotate(15deg) scale(1.2); }
.social-icon:hover { color: #FFF; }

/* Fixed Active Shimmer Animation (Added missing keyframes with gold colors) */
@keyframes active-shimmer {
    0% {
        box-shadow: 0 0 3px rgba(255, 215, 0, 0.2), 0 0 8px rgba(255, 215, 0, 0.1);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.3);
        transform: scale(1.03);
    }
    100% {
        box-shadow: 0 0 3px rgba(255, 215, 0, 0.2), 0 0 8px rgba(255, 215, 0, 0.1);
        transform: scale(1);
    }
}

/* New keyframes for pulsing */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01); /* Slight scale up */
    }
    100% {
        transform: scale(1);
    }
}

/* Fixed Border Glow Animation for Hover (Changed to gold colors for better contrast) */
@keyframes border-glow {
    0% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 30px rgba(255, 215, 0, 0.7);
        border-color: rgba(255, 215, 0, 1);
    }
    100% {
        box-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.8);
    }
}

#tokenomics {
    background-color: rgba(0, 0, 0, 0.5); /* Matches .overview */
    padding: 40px 20px;
    text-align: center;
}

/* ... Previous CSS (unchanged up to .tokenomics-text) ... */

.tokenomics-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8em;
    color: var(--gold);
    margin: 20px auto;
    max-width: 800px;
    line-height: 1.6;
    position: relative;
    min-height: 2em; /* Prevent layout shift */
}

.typing-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: none; /* Cursor handled by .cursor */
}

.cursor {
    display: inline-block;
    font-size: 1.8em;
    color: var(--gold);
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.ca-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.ca-button {
    font-family: 'Poppins', sans-serif;
    background-color: var(--royal-purple); /* Stationary purple */
    color: var(--text-color); /* White text */
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    max-width: 500px; /* Desktop max width */
    width: 100%; /* Full-width within container */
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box; /* Prevent padding overflow */
    animation: none; /* Explicitly disable pulsing */
}

.ca-button:hover {
    background-color: #6A0DAD; /* Brighter purple on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 0, 130, 0.5); /* Purple glow */
}

.copy-button {
    font-family: 'Poppins', sans-serif;
    background-color: var(--gold); /* Golden background */
    color: black; /* Black text */
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    animation: active-shimmer 1.5s ease-in-out infinite; /* Pulsing shimmer */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-sizing: border-box; /* Prevent padding overflow */
}

.copy-button:hover {
    background-color: #FFC107; /* Brighter gold */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.7); /* Gold glow */
}

.copy-button.copied {
    background-color: var(--royal-purple); /* Purple when copied */
    color: var(--text-color);
    animation: none; /* Stop pulsing */
}

@media (max-width: 768px) {
    .tokenomics-text {
        font-size: 1.4em;
    }
    .cursor {
        font-size: 1.4em;
    }
    .ca-container {
        flex-direction: column;
        gap: 10px;
        width: 100%; /* Full-width container */
        padding: 0 10px; /* Prevent container overflow */
    }
    .ca-button {
        font-size: 0.9em;
        padding: 8px 15px;
        max-width: 90vw; /* Fit within viewport */
        width: 100%; /* Full-width within container */
        animation: none; /* Ensure no pulsing on mobile */
    }
    .copy-button {
        font-size: 0.9em;
        padding: 8px 15px;
        width: 100%; /* Full-width button */
        max-width: 90vw; /* Fit within viewport */
    }
}

/* ... Rest of CSS unchanged ... */

@keyframes heroFade {
    0% {
        background-image: url('/desktophero.png');
        opacity: 1;
    }
    28% {
        background-image: url('/desktophero.png');
        opacity: 1;
    }
    33.33% {
        background-image: url('/desktophero3.png');
        opacity: 1; /* Start fade */
    }
    38% {
        background-image: url('/desktophero3.png');
        opacity: 1;
    }
    61.33% {
        background-image: url('/desktophero3.png');
        opacity: 1;
    }
    66.66% {
        background-image: url('/desktophero2.png');
        opacity: 1;
    }
    71.33% {
        background-image: url('/desktophero2.png');
        opacity: 1;
    }
    94.66% {
        background-image: url('/desktophero2.png');
        opacity: 1;
    }
    100% {
        background-image: url('/desktophero.png');
        opacity: 1;
    }
}

@keyframes heroFadeMobile {
    0% {
        background-image: url('/mobilehero.png');
        opacity: 1;
    }
    30% {
        background-image: url('/mobilehero.png');
        opacity: 1;
    }
    33.33% {
        background-image: url('/mobilehero2.png');
        opacity: 1;
    }
    36.66% {
        background-image: url('/mobilehero2.png');
        opacity: 1;
    }
    63.33% {
        background-image: url('/mobilehero2.png');
        opacity: 1;
    }
    66.66% {
        background-image: url('/mobilehero3.png');
        opacity: 1;
    }
    70% {
        background-image: url('/mobilehero3.png');
        opacity: 1;
    }
    96.66% {
        background-image: url('/mobilehero3.png');
        opacity: 1;
    }
    100% {
        background-image: url('mobilehero.png');
        opacity: 1;
    }
}

/* Global box-sizing for safety */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Enlarge CTA buttons by 50% on desktop */
@media (min-width: 769px) {
    .cta-button {
        font-size: 1.5em; /* 50% larger */
        padding: 15px 30px; /* 50% larger */
        border-radius: 2.5px; /* 50% larger */
    }
    .cta-buttons {
        gap: 30px;
        max-width: 100%;
        flex-wrap: wrap;
    }
    .cta-container {
        padding: 0 10px;
        box-sizing: border-box;
    }
}











