* { margin:0; padding:0; box-sizing:border-box; }
body {
    background: #0a0a0a;
    color: #00ff9f;
    font-family: 'VT323', monospace;
    overflow-x: hidden; /* Prevents horizontal scrolling */
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 2px solid #00ff9f;
}

/* ADVANCED GLITCH LOGO */
.logo { 
    font-family: 'Orbitron', sans-serif; 
    font-size: 28px; 
    letter-spacing: 4px; 
    position: relative;
    color: #00ff9f;
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.8);
}
.glitch[data-text]::before, .glitch[data-text]::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}
.glitch[data-text]::before {
    left: 2px;
    text-shadow: -2px 0 #ff00aa;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}
.glitch[data-text]::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}
.nav-btn {
    background: rgba(0, 255, 159, 0.05);
    border: 2px solid #00ff9f;
    color: #00ff9f;
    padding: 8px 16px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.nav-btn:hover { 
    background: #00ff9f; 
    color: #000; 
    box-shadow: 0 0 20px #00ff9f; 
    transform: translateY(-2px);
}

/* HERO (Framed inside the screen) */
.hero { 
    height: 80vh; 
    position: relative; 
    overflow: hidden; 
    margin: 90px 2% 40px; /* Offset from top, sides, bottom */
    border: 3px solid #00ff9f;
    box-shadow: 0 0 25px rgba(0, 255, 159, 0.3);
    border-radius: 4px;
}
.hero video { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    filter: brightness(0.85) contrast(1.1); 
}
.hero-overlay { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    text-align: center; 
    z-index: 2; 
}
.hero-title { 
    font-family: 'Orbitron', sans-serif; 
    font-size: 5.5rem; 
    text-shadow: 0 0 40px #00ff9f; 
    animation: text-pulse 2s infinite; 
}

/* ANIMATED MINT BUTTON */
.mint-hero-btn-container {
    text-align: center;
    margin: 20px auto 60px;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
}
.animated-border-box {
    position: relative;
    width: 320px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(255, 0, 170, 0.3);
    transition: transform 0.3s;
}
.animated-border-box:hover {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(255, 0, 170, 0.6);
}
.animated-border-box::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    /* Running light effect */
    background: conic-gradient(transparent, transparent, transparent, #ff00aa, #00ff9f, #ff00aa);
    animation: rotate-border 2s linear infinite;
}
.animated-border-box::after {
    content: '';
    position: absolute;
    inset: 4px; /* Inner black background to hide center of gradient */
    background: #0a0a0a;
    border-radius: 2px;
}
.animated-border-box span {
    position: relative;
    z-index: 1;
    font-size: 2rem;
    color: #ff00aa;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px #ff00aa;
    transition: 0.3s;
}
.animated-border-box:hover span {
    color: #00ff9f;
    text-shadow: 0 0 15px #00ff9f;
}

/* SECTION TITLES */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin: 40px 0 20px;
    text-shadow: 0 0 20px #ff00aa;
}

