body {
    margin: 0;
    padding: 0;
    font-family: 'Arial Black', Gadget, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: hidden;
    perspective: 1000px;
    background: #000;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(-45deg, #000000, #050505, #0a0515, #000000);
    background-size: 400% 400%;
    animation: gradient-move 15s ease infinite;
    z-index: -3;
    will-change: transform;
}

@keyframes gradient-move {
    0% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
    100% { transform: translate(0, 0); }
}

.synth-sun {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    width: 600px;
    height: 600px;
    background: linear-gradient(to bottom, #ff00ff 0%, #ff8800 100%);
    border-radius: 50%;
    z-index: -2;
    box-shadow: 0 0 80px #ff00ff;
    -webkit-mask-image: linear-gradient(to bottom, 
        black 0%, black 60%, 
        transparent 60%, transparent 62%, 
        black 62%, black 67%, 
        transparent 67%, transparent 70%, 
        black 70%, black 76%, 
        transparent 76%, transparent 80%, 
        black 80%, black 88%, 
        transparent 88%, transparent 93%, 
        black 93%, black 100%
    );
    mask-image: linear-gradient(to bottom, 
        black 0%, black 60%, 
        transparent 60%, transparent 62%, 
        black 62%, black 67%, 
        transparent 67%, transparent 70%, 
        black 70%, black 76%, 
        transparent 76%, transparent 80%, 
        black 80%, black 88%, 
        transparent 88%, transparent 93%, 
        black 93%, black 100%
    );
}

.synth-grid {
    position: fixed;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 150%;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 255, 0.3) 25%, rgba(0, 255, 255, 0.3) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.3) 75%, rgba(0, 255, 255, 0.3) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 255, 0.3) 25%, rgba(0, 255, 255, 0.3) 26%, transparent 27%, transparent 74%, rgba(0, 255, 255, 0.3) 75%, rgba(0, 255, 255, 0.3) 76%, transparent 77%, transparent);
    background-size: 60px 60px;
    transform: perspective(500px) rotateX(60deg) translateY(0);
    z-index: -1;
    animation: grid-move 2s linear infinite;
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 90%);
    mask-image: linear-gradient(to top, black 0%, transparent 90%);
    pointer-events: none;
}

@keyframes grid-move {
    from { transform: perspective(500px) rotateX(60deg) translateY(0); }
    to { transform: perspective(500px) rotateX(60deg) translateY(60px); }
}


.container {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 10px solid #fff;
    padding: 30px 50px;
    box-shadow: 20px 20px 0px #ff00ff, -20px -20px 0px #00ffff;
    max-width: 800px;
    width: 90%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.container:hover {
    transform: rotate(0deg) scale(1.02);
}

header {
    margin-bottom: 20px;
}

h1 {
    font-size: 5rem;
    margin: 0;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 5px 5px 0px #ff00ff, 10px 10px 0px #00ffff;
    letter-spacing: -2px;
    line-height: 0.9;
    padding-left: 340px;
}

.hero-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 370px;
    height: auto;
    display: block;
    transform: rotate(0deg);
    transition: all 0.3s ease;
    z-index: 2;
    opacity: 0.95;
    filter: brightness(1.1) contrast(1.1) drop-shadow(0 0 20px rgba(0, 255, 255, 0.5));
    mix-blend-mode: lighten;
}


.smooth-marquee {
    background: #fff;
    color: #000;
    font-weight: bold;
    padding: 10px;
    transform: rotate(2deg);
    margin-bottom: 30px;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
}

.marquee-content {
    display: flex;
    animation: marquee-scroll 20s linear infinite;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.coin-track {
    position: absolute;
    z-index: 5;
    pointer-events: none;
}

.coin-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at center, #ffff00 3px, #ffff00 4px, rgba(255, 255, 0, 0.6) 5px, transparent 7px);
    background-size: 40px 100%;
    background-position: center;
}

.coin-track.top::before { 
    background-repeat: round; 
    background-size: 40px 100%;
    animation: eat-top-dots 10s linear infinite; 
    animation-delay: -0.5s;
    animation-play-state: paused;
}
.coin-track.right::before { 
    background-repeat: round; 
    background-size: 100% 40px;
    animation: eat-right-dots 10s linear infinite; 
    animation-delay: -0.5s;
    animation-play-state: paused;
}
.coin-track.bottom::before { 
    background-repeat: round; 
    background-size: 40px 100%;
    animation: eat-bottom-dots 10s linear infinite; 
    animation-delay: -0.5s;
    animation-play-state: paused;
}
.coin-track.left::before { 
    background-repeat: round; 
    background-size: 100% 40px;
    animation: eat-left-dots 10s linear infinite; 
    animation-delay: -0.5s;
    animation-play-state: paused;
}

