/* ============================================
   CAPY ARCADE — Landing Page
   ============================================ */

/* ---- Base ---- */
body {
    font-family: 'Nunito', var(--font-main);
    background: #0D0D1F;
    color: #E0E0E0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   BACKGROUND: STARS + SCANLINES
   ============================================ */
.stars-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.04) 3px,
        rgba(0, 0, 0, 0.04) 4px
    );
}

/* ============================================
   HEADER
   ============================================ */
.arcade-header {
    position: relative;
    z-index: 10;
    padding-top: 48px;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 20px 24px;
    position: relative;
}

/* Title row */
.arcade-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    animation: titleDrop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes titleDrop {
    from { transform: translateY(-40px) scale(0.85); opacity: 0; }
    to   { transform: translateY(0) scale(1);        opacity: 1; }
}

.capy-deco {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    animation: decoFloat 3s ease-in-out infinite;
    display: inline-block;
}

.capy-deco:last-child { animation-delay: 1.5s; }

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

.arcade-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(3rem, 9vw, 6.5rem);
    color: #FF8C42;
    letter-spacing: 4px;
    line-height: 1;
    text-shadow:
        0 0 12px rgba(255, 140, 66, 0.8),
        0 0 28px rgba(255, 140, 66, 0.5),
        0 0 60px rgba(255, 96, 16, 0.3),
        4px 4px 0 #7A3000;
    animation: titleGlow 2.5s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow:
            0 0 10px rgba(255, 140, 66, 0.7),
            0 0 24px rgba(255, 140, 66, 0.4),
            0 0 50px rgba(255, 96, 16, 0.25),
            4px 4px 0 #7A3000;
    }
    to {
        text-shadow:
            0 0 18px rgba(255, 180, 80, 0.9),
            0 0 40px rgba(255, 140, 66, 0.6),
            0 0 80px rgba(255, 96, 16, 0.4),
            4px 4px 0 #7A3000;
    }
}

/* Subtitle */
.arcade-sub {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(0.7rem, 1.6vw, 1rem);
    color: #FFD080;
    letter-spacing: 3px;
    opacity: 0.85;
    animation: fadeInUp 0.6s 0.4s ease-out both;
}

@keyframes fadeInUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Oranges counter badge */
.credits-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255, 140, 66, 0.15);
    border: 1px solid rgba(255, 140, 66, 0.4);
    border-radius: 24px;
    animation: fadeInUp 0.6s 0.6s ease-out both;
    cursor: default;
}

.credits-icon { font-size: 1.1rem; }

.credits-count {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1rem;
    color: #FF8C42;
}

.credits-label {
    font-family: 'Fredoka One', cursive;
    font-size: 0.7rem;
    color: #FFD080;
    letter-spacing: 2px;
}

/* ---- Marquee ---- */
.marquee-bar {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 140, 66, 0.12);
    border-top: 1px solid rgba(255, 140, 66, 0.25);
    border-bottom: 1px solid rgba(255, 140, 66, 0.25);
    padding: 8px 0;
    animation: fadeInUp 0.5s 0.7s ease-out both;
}

.marquee-track {
    display: inline-flex;
    white-space: nowrap;
    animation: marqueeScroll 28s linear infinite;
}

.marquee-track span {
    font-family: 'Fredoka One', cursive;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: #FFB060;
    padding-right: 40px;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================
   GAME LOBBY
   ============================================ */
.game-lobby {
    position: relative;
    z-index: 10;
    padding: 48px 20px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.select-label {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #FF8C42;
    letter-spacing: 5px;
    text-align: center;
    margin-bottom: 36px;
    opacity: 0.9;
    animation: fadeInUp 0.5s 0.8s ease-out both;
}

/* ---- Game Grid ---- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* ---- Game Card ---- */
.game-card {
    --accent: #FF8C42;
    --accent-glow: rgba(255, 140, 66, 0.4);

    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 220px;
    background: #16162E;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #E0E0E0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: cardIn 0.5s ease-out both;
    position: relative;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 24px var(--accent-glow),
        0 0 48px var(--accent-glow);
    border-color: var(--accent);
}

.game-card:active {
    transform: translateY(-2px) scale(1.00);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Stagger card animations */
.game-card:nth-child(1)  { animation-delay: 0.10s; }
.game-card:nth-child(2)  { animation-delay: 0.15s; }
.game-card:nth-child(3)  { animation-delay: 0.20s; }
.game-card:nth-child(4)  { animation-delay: 0.25s; }
.game-card:nth-child(5)  { animation-delay: 0.30s; }
.game-card:nth-child(6)  { animation-delay: 0.35s; }
.game-card:nth-child(7)  { animation-delay: 0.40s; }
.game-card:nth-child(8)  { animation-delay: 0.45s; }
.game-card:nth-child(9)  { animation-delay: 0.50s; }
.game-card:nth-child(10) { animation-delay: 0.55s; }

/* Colored top bar */
.card-top-bar {
    width: 100%;
    height: 5px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    flex-shrink: 0;
}

/* Card body */
.card-icon {
    font-size: 3rem;
    margin: 24px 0 10px;
    line-height: 1;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.game-card:hover .card-icon {
    transform: scale(1.15) rotate(-5deg);
}

.card-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 0 12px;
}

.card-tag {
    font-family: 'Nunito', sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.5px;
    text-align: center;
    margin-top: 4px;
    padding: 0 12px;
}

.card-play {
    margin: 18px 0 20px;
    padding: 8px 24px;
    background: var(--accent);
    border-radius: 24px;
    font-family: 'Fredoka One', cursive;
    font-size: 0.85rem;
    color: white;
    letter-spacing: 2px;
    box-shadow: 0 4px 12px var(--accent-glow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.game-card:hover .card-play {
    box-shadow: 0 6px 20px var(--accent-glow), 0 0 24px var(--accent-glow);
    transform: scale(1.05);
}

/* ============================================
   FOOTER
   ============================================ */
.arcade-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.arcade-footer p {
    font-family: 'Fredoka One', cursive;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 2px;
}

/* ============================================
   BUTTON COLORS (kept for backwards compat)
   ============================================ */
.btn-blue   { background: linear-gradient(135deg, #5BA8DD, #3A88C8); }
.btn-teal   { background: linear-gradient(135deg, #4ABFB5, #2FA09A); }
.btn-coral  { background: linear-gradient(135deg, #FF8C5A, #E06A30); }
.btn-purple { background: linear-gradient(135deg, #A088D4, #7A60C0); }
.btn-pink   { background: linear-gradient(135deg, #E8827C, #C85F60); }
.btn-green  { background: linear-gradient(135deg, #5DBB63, #3A9A40); }
.btn-yellow { background: linear-gradient(135deg, #F5C842, #E0A820); }
.btn-orange { background: linear-gradient(135deg, #FF8C42, #E06820); }
.btn-indigo { background: linear-gradient(135deg, #6070C8, #4050A8); }
.btn-lime   { background: linear-gradient(135deg, #8BC34A, #689F38); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .arcade-header { padding-top: 32px; }

    .arcade-title-wrap { gap: 10px; }

    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .game-card { max-width: 100%; }

    .card-icon { font-size: 2.2rem; margin: 16px 0 8px; }

    .card-name { font-size: 0.9rem; }

    .card-play { margin: 12px 0 14px; padding: 6px 18px; }
}

@media (max-width: 360px) {
    .game-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .card-tag  { display: none; }
}