/* GRIDS */
.grid-4, .grid-8 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    padding: 0 5% 40px;
}
video { width: 100%; border: 3px solid #00ff9f; box-shadow: 0 0 25px rgba(0, 255, 159, 0.4); }

/* LORE */
.lore-section { display: flex; flex-wrap: wrap; padding: 60px 5%; background: #111; gap: 40px; }
.lore-video video { max-width: 520px; }
.lore-text { max-width: 620px; font-size: 1.35rem; line-height: 1.55; }
.game-btn {
    font-size: 2rem;
    padding: 20px 60px;
    background: transparent;
    border: 4px solid #ff00aa;
    color: #ff00aa;
    margin-top: 30px;
    cursor: pointer;
    transition: 0.4s;
}
.game-btn:hover { background: #ff00aa; color: #000; box-shadow: 0 0 25px #ff00aa; }

/* TERMINAL */
.terminal-section {
    background: #000;
    padding: 40px 5%;
    border-top: 4px solid #00ff9f;
    border-bottom: 4px solid #00ff9f;
}
.terminal-header {
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #ff00aa;
    text-shadow: 0 0 15px #ff00aa;
}
.terminal {
    background: #001100;
    color: #00ff41;
    font-family: 'VT323', monospace;
    font-size: 1.25rem;
    padding: 25px;
    height: 320px;
    overflow: hidden;
    border: 2px solid #00ff41;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
    white-space: pre;
    line-height: 1.4;
}

/* STATS */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 60px 5%;
    background: #111;
}
.stat-card {
    background: rgba(0, 255, 159, 0.08);
    border: 2px solid #00ff9f;
    padding: 25px;
    text-align: center;
    font-size: 1.4rem;
    text-shadow: 0 0 15px #00ff9f;
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card span { display: block; font-size: 2.8rem; margin-top: 10px; color: #ff00aa; }

/* GAMEPLAY (Framed inside screen) */
.gameplay-section {
    position: relative;
    height: 60vh;
    overflow: hidden;
    margin: 0 2% 60px; /* Offset from bottom footer */
    border: 3px solid #00ff9f;
    box-shadow: 0 0 25px rgba(0, 255, 159, 0.3);
    border-radius: 4px;
}
.gameplay-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}
.gameplay-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(transparent 0px, rgba(0,255,159,0.08) 2px, transparent 4px);
    pointer-events: none;
    z-index: 2;
}

/* FOOTER */
footer {
    background: #000;
    padding: 60px 5% 30px;
    text-align: center;
    border-top: 3px solid #00ff9f;
}
.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.footer-btn {
    background: transparent;
    border: 3px solid #00ff9f;
    color: #00ff9f;
    padding: 14px 32px;
    font-size: 18px;
    transition: all 0.4s;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}
.footer-btn:hover { background: #00ff9f; color: #000; box-shadow: 0 0 30px #00ff9f; }

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.modal-content {
    max-width: 820px;
    background: #0a0a0a;
    border: 3px solid #00ff9f;
    padding: 40px;
    max-height: 85vh;
    overflow-y: auto;
    font-size: 1.35rem;
    line-height: 1.6;
}
.close { float: right; font-size: 40px; cursor: pointer; color: #ff00aa; transition: 0.3s; }
.close:hover { color: #00ff9f; }
.modal-close-btn {
    width: 100%;
    margin-top: 30px;
    padding: 18px;
    font-size: 1.8rem;
    background: #ff00aa;
    color: #000;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}
.modal-close-btn:hover { background: #00ff9f; box-shadow: 0 0 20px #00ff9f; }

/* ANIMATIONS */
@keyframes text-pulse {
    0% { text-shadow: 2px 2px #ff00ff, -2px -2px #00ffff; }
    50% { text-shadow: -2px 2px #ff00ff, 2px -2px #00ffff, 0 0 30px #00ff9f; }
    100% { text-shadow: 2px 2px #ff00ff, -2px -2px #00ffff; }
}
@keyframes glitch-anim-1 {
    0% { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); transform: translate(0); }
    20% { clip-path: polygon(0 15%, 100% 15%, 100% 15%, 0 15%); transform: translate(-2px, 2px); }
    40% { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); transform: translate(2px, -2px); }
    60% { clip-path: polygon(0 40%, 100% 40%, 100% 45%, 0 45%); transform: translate(0); }
    80% { clip-path: polygon(0 30%, 100% 30%, 100% 35%, 0 35%); transform: translate(2px, 2px); }
    100% { clip-path: polygon(0 5%, 100% 5%, 100% 10%, 0 10%); transform: translate(0); }
}
@keyframes glitch-anim-2 {
    0% { clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%); transform: translate(0); }
    20% { clip-path: polygon(0 80%, 100% 80%, 100% 85%, 0 85%); transform: translate(2px, -2px); }
    40% { clip-path: polygon(0 55%, 100% 55%, 100% 60%, 0 60%); transform: translate(-2px, 2px); }
    60% { clip-path: polygon(0 70%, 100% 70%, 100% 75%, 0 75%); transform: translate(0); }
    80% { clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%); transform: translate(-2px, -2px); }
    100% { clip-path: polygon(0 65%, 100% 65%, 100% 70%, 0 70%); transform: translate(0); }
}
@keyframes rotate-border {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* MOBILE FIX */
@media (max-width: 768px) {
    .navbar { 
        flex-direction: column; 
        padding: 15px; 
        gap: 12px;
    }
    .logo { 
        font-size: 22px; 
        text-align: center; 
    }
    .nav-buttons { 
        display: flex;
        flex-direction: row; 
        flex-wrap: wrap;
        gap: 8px; 
        justify-content: center; 
        width: 100%;
    }
    .nav-btn { 
        margin: 0; 
        flex: 1 1 auto; /* Fill available space */
        text-align: center;
        font-size: 16px;
        padding: 6px 10px;
    }
    .hero { 
        margin-top: 130px; /* Offset for taller mobile navbar */
        height: 50vh; 
    }
    .hero-title { font-size: 3.2rem; }
    .animated-border-box { width: 90%; } /* Scale down mint button for mobile */
}