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

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

body {
    background: linear-gradient(180deg, #1a2f5a 0%, #0d1829 50%, #1a2f5a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace;
    position: relative;
    overflow: hidden;
}

/* Decorative stripes */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: repeating-linear-gradient(90deg,
            #2a4a7c 0px,
            #2a4a7c 2px,
            transparent 2px,
            transparent 4px);
    border-bottom: 4px solid #0d1829;
    z-index: 1;
}

body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: repeating-linear-gradient(90deg,
            #2a4a7c 0px,
            #2a4a7c 2px,
            transparent 2px,
            transparent 4px);
    border-top: 4px solid #0d1829;
    z-index: 1;
}

/* Sbrokemon silhouettes in background */
.sbrokemon-bg {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(13, 24, 41, 0.6);
    border: 3px solid rgba(42, 74, 124, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.sbrokemon-bg::before {
    content: '';
    position: absolute;
    width: 60%;
    height: 60%;
    background: rgba(42, 74, 124, 0.4);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

    50% {
        transform: translateY(-10px) rotate(180deg);
    }
}

/* Sbrokeball decorations - psychedelic abstract spheres */
.sbrokeball-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #FF00FF, #00FFFF, #FFFF00);
    border: 3px solid #000;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        filter: hue-rotate(0deg);
    }

    50% {
        transform: scale(1.1);
        filter: hue-rotate(60deg);
    }
}

.sbrokeball-decoration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70%;
    height: 70%;
    background: conic-gradient(from 0deg, #FF00FF, #00FFFF, #FFFF00, #FF00FF);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    transform: translate(-50%, -50%);
    animation: spin 4s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.sbrokeball-decoration::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, #fff, #000);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Game Title */
.game-title {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
    text-shadow:
        0 0 10px rgba(255, 0, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 0, 0.4),
        4px 4px 0px #000;
}

.title-main {
    font-size: 32px;
    font-family: 'Press Start 2P', monospace;
    color: #fff;
    letter-spacing: 4px;
    margin-bottom: 10px;
    animation: titleGlow 2s ease-in-out infinite;
}

.title-sub {
    font-size: 12px;
    font-family: 'Press Start 2P', monospace;
    color: #00FFFF;
    letter-spacing: 2px;
    text-shadow:
        0 0 5px rgba(0, 255, 255, 0.8),
        2px 2px 0px #000;
}

@keyframes titleGlow {

    0%,
    100% {
        filter: brightness(1) hue-rotate(0deg);
    }

    50% {
        filter: brightness(1.2) hue-rotate(30deg);
    }
}

#game-container {
    position: relative;
    z-index: 10;
    background: #1a2f5a;
    padding: 20px;
    border-radius: 12px;
    box-shadow:
        0 0 0 4px #2a4a7c,
        0 0 0 8px #0d1829,
        0 20px 40px rgba(0, 0, 0, 0.8);
}

#game-canvas {
    display: block;
    /* Scale up by 3x for visibility on modern screens */
    width: 720px;
    height: 480px;
    image-rendering: pixelated;
    /* Essential for pixel art */
}