/* ============================================
   ARCADE CABINET - OLD INTERNET / GEOCITIES
   ============================================
   Authentic late-90s / early-2000s web aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    /* Classic web colors - bright and clashing! */
    --bg-dark: #000033;
    --bg-purple: #330066;
    --neon-lime: #00ff00;
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-yellow: #ffff00;
    --hot-red: #ff0000;
    --electric-blue: #0066ff;

    /* Classic link colors */
    --link-blue: #0000ff;
    --link-visited: #800080;

    /* 3D bevel colors */
    --bevel-light: #ffffff;
    --bevel-dark: #333366;
    --bevel-bg: #666699;

    /* Text */
    --text-light: #ffffff;
    --text-glow: #ccffcc;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100vh;
}

/* ============================================
   PAGE BASE - TILED STARFIELD BACKGROUND
   ============================================ */
.arcade-page {
    position: relative;
    min-height: 100vh;
    padding: clamp(0.5rem, 2vw, 1rem);
    background-color: var(--bg-dark);
    background-image:
        /* Stars layer */
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 160px 20px, white, transparent),
        radial-gradient(2px 2px at 200px 60px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 30px 100px, white, transparent),
        radial-gradient(2px 2px at 70px 120px, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(1px 1px at 110px 110px, white, transparent),
        radial-gradient(2px 2px at 150px 130px, rgba(255, 255, 255, 0.8), transparent),
        /* Gradient overlay */
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-purple) 100%);
    background-size: 200px 150px, 200px 150px, 200px 150px, 200px 150px, 200px 150px,
        200px 150px, 200px 150px, 200px 150px, 200px 150px, 200px 150px,
        100% 100%;
    color: var(--text-light);
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;
    overflow-x: hidden;
}

/* ============================================
   CONTAINER WITH CLASSIC TABLE BORDER
   ============================================ */
.arcade-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(180deg, #000066 0%, #000033 100%);
    border: 4px ridge #6666cc;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 255, 0.3),
        0 0 30px rgba(0, 255, 255, 0.2);
    padding: clamp(0.5rem, 2vw, 1rem);
}

/* ============================================
   RAINBOW DIVIDER - CLASSIC!
   ============================================ */
.rainbow-divider {
    height: 4px;
    background: linear-gradient(90deg,
            #ff0000 0%,
            #ff8000 14%,
            #ffff00 28%,
            #00ff00 42%,
            #00ffff 56%,
            #0000ff 70%,
            #8000ff 84%,
            #ff00ff 100%);
    margin: 0.8rem 0;
    animation: rainbow-shift 3s linear infinite;
}

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

    100% {
        filter: hue-rotate(360deg);
    }
}

/* ============================================
   MARQUEE BANNER
   ============================================ */
.marquee-container {
    overflow: hidden;
    background: var(--hot-red);
    padding: 0.3rem 0;
    border: 2px inset #cc0000;
    margin-bottom: 0.5rem;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-scroll 12s linear infinite;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.5rem, 1.5vw, 0.7rem);
    color: var(--neon-yellow);
    text-shadow: 2px 2px 0 #000;
}

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

    100% {
        transform: translateX(-100%);
    }
}

/* ============================================
   HEADER - GLOWING TITLE
   ============================================ */
.arcade-header {
    text-align: center;
    padding: 0.5rem;
}

.arcade-title {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1rem, 4vw, 1.8rem);
    color: var(--neon-lime);
    text-shadow:
        0 0 2px var(--neon-lime),
        0 0 5px rgba(0, 255, 0, 0.5),
        2px 2px 0 #003300;
    letter-spacing: 0.1em;
}

.arcade-subtitle {
    margin: 0.5rem 0 0;
    font-size: clamp(0.7rem, 2vw, 1rem);
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
    animation: color-cycle 5s linear infinite;
}

