:root {
    --primary-color: #FF0055;
    /* Rad Red */
    --secondary-color: #00FFCC;
    /* Electric Teal */
    --accent-color: #FFFF00;
    /* Neon Yellow */
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --card-bg: #2a2a2a;
    --font-heading: 'Press Start 2P', cursive;
    --font-body: 'VT323', monospace;
}

.hidden {
    display: none !important;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 1.2rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 4px solid var(--secondary-color);
    background: #000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    border: 2px solid var(--accent-color);
    box-shadow: 4px 4px 0 var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-right: 20px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icon {
    color: var(--secondary-color);
    font-family: var(--font-heading);
    text-decoration: none;
    font-size: 1.2rem;
    border: 2px solid var(--secondary-color);
    padding: 5px 10px;
    transition: all 0.2s;
}

.social-icon:hover {
    background: var(--secondary-color);
    color: #000;
    box-shadow: 2px 2px 0 var(--primary-color);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
}

nav a:hover {
    color: var(--accent-color);
    text-shadow: 2px 2px 0 var(--primary-color);
}

/* Buttons */
.btn-retro {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    border: 2px solid #fff;
    box-shadow: 4px 4px 0 #000;
    transition: transform 0.1s, box-shadow 0.1s;
}

.btn-retro:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.btn-secondary {
    background: var(--secondary-color);
    color: #000;
}

/* Hero Section */
#hero {
    padding: 80px 0;
    background: url('collage.jpg') no-repeat center center/cover;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

/* Game Over Screen */
#game-over {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
    backdrop-filter: blur(5px);
}

#game-over.hidden {
    display: none;
}

#game-over h3 {
    color: #FF0055;
    font-size: 40px;
    margin-bottom: 20px;
    text-shadow: 2px 2px #00FFCC;
}

#game-over p {
    font-size: 24px;
    margin-bottom: 30px;
    color: #fff;
}

/* Game Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #111;
    border: 4px solid #00FFCC;
    padding: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 204, 0.3);
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Game Selector */
#game-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.game-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.game-wrapper.hidden {
    display: none;
}

/* Snake Game */
canvas#snake {
    border: 2px solid #333;
    background-color: #000;
    box-shadow: inset 0 0 10px rgba(0, 255, 204, 0.2);
}

.score-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--secondary-color);
    padding: 8px;
    margin-bottom: 10px;
    box-shadow: 4px 4px 0 var(--primary-color);
    min-width: 100px;
}

.score-box span {
    display: block;
    font-size: 0.7rem;
    color: var(--secondary-color);
    margin-bottom: 3px;
    font-family: var(--font-heading);
}

.score-box div {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.higher-score-gameplay {
    display: none;
    /* Hide during gameplay as requested */
}

.game-over-scores {
    margin-bottom: 20px;
    text-align: center;
}

.game-over-scores p {
    font-size: 1.2rem !important;
    margin-bottom: 5px !important;
    color: var(--accent-color) !important;
}

.game-over-scores span {
    color: #fff;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: #FF0055;
    cursor: pointer;
    font-family: 'VT323', monospace;
    z-index: 100;
}

#hero .container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent-color);
    text-shadow: 4px 4px 0 var(--primary-color);
    margin-bottom: 20px;
}

h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.cta-group {
    margin: 30px 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ca-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--accent-color);
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    box-shadow: 4px 4px 0 var(--primary-color);
}

.ca-box span {
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

.ca-box code {
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.7rem;
    box-shadow: 2px 2px 0 #000;
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.stat-box {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--secondary-color);
    padding: 15px;
    box-shadow: 4px 4px 0 var(--primary-color);
}

.stat-box span {
    display: block;
    font-size: 0.9rem;
    color: #ccc;
}

.stat-box strong {
    display: block;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.hero-image {
    flex: 1;
    display: none;
    /* Hidden on mobile, shown on desktop */
}

@media (min-width: 768px) {
    .hero-image {
        display: block;
    }

    .hero-image img {
        width: 100%;
        border: 4px solid #fff;
        box-shadow: 8px 8px 0 var(--primary-color);
        transform: rotate(-5deg);
    }
}

/* Sections */
section {
    padding: 60px 0;
}

section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

/* About */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
}

.text-block {
    background: var(--card-bg);
    padding: 30px;
    border: 2px solid var(--primary-color);
    box-shadow: 6px 6px 0 var(--secondary-color);
}

.image-block img {
    width: 100%;
    border: 2px solid var(--accent-color);
    box-shadow: -6px 6px 0 var(--primary-color);
}

/* Tokenomics */
.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.token-card {
    background: var(--card-bg);
    padding: 20px;
    border: 2px solid var(--secondary-color);
    text-align: center;
    transition: transform 0.3s;
}

.token-card:hover {
    transform: translateY(-10px);
    background: var(--secondary-color);
    color: #000;
}

.token-card h3 {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.percentage {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.token-card:hover .percentage {
    color: #fff;
}

/* How to Buy */
.steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .steps {
        flex-direction: row;
    }
}

.step {
    flex: 1;
    background: var(--card-bg);
    padding: 30px;
    border: 2px solid #fff;
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: #000;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
}

.step h3 {
    margin-top: 10px;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    font-size: 1rem;
}

/* Footer */
footer {
    background: #000;
    padding: 40px 0;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.socials {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.socials a {
    color: var(--secondary-color);
    font-family: var(--font-heading);
    text-decoration: none;
}

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

    /* Header */
    header .container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    nav {
        width: 100%;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        margin: 0;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    /* Hero */
    #hero .container {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
    }

    .hero-content {
        width: 100%;
    }

    h1 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 1.1rem;
    }

    .cta-group {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn-large {
        width: 100%;
        max-width: 300px;
    }

    .stats {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 15px;
    }

    .stat-box {
        width: 100%;
        max-width: 320px;
        padding: 10px;
    }

    .ca-box {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        padding: 15px;
        gap: 10px;
        text-align: center;
    }

    .ca-box code {
        word-break: break-all;
        font-size: 0.8rem;
        display: block;
        margin: 5px 0;
    }

    .ca-box span {
        font-size: 0.9rem;
    }

    /* Game Modal */
    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .game-container {
        flex-direction: column;
        align-items: center;
    }

    canvas#tetris,
    canvas#snake {
        max-width: 100%;
        height: auto;
    }

    /* Mobile Controls */
    #mobile-controls {
        display: grid !important;
        /* Show on mobile */
    }
}

/* Mobile Controls Styles (Hidden by default) */
#mobile-controls {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 15px;
    font-size: 24px;
    border-radius: 50%;
    touch-action: manipulation;
    /* Prevent zoom/scroll on double tap */
    user-select: none;
}