.container.is-running .coin-track::before {
    animation-play-state: running;
}

.coin-track.top {
    top: -65px; left: -55px; right: -55px; height: 20px;
}

.coin-track.right {
    top: -55px; right: -65px; bottom: -55px; width: 20px;
}

.coin-track.bottom {
    bottom: -65px; left: -55px; right: -55px; height: 20px;
}

.coin-track.left {
    top: -55px; left: -65px; bottom: -55px; width: 20px;
}

@keyframes eat-top-dots {
    0% { clip-path: inset(0 0 0 0); }
    25%, 100% { clip-path: inset(0 0 0 100%); }
}

@keyframes eat-right-dots {
    0%, 25% { clip-path: inset(0 0 0 0); }
    50%, 100% { clip-path: inset(100% 0 0 0); }
}

@keyframes eat-bottom-dots {
    0%, 50% { clip-path: inset(0 0 0 0); }
    75%, 100% { clip-path: inset(0 100% 0 0); }
}

@keyframes eat-left-dots {
    0%, 75% { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(0 0 100% 0); }
}

.pacman-perimeter {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 25;
    pointer-events: auto;
    cursor: pointer;
    animation: pacman-perimeter-move 10s linear infinite;
    animation-delay: -0.5s;
    animation-play-state: paused;
}

.container.is-running .pacman-perimeter {
    animation-play-state: running;
}

.pacman-top, .pacman-bottom {
    position: absolute;
    width: 100%;
    height: 50%;
    background: #ffff00;
    left: 0;
    box-shadow: 0 0 15px #ffff00;
}

.pacman-top::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 20px;
    width: 5px;
    height: 5px;
    background: #000;
    border-radius: 50%;
}

.pacman-top {
    top: 0;
    border-radius: 20px 20px 0 0;
    transform-origin: bottom;
    animation: pacman-chomp-top 0.2s ease-in-out infinite;
    animation-delay: -0.1s;
    animation-play-state: paused;
}

.container.is-running .pacman-top {
    animation-play-state: running;
}

.pacman-bottom {
    bottom: 0;
    border-radius: 0 0 20px 20px;
    transform-origin: top;
    animation: pacman-chomp-bottom 0.2s ease-in-out infinite;
    animation-delay: -0.1s;
    animation-play-state: paused;
}

.container.is-running .pacman-bottom {
    animation-play-state: running;
}

@keyframes pacman-chomp-top {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-35deg); }
}

@keyframes pacman-chomp-bottom {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(35deg); }
}


@keyframes pacman-perimeter-move {
    0% { top: -75px; left: -75px; transform: rotate(0deg); }
    25% { top: -75px; left: calc(100% + 35px); transform: rotate(0deg); }
    25.01% { transform: rotate(90deg); }
    50% { top: calc(100% + 35px); left: calc(100% + 35px); transform: rotate(90deg); }
    50.01% { transform: rotate(180deg); }
    75% { top: calc(100% + 35px); left: -75px; transform: rotate(180deg); }
    75.01% { transform: rotate(270deg); }
    100% { top: -75px; left: -75px; transform: rotate(270deg); }
}

nav {
    text-align: center;
    position: relative;
    z-index: 30;
}

.links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 20px;
}

.links li {
    margin: 10px;
}

a {
    display: inline-block;
    background: #000;
    color: #00ff00;
    text-decoration: none;
    padding: 15px 30px;
    font-size: 1.5rem;
    border: 4px solid #00ff00;
    box-shadow: 8px 8px 0px #00ff00;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    text-transform: uppercase;
}

a:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0px 0px 0px #00ff00;
    transform: translate(8px, 8px);
}

.visitor-counter {
    margin: 40px 0 40px auto;
    width: fit-content;
    font-family: monospace;
    background: #fff;
    color: #000;
    padding: 20px;
    font-size: 2rem;
    border: 5px solid #000;
    transform: skew(-10deg);
}