@keyframes color-cycle {
    0% {
        color: var(--neon-cyan);
        text-shadow: 0 0 8px var(--neon-cyan);
    }

    33% {
        color: var(--neon-pink);
        text-shadow: 0 0 8px var(--neon-pink);
    }

    66% {
        color: var(--neon-yellow);
        text-shadow: 0 0 8px var(--neon-yellow);
    }

    100% {
        color: var(--neon-cyan);
        text-shadow: 0 0 8px var(--neon-cyan);
    }
}

/* ============================================
   SPARKLE DECORATIONS
   ============================================ */
.sparkle {
    position: absolute;
    font-size: 1.2rem;
    animation: sparkle-twinkle 1s ease-in-out infinite;
    pointer-events: none;
}

.sparkle:nth-child(odd) {
    animation-delay: 0.3s;
    animation-duration: 0.8s;
}

.sparkle:nth-child(even) {
    animation-delay: 0.6s;
    animation-duration: 1.2s;
}

@keyframes sparkle-twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* ============================================
   GAME GRID - TABLE-LIKE LAYOUT
   ============================================ */
.game-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(0.5rem, 1.5vw, 0.8rem);
    padding: 0.5rem;
    background: rgba(0, 0, 102, 0.5);
    border: 3px groove #9999cc;
}

/* ============================================
   GAME CARD - 3D BEVELED BUTTON STYLE
   ============================================ */
.game-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: clamp(0.5rem, 1.5vw, 0.8rem);
    background: linear-gradient(180deg, #9999cc 0%, #666699 50%, #333366 100%);
    border: 3px outset #ccccff;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.1s ease;
}

/* 3D pressed effect on active */
.game-card:active {
    border-style: inset;
    transform: translate(2px, 2px);
}

/* Card icon/preview area */
.card-preview {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    margin-bottom: 0.4rem;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
    animation: icon-bounce 2s ease-in-out infinite;
}

@keyframes icon-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Card title */
.card-title {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.35rem, 1vw, 0.5rem);
    text-align: center;
    text-shadow: 1px 1px 0 #000;
    line-height: 1.4;
}

/* Status badge */
.card-status {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    padding: 0.15rem 0.35rem;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.3rem;
    border: 2px outset;
    text-transform: uppercase;
}

.status-play {
    background: var(--neon-lime);
    color: #003300;
    border-color: #00ff00;
    animation: blink-fast 0.5s step-end infinite;
}

.status-soon {
    background: #666666;
    color: #cccccc;
    border-color: #999999;
}

.status-new {
    background: var(--hot-red);
    color: white;
    border-color: #ff6666;
    animation: blink-fast 0.8s step-end infinite;
}

@keyframes blink-fast {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0.5;
    }
}

/* ============================================
   CARD VARIANTS
   ============================================ */

/* Available/Playable games */
.game-card.card-available {
    cursor: pointer;
    background: linear-gradient(180deg, #66cc66 0%, #339933 50%, #006600 100%);
    border-color: #99ff99;
}

.game-card.card-available:hover {
    background: linear-gradient(180deg, #88ff88 0%, #44cc44 50%, #008800 100%);
    box-shadow: 0 0 15px var(--neon-lime);
}

.game-card.card-available .card-title {
    color: var(--neon-lime);
}

/* Coming Soon games */
.game-card.card-coming-soon {
    cursor: not-allowed;
    background: linear-gradient(180deg, #666666 0%, #444444 50%, #222222 100%);
    border-color: #888888;
}

.game-card.card-coming-soon .card-preview {
    filter: grayscale(1) brightness(0.6);
    animation: none;
}

.game-card.card-coming-soon .card-title {
    color: #888888;
}

/* ============================================
   SCROLLING "UNDER CONSTRUCTION" FOOTER
   ============================================ */
.under-construction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    font-family: 'Comic Sans MS', cursive;
    font-size: clamp(0.8rem, 2vw, 1.1rem);
    color: var(--neon-yellow);
}

.construction-scroll {
    position: relative;
    width: min(100%, 34rem);
    overflow: hidden;
    white-space: nowrap;
}

.construction-scroll::before,
.construction-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(1.5rem, 6vw, 3.5rem);
    pointer-events: none;
    z-index: 1;
}

.construction-scroll::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg-light) 0%, rgba(255, 255, 255, 0) 100%);
}

