/* View: arcade-everett — Page-specific styles */

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

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

body {
    background: #000;
    color: #00ff00;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    overflow-x: hidden;
}

/* Animated starfield background */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#mainDiv {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Arcade machine frame */
.arcade-frame {
    background: linear-gradient(145deg, #1a0033, #330066);
    border: 8px solid #ff00ff;
    border-radius: 20px;
    box-shadow:
        0 0 20px #ff00ff,
        0 0 40px #ff00ff,
        inset 0 0 20px rgba(255, 0, 255, 0.3);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    position: relative;
    margin: 20px auto 90px; /* bottom clears the fixed INSERT COIN bar */
}

/* Title with neon glow */
.arcade-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #ffff00;
    text-shadow:
        0 0 10px #ffff00,
        0 0 20px #ffff00,
        0 0 30px #ffff00,
        0 0 40px #ff00ff;
    animation: pulse 2s ease-in-out infinite;
    letter-spacing: 3px;
}

@keyframes pulse {
    0%, 100% {
        text-shadow:
            0 0 10px #ffff00,
            0 0 20px #ffff00,
            0 0 30px #ffff00,
            0 0 40px #ff00ff;
    }
    50% {
        text-shadow:
            0 0 20px #ffff00,
            0 0 30px #ffff00,
            0 0 40px #ffff00,
            0 0 60px #ff00ff,
            0 0 80px #ff00ff;
    }
}

.arcade-subtitle {
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 40px;
    color: #00ffff;
    letter-spacing: 2px;
}

/* Game grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Individual game card */
.game-card {
    background: linear-gradient(145deg, #000033, #001a4d);
    border: 4px solid #00ff00;
    border-radius: 10px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.game-card-img {
    display: block;
    width: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.game-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 0, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.game-card:hover {
    transform: scale(1.05) translateY(-5px);
    border-color: #ffff00;
    box-shadow:
        0 0 20px rgba(255, 255, 0, 0.8),
        0 0 30px rgba(255, 0, 255, 0.5);
    background: linear-gradient(145deg, #001a4d, #003366);
}

.game-card:active {
    transform: scale(0.98);
}

.game-name {
    font-size: 1rem;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
    text-transform: uppercase;
    word-wrap: break-word;
    position: relative;
    z-index: 1;
    padding: 14px 12px;
}

.game-card:hover .game-name {
    color: #ffff00;
    text-shadow: 0 0 10px #ffff00;
}

/* Loading state */
.loading {
    text-align: center;
    font-size: 1.5rem;
    color: #00ffff;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.3; }
}

/* Insert coin message */
.insert-coin {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: #ff00ff;
    text-shadow: 0 0 10px #ff00ff;
    animation: blink 1.5s infinite;
    z-index: 1000;
}

/* Scanlines effect */
.arcade-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0.3;
}

/* Error state */
.error-message {
    text-align: center;
    color: #ff0000;
    font-size: 1rem;
    padding: 20px;
    border: 2px solid #ff0000;
    border-radius: 10px;
    background: rgba(255, 0, 0, 0.1);
}

/* Hide home link */
#homeLink {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .arcade-title {
        font-size: 1.5rem;
    }

    .arcade-subtitle {
        font-size: 0.6rem;
    }

    .arcade-frame {
        padding: 20px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-name {
        font-size: 1rem;
    }

    .insert-coin {
        font-size: 0.8rem;
    }
}