.bg-text {
    position: fixed;
    font-size: 20rem;
    color: rgba(255, 255, 255, 0.05);
    z-index: 1;
    pointer-events: none;
    white-space: nowrap;
    animation: slide 60s linear infinite;
    top: 50%;
    transform: translateY(-50%);
    will-change: transform;
}

.shape {
    position: fixed;
    z-index: 2;
    opacity: 0.3;
    animation: float 20s infinite alternate ease-in-out;
    will-change: transform;
}

@keyframes float {
    from { transform: translate(0, 0) rotate(0deg) scale(1); }
    to { transform: translate(200px, -100px) rotate(720deg) scale(2); }
}

@keyframes slide {
    from { transform: translateY(-50%) translateX(100%); }
    to { transform: translateY(-50%) translateX(-100%); }
}

footer {
    margin-top: 30px;
    background: #ffff00;
    color: #000;
    padding: 20px;
    width: 100%;
    text-align: center;
    font-weight: bold;
    transform: rotate(1deg);
    opacity: 0.3;
}

.legend {
    color: #ffff00;
    font-size: 0.7rem;
    margin-top: 10px;
    opacity: 0.3;
}

@media (max-width: 600px) {
    h1 { 
        font-size: 3rem; 
        text-shadow: 3px 3px 0px #ff00ff, 6px 6px 0px #00ffff;
        letter-spacing: -1px;
    }
    
    .container { 
        padding: 25px 15px; 
        border-width: 5px;
        box-shadow: 10px 10px 0px #ff00ff, -10px -10px 0px #00ffff;
        width: 95%;
    }
    
    a { 
        font-size: 1.1rem; 
        padding: 10px 20px; 
        border-width: 3px;
        box-shadow: 4px 4px 0px #00ff00;
    }

    a:hover {
        transform: translate(4px, 4px);
    }
    
    .visitor-counter {
        margin: 20px auto;
        font-size: 1.2rem;
        padding: 10px;
    }

    .links {
        justify-content: center;
    }

    .bg-text {
        font-size: 10rem;
    }


    .shape {
        display: none; /* Hide background shapes on mobile for clarity and performance */
    }

    .synth-sun {
        width: 300px;
        height: 300px;
        transform: translate(-50%, -50%);
    }

    .coin-track.top::before { background-size: 20px 100%; background-repeat: round; }
    .coin-track.right::before { background-size: 100% 20px; background-repeat: round; }
    .coin-track.bottom::before { background-size: 20px 100%; background-repeat: round; }
    .coin-track.left::before { background-size: 100% 20px; background-repeat: round; }

    .coin-track.top { top: -32px; left: -27px; right: -27px; height: 10px; }
    .coin-track.right { top: -27px; right: -32px; bottom: -27px; width: 10px; }
    .coin-track.bottom { bottom: -32px; left: -27px; right: -27px; height: 10px; }
    .coin-track.left { top: -27px; left: -32px; bottom: -27px; width: 10px; }
    .coin-track::before { 
        background-image: radial-gradient(circle at center, #ffff00 1.5px, #ffff00 2px, rgba(255, 255, 0, 0.6) 3px, transparent 4px); 
    }

    .pacman-perimeter {
        width: 20px;
        height: 20px;
    }

    .pacman-top::after {
        top: 3px;
        left: 10px;
        width: 3px;
        height: 3px;
    }

    @keyframes pacman-perimeter-move {
        0% { top: -37px; left: -37px; transform: rotate(0deg); }
        25% { top: -37px; left: calc(100% + 17px); transform: rotate(0deg); }
        25.01% { transform: rotate(90deg); }
        50% { top: calc(100% + 17px); left: calc(100% + 17px); transform: rotate(90deg); }
        50.01% { transform: rotate(180deg); }
        75% { top: calc(100% + 17px); left: -37px; transform: rotate(180deg); }
        75.01% { transform: rotate(270deg); }
        100% { top: -37px; left: -37px; transform: rotate(270deg); }
    }

}

@media (max-width: 400px) {
    h1 { 
        font-size: 2.2rem; 
    }
    
    .marquee-content {
        font-size: 0.8rem;
    }
    
    .links {
        gap: 10px;
    }
    
    .links li {
        margin: 5px;
    }
}

strong {
    color: #f0f0f0;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    z-index: 20;
    position: relative;
    margin-left: 340px;
}