.control-btn:active {
    background: var(--secondary-color);
    color: #000;
}

.control-up {
    grid-column: 2;
}

.control-left {
    grid-column: 1;
    grid-row: 2;
}

.control-down {
    grid-column: 2;
    grid-row: 2;
}

.control-right {
    grid-column: 3;
    grid-row: 2;
}

/* Leaderboard Section */
#leaderboard-section {
    background: #000;
    border-top: 4px solid var(--secondary-color);
}

.leaderboard-container {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .leaderboard-container {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }

    .leaderboard-column {
        min-width: 100%;
        max-width: 320px;
        padding: 15px;
        box-shadow: 4px 4px 0 var(--secondary-color);
    }
}

.leaderboard-column {
    flex: 1;
    min-width: 280px;
    background: var(--card-bg);
    padding: 20px;
    border: 2px solid var(--primary-color);
    box-shadow: 6px 6px 0 var(--secondary-color);
}

.leaderboard-column h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
    border-bottom: 2px dashed var(--primary-color);
    padding-bottom: 10px;
}

.score-list {
    list-style: none;
    padding: 0;
    max-height: 300px;
    /* Fixed height for scrolling */
    overflow-y: auto;
    /* Enable vertical scroll */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: var(--secondary-color) #000;
}

/* Webkit Scrollbar Styling (Chrome/Safari) */
.score-list::-webkit-scrollbar {
    width: 8px;
}

.score-list::-webkit-scrollbar-track {
    background: #000;
}

.score-list::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border: 2px solid #000;
}

.live-indicator {
    color: #00FF00;
    font-size: 0.8rem;
    font-family: var(--font-body);
    animation: pulse 2s infinite;
    text-shadow: 0 0 5px #00FF00;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.score-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #444;
    font-size: 1.1rem;
    color: #fff;
}

.score-list li:last-child {
    border-bottom: none;
}

.score-list li span:first-child {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* New High Score Input */
#new-high-score {
    margin-bottom: 20px;
}

.platform-indicator {
    text-align: center;
    color: var(--secondary-color);
    font-family: var(--font-body);
    margin-top: -10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }
}



#new-high-score .highlight {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    animation: blink 0.5s infinite alternate;
}

.input-retro {
    background: #000;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 10px;
    font-family: var(--font-body);
    font-size: 1.2rem;
    width: 100%;
    margin-bottom: 10px;
    outline: none;
    box-shadow: 4px 4px 0 var(--primary-color);
}

.input-retro:focus {
    border-color: var(--accent-color);
}

.blink {
    animation: blink 0.5s step-start infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* --- Wallet Modal --- */
#wallet-modal .modal-content {
    max-width: 500px;
    text-align: center;
}

.wallet-details {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.highlight-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--neon-green);
    padding: 10px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: var(--neon-green);
    word-break: break-all;
    box-shadow: 0 0 10px var(--neon-green);
}

.balance-box {
    font-size: 1.8rem;
    font-family: 'Press Start 2P', cursive;
    color: var(--neon-pink);
    text-shadow: 2px 2px #000;
    margin: 10px 0;
}

.balance-box .currency {
    font-size: 1.5rem;
    color: #fff;
}

.btn-danger {
    background: linear-gradient(180deg, #ff4d4d, #990000);
    border-color: #ff0000;
}

.btn-danger:hover {
    box-shadow: 0 0 15px #ff0000;
}