:root {
    --neon-pink: #ff00ff;
    --neon-green: #39ff14;
    --neon-cyan: #00ffff;
    --neon-yellow: #ffff00;
    --hot-red: #ff0033;
    --star-bg: #0a0020;
    --link-blue: #3399ff;
    --visited-purple: #cc66ff;
}

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

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(20%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes blink {
    0%, 49% {
        visibility: visible;
    }
    50%, 100% {
        visibility: hidden;
    }
}

@keyframes rainbow {
    0% {
        color: #ff0000;
    }
    16% {
        color: #ff8800;
    }
    33% {
        color: #ffff00;
    }
    50% {
        color: #00ff00;
    }
    66% {
        color: #0088ff;
    }
    83% {
        color: #8800ff;
    }
    100% {
        color: #ff0000;
    }
}

@keyframes fire {
    0% {
        text-shadow: 0 0 4px #fff, 0 -5px 4px #ff3, 2px -10px 6px #fd3, -2px -15px 11px #f80, 2px -25px 18px #f20;
    }
    25% {
        text-shadow: 0 0 4px #fff, 2px -7px 4px #ff3, -2px -12px 6px #fd3, 2px -17px 11px #f80, -2px -27px 18px #f20;
    }
    50% {
        text-shadow: 0 0 4px #fff, -2px -5px 4px #ff3, 2px -10px 6px #fd3, -2px -15px 11px #f80, 2px -25px 18px #f20;
    }
    75% {
        text-shadow: 0 0 4px #fff, 2px -7px 4px #ff3, 2px -12px 6px #fd3, -2px -18px 11px #f80, 2px -28px 18px #f20;
    }
    100% {
        text-shadow: 0 0 4px #fff, 0 -5px 4px #ff3, 2px -10px 6px #fd3, -2px -15px 11px #f80, 2px -25px 18px #f20;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

body {
    background-color: var(--star-bg);
    color: var(--neon-cyan);
    font-family: 'VT323', monospace;
    font-size: 1.15rem;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

.starfield {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
}

.page-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.marquee-bar {
    background: linear-gradient(90deg, #000080, #0000aa, #000080);
    border: 3px ridge var(--neon-yellow);
    padding: 0.4rem 0;
    overflow: hidden;
    margin-bottom: 1rem;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    color: var(--neon-yellow);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.title-area {
    text-align: center;
    padding: 1.5rem 0;
    border-bottom: 3px double var(--neon-pink);
    margin-bottom: 1rem;
}

.title-fire {
    font-family: 'Bungee Shade', sans-serif;
    font-size: clamp(1.5rem, 6vw, 3rem);
    color: #fff;
    animation: fire 2.5s ease-in-out infinite;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--neon-green);
    font-size: 1.2rem;
    animation: rainbow 4s linear infinite;
}

.visitor-counter {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
}

.counter-label {
    color: var(--neon-green);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.counter-digits {
    display: inline-flex;
    gap: 2px;
    background: #111;
    padding: 4px 8px;
    border: 2px inset #666;
}

.counter-digit {
    background: #001a00;
    color: var(--neon-green);
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    padding: 2px 6px;
    border: 1px solid #003300;
    min-width: 1.4em;
    text-align: center;
}

hr.fancy {
    border: none;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan), var(--neon-green), var(--neon-yellow), var(--neon-pink));
    margin: 1.5rem 0;
    animation: rainbow-bg 3s linear infinite;
}

@keyframes rainbow-bg {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

.section-header {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    color: var(--neon-yellow);
    text-align: center;
    margin: 1.5rem 0 1rem;
    text-shadow: 2px 2px 0 var(--hot-red);
}

.section-header .deco {
    animation: spin 3s linear infinite;
    display: inline-block;
}

.welcome-text {
    background: #000033;
    border: 3px ridge var(--neon-cyan);
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    font-size: 1.1rem;
}

.welcome-text p {
    margin-bottom: 0.5rem;
}

.projects-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 3px ridge silver;
    margin: 1rem 0;
    background: #000033;
}

.projects-table th {
    background: linear-gradient(180deg, #000080, #000050);
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    padding: 0.6rem;
    border: 1px solid #0000aa;
    text-align: left;
}

.projects-table td {
    padding: 0.6rem;
    border: 1px solid #333366;
    vertical-align: top;
}

.projects-table tr:hover td {
    background: #000055;
}

.projects-table a {
    color: var(--link-blue);
    text-decoration: underline;
    font-size: 1.1rem;
}

.projects-table a:hover {
    color: var(--neon-yellow);
}

.projects-table a:visited {
    color: var(--visited-purple);
}

.project-desc {
    color: #aaaacc;
    font-size: 0.95rem;
}

.new-badge {
    display: inline-block;
    background: var(--hot-red);
    color: white;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.45rem;
    padding: 2px 5px;
    animation: blink 0.8s step-end infinite;
    vertical-align: middle;
    margin-left: 4px;
}

.cool-badge {
    display: inline-block;
    color: var(--neon-green);
    font-size: 0.9rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.latest-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

@media (max-width: 500px) {
    .latest-section {
        grid-template-columns: 1fr;
    }
}

.latest-card {
    background: #000033;
    border: 3px ridge var(--neon-pink);
    padding: 0.8rem;
    text-align: center;
}

.latest-card h3 {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.55rem;
    color: var(--neon-pink);
    margin-bottom: 0.5rem;
}

.latest-card a {
    color: var(--link-blue);
    text-decoration: underline;
    font-size: 1.1rem;
    display: block;
    margin: 0.3rem 0;
}

.latest-card a:hover {
    color: var(--neon-yellow);
}

.latest-card .type-label {
    color: #888;
    font-size: 0.8rem;
}

.download-arrow {
    display: inline-block;
    animation: float 1.5s ease-in-out infinite;
}

.friends-zone {
    margin: 1.5rem 0;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 2fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.friend-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #110033;
    border: 2px ridge var(--neon-cyan);
    padding: 0.6rem;
    text-decoration: none;
    color: var(--neon-cyan);
    aspect-ratio: 1;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.friend-link:hover {
    background: #220055;
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    transform: scale(1.05);
}

.friend-link .placeholder-img {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #333, #555);
    border: 1px solid #666;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.friend-link .friend-name {
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
}

.guestbook-prompt {
    text-align: center;
    margin: 1rem 0;
    padding: 0.6rem;
    border: 2px dashed var(--neon-pink);
    font-size: 1rem;
}

.guestbook-prompt a {
    color: var(--neon-pink);
}

.email-link {
    animation: rainbow 3s linear infinite;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 1rem 0;
    border-top: 3px double var(--neon-pink);
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.85rem;
}

footer .made-with {
    color: var(--neon-green);
    margin-bottom: 0.3rem;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--neon-yellow);
    color: #000;
    padding: 0.5rem 1rem;
    z-index: 100;
    font-weight: bold;
}

.skip-link:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-text {
        animation: none;
        transform: none;
    }
}
