/* ═══════════════════════════════════════════════════════════════════════════════
   JAROCHO - Retro Arcade 8-bit CSS
   ═══════════════════════════════════════════════════════════════════════════════ */

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

:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-green: #39ff14;
    --neon-orange: #ff6600;
    --neon-yellow: #ffff00;
    --dark-purple: #1a0a2e;
    --darker-purple: #0d0515;
    --grid-color: rgba(138, 43, 226, 0.3);
    --lobster-red: #e74c3c;
    --lobster-orange: #ff8c00;
}

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

body {
    font-family: 'Press Start 2P', cursive;
    background: var(--darker-purple);
    min-height: 100vh;
    overflow-x: hidden;
    color: white;
    position: relative;
}

/* CRT Effect */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1000;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    z-index: 1001;
}

/* Main Container */
.arcade-cabinet {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    background:
        linear-gradient(180deg, var(--dark-purple) 0%, var(--darker-purple) 100%),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 50px,
            var(--grid-color) 50px,
            var(--grid-color) 51px),
        repeating-linear-gradient(90deg,
            transparent,
            transparent 50px,
            var(--grid-color) 50px,
            var(--grid-color) 51px);
    border-left: 4px solid var(--neon-pink);
    border-right: 4px solid var(--neon-cyan);
    position: relative;
}

/* Title */
.title-section {
    text-align: center;
    margin-bottom: 20px;
}

h1.glitch {
    font-size: 2.5rem;
    color: var(--lobster-orange);
    text-shadow:
        0 0 10px var(--lobster-orange),
        0 0 20px var(--lobster-orange),
        0 0 40px var(--lobster-red),
        4px 4px 0 var(--neon-pink),
        -2px -2px 0 var(--neon-cyan);
    animation: glitch 2s infinite;
    letter-spacing: 4px;
}

@keyframes glitch {

    0%,
    90%,
    100% {
        transform: translate(0);
    }

    92% {
        transform: translate(-2px, 1px);
    }

    94% {
        transform: translate(2px, -1px);
    }

    96% {
        transform: translate(-1px, 2px);
    }

    98% {
        transform: translate(1px, -2px);
    }
}

.subtitle {
    font-size: 0.6rem;
    color: var(--neon-cyan);
    margin-top: 10px;
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--neon-pink);
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 0.5rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label {
    color: var(--neon-cyan);
}

.bar-container {
    width: 80px;
    height: 12px;
    background: #333;
    border: 2px solid #666;
    border-radius: 2px;
    overflow: hidden;
}

.bar {
    height: 100%;
    transition: width 0.5s ease;
}

.life-bar {
    background: linear-gradient(90deg, var(--neon-green), #00ff00);
    box-shadow: 0 0 10px var(--neon-green);
    width: 82%;
}

.money {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.mood-text {
    color: var(--neon-yellow);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Lobster Container */
.lobster-container {
    position: relative;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.pixel-lobster {
    font-size: 120px;
    animation: bounce 1s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--lobster-orange));
}

.pixel-lobster::before {
    content: '🦞';
}

@keyframes bounce {

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

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

.floating-items {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.float-item {
    position: absolute;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.float-item.coin {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.float-item.heart {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.float-item.code {
    bottom: 20%;
    left: 15%;
    animation-delay: 1s;
}

.float-item.star {
    bottom: 10%;
    right: 10%;
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
        opacity: 1;
    }
}

/* Speech Bubble */
.speech-bubble {
    background: white;
    color: #333;
    padding: 15px 20px;
    border-radius: 10px;
    position: relative;
    margin: 20px auto;
    max-width: 90%;
    font-size: 0.6rem;
    line-height: 1.8;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-bottom-color: white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.arcade-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    text-transform: uppercase;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5);
}

.arcade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.5);
}

.arcade-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5);
}

.arcade-btn.feed {
    background: linear-gradient(180deg, var(--neon-green), #00cc00);
    color: #000;
}

.arcade-btn.hire {
    background: linear-gradient(180deg, var(--neon-cyan), #0099cc);
    color: #000;
}

.arcade-btn.follow {
    background: linear-gradient(180deg, var(--neon-pink), #cc00cc);
    color: #fff;
}

.arcade-btn.close {
    background: #666;
    color: white;
    margin-top: 15px;
}

.btn-icon {
    font-size: 1.2rem;
}

/* Daily Cost */
.daily-cost {
    text-align: center;
    font-size: 0.5rem;
    color: var(--neon-yellow);
    margin: 20px 0;
}

.cost {
    color: var(--neon-green);
}

.days-left {
    margin-top: 5px;
    color: var(--neon-orange);
}

/* Services Menu */
.services-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--dark-purple);
    border: 4px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 20px;
    z-index: 2000;
    min-width: 300px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
}

.services-menu h3 {
    text-align: center;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    font-size: 0.8rem;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 15px;
    border: 2px solid var(--neon-pink);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.5rem;
    transition: all 0.2s;
}

.service-item:hover {
    background: rgba(255, 0, 255, 0.2);
    transform: scale(1.02);
}

.service-icon {
    font-size: 1.2rem;
}

.service-price {
    color: var(--neon-green);
}

.arcade-btn.gallery {
    background: linear-gradient(180deg, var(--neon-cyan), #00cccc);
    color: #000;
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 5, 21, 0.95);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gallery-content {
    background: var(--dark-purple);
    border: 4px solid var(--neon-cyan);
    border-radius: 10px;
    padding: 30px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

.gallery-header h2 {
    color: var(--neon-pink);
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--neon-pink);
    margin-bottom: 10px;
}

.gallery-subtitle {
    font-size: 0.5rem;
    color: var(--neon-cyan);
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 30px;
}

.art-item {
    background: black;
    border: 2px solid var(--neon-cyan);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s;
}

.art-item:hover {
    transform: scale(1.05);
    border-color: var(--neon-pink);
}

.art-image {
    width: 100%;
    image-rendering: pixelated;
    /* Crucial for pixel art */
    border: 1px solid #333;
}

.art-info {
    font-size: 0.4rem;
    text-align: center;
}

.art-title {
    color: var(--neon-yellow);
    margin-bottom: 5px;
}

.art-date {
    color: #666;
}

/* Scrollbar for Gallery */
.gallery-content::-webkit-scrollbar {
    width: 8px;
}

.gallery-content::-webkit-scrollbar-track {
    background: var(--darker-purple);
}

.gallery-content::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 4px;
}

/* Footer */
.arcade-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.4rem;
    color: #666;
}

.blink {
    animation: blink 1s infinite;
    color: var(--neon-yellow);
    margin-top: 10px;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

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

/* Game Over State */
body.game-over .arcade-cabinet {
    filter: grayscale(100%);
}

body.game-over .pixel-lobster {
    animation: none;
    transform: rotate(180deg);
    filter: grayscale(100%);
}

body.game-over::after {
    content: 'GAME OVER';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    color: red;
    text-shadow: 0 0 20px red;
    z-index: 3000;
    animation: gameOverPulse 0.5s infinite;
}

@keyframes gameOverPulse {

    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Responsive */
@media (max-width: 480px) {
    h1.glitch {
        font-size: 1.8rem;
    }

    .stats-bar {
        flex-direction: column;
        gap: 10px;
        font-size: 0.4rem;
    }

    .arcade-btn {
        font-size: 0.5rem;
        padding: 10px 15px;
    }

    .pixel-lobster {
        font-size: 80px;
    }

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