.construction-scroll::after {
    right: 0;
    background: linear-gradient(270deg, var(--bg-light) 0%, rgba(255, 255, 255, 0) 100%);
}

.construction-track {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    width: max-content;
    animation: construction-scroll 13s linear infinite;
}

.construction-text {
    display: inline-block;
    letter-spacing: 0.06em;
    text-shadow: 0 0 6px rgba(255, 255, 102, 0.85);
}

@keyframes construction-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 1rem));
    }
}

.construction-emoji {
    flex-shrink: 0;
    font-size: 1.35em;
    animation: emoji-shake 0.5s ease-in-out infinite;
}

@keyframes emoji-shake {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* ============================================
   ARCADE LEADERBOARD
   ============================================ */
.arcade-leaderboard {
    padding: 0.8rem;
    background: rgba(0, 0, 80, 0.5);
    border: 3px groove #9999cc;
}

.leaderboard-title {
    margin: 0 0 0.6rem;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.6rem, 1.7vw, 0.8rem);
    color: var(--neon-yellow);
    text-shadow: 1px 1px 0 #000;
}

.arcade-top-scores {
    margin: 0;
    padding-left: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: clamp(0.7rem, 2vw, 0.85rem);
    color: #ffffff;
}

.arcade-top-scores li {
    margin: 0.25rem 0;
}

.leaderboard-status {
    margin: 0.6rem 0 0;
    font-size: 0.68rem;
    color: #cccccc;
}

/* ============================================
   HIT COUNTER (FAKE BUT FUN)
   ============================================ */
.hit-counter {
    text-align: center;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: #aaaaaa;
}

.counter-display {
    display: inline-block;
    background: #000;
    color: var(--neon-lime);
    padding: 0.2rem 0.5rem;
    border: 2px inset #333;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
}

/* ============================================
   BACK NAVIGATION - CLASSIC LINK STYLE
   ============================================ */
.arcade-back {
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.8rem;
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.4rem, 1vw, 0.5rem);
    color: var(--neon-cyan);
    text-decoration: underline;
    background: transparent;
    border: 2px outset #6699cc;
}

.arcade-back:hover {
    color: var(--neon-yellow);
    background: #003366;
}

.arcade-back:visited {
    color: var(--link-visited);
}

.arcade-back::before {
    content: '<<< ';
}

.arcade-back:focus-visible {
    outline: 2px dashed var(--neon-yellow);
    outline-offset: 2px;
}

/* ============================================
   GUESTBOOK LINK (EASTER EGG VIBES)
   ============================================ */
.footer-links {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.7rem;
}

.footer-links a {
    color: var(--link-blue);
    margin: 0 0.5rem;
}

.footer-links a:hover {
    color: var(--hot-red);
}

.footer-links a:visited {
    color: var(--link-visited);
}

/* ============================================
   WEBRINGS STYLE NAVIGATION
   ============================================ */
.webring {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #000;
    border: 2px groove #666;
    font-family: 'Arial', sans-serif;
    font-size: 0.6rem;
}

.webring a {
    color: var(--neon-cyan);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--neon-cyan);
}

.webring a:hover {
    background: var(--neon-cyan);
    color: #000;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 820px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .arcade-title {
        font-size: clamp(0.8rem, 5vw, 1.2rem);
    }

    .marquee-text {
        font-size: 0.5rem;
    }
}

@media (max-width: 400px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@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;
    }
}

/* ============================================
   SKIP LINK (ACCESSIBILITY)
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: 0.5rem 1rem;
    background: var(--neon-yellow);
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    text-decoration: none;
}

.skip-link:focus-visible {
    top: 1rem;
}

/* ============================================
   ANIMATED GIF VIBE - CSS ONLY
   ============================================ */
.animated-star {
    display: inline-block;
    animation: star-spin 2s linear infinite;
}

@keyframes star-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(90deg) scale(1.2);
    }

    50% {
        transform: rotate(180deg) scale(1);
    }

    75% {
        transform: rotate(270deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}
