body {
    margin: 0;
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
}

.screen {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-direction: column;
}

#gameMenu {
    display: flex;
}

.game-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 800px;
    padding: 20px;
}

.game-item {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    width: 200px;
    box-shadow: 0 0 10px #0ff, 0 0 20px #0ff;
}

.game-item:hover {
    transform: translateY(-5px);
    border-color: #00f;
    box-shadow: 0 0 20px #ff0, 0 0 30px #ff0;
}

.game-item[data-game="tetris"]:hover {
    border-color: #FF0D72;
}

.menu-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    background: #1a1a1a;
    color: white;
    border: 2px solid #333;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
}

.menu-button:hover {
    border-color: #00f;
}

#gameCanvas {
    border: 2px solid #00f;
}

/* Tetris specific styles */
body.tetris #gameCanvas {
    border-color: #FF0D72;
    box-shadow: 0 0 10px #FF0D72;
}

@keyframes tetris-border {
    0% { border-color: #FF0D72; }
    20% { border-color: #0DC2FF; }
    40% { border-color: #0DFF72; }
    60% { border-color: #F538FF; }
    80% { border-color: #FF8E0D; }
    100% { border-color: #FF0D72; }
}

.game-item[data-game="tetris"] {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    position: relative;
    overflow: hidden;
}

.game-item[data-game="tetris"]:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        transparent 0%,
        rgba(255, 13, 114, 0.1) 50%,
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.game-item[data-game="tetris"]:hover:after {
    opacity: 1;
}

h1 {
    font-size: 48px;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Arcade-style enhancements */
.arcade-menu {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, #2d0057 0%, #3a0ca3 40%, #720026 100%);
    z-index: 1;
    color: #0ff;
    text-align: center;
}

.arcade-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 64px;
    color: #ff0;
    text-shadow: 0 0 10px #ff0, 0 0 20px #ff0, 0 0 30px #f80;
    margin-bottom: 20px;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #0ff;
    text-shadow: 0 0 5px #0ff, 0 0 10px #0ff;
}

.game-description {
    font-size: 14px;
    color: #ccc;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Background art styles */
.background-art {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.background-svg {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 60vh;
    opacity: 0.85;
}
.background-text {
    position: absolute;
    top: 38vh;
    left: 0; right: 0;
    text-align: center;
    width: 100vw;
}
.vn-title {
    font-family: 'Press Start 2P', cursive, Arial, sans-serif;
    font-size: 48px;
    color: #FF2D55;
    text-shadow: 0 0 10px #FF2D55, 0 0 30px #fff, 0 0 40px #FF2D55;
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 8px;
}
.vn-subtitle {
    font-family: 'Press Start 2P', cursive, Arial, sans-serif;
    font-size: 22px;
    color: #B2F0FF;
    text-shadow: 0 0 8px #B2F0FF, 0 0 20px #fff;
    letter-spacing: 1px;
    font-weight: bold;
}


/* Animated circles in SVG */
.background-svg circle {
    stroke-dasharray: 10 10;
    stroke-dashoffset: 0;
    animation: circle-dash 4s linear infinite, circle-glow 2s ease-in-out infinite alternate;
}
.background-svg circle:nth-child(2) {
    animation-delay: 1s, 0.5s;
}
.background-svg circle:nth-child(3) {
    animation-delay: 2s, 1s;
}
@keyframes circle-dash {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 60; }
}
@keyframes circle-glow {
    0% { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px currentColor); }
    100% { filter: drop-shadow(0 0 18px #fff) drop-shadow(0 0 32px currentColor); }
}

/* Responsive styles for mobile devices */
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    .arcade-title {
        font-size: 32px;
        margin-bottom: 10px;
    }
    .game-title {
        font-size: 18px;
    }
    .vn-title {
        font-size: 28px;
    }
    .vn-subtitle {
        font-size: 14px;
    }
    .game-list {
        flex-direction: column;
        gap: 12px;
        padding: 10px;
        max-width: 100vw;
    }
    .game-item {
        width: 90vw;
        min-width: unset;
        padding: 12px;
        font-size: 16px;
    }
    .background-art, .background-svg, .background-text {
        width: 100vw !important;
        height: 40vh !important;
        min-height: 0;
    }
    .menu-button {
        top: 10px;
        left: 10px;
        padding: 8px 14px;
        font-size: 14px;
    }
    #gameCanvas {
        width: auto !important;
        height: auto !important;
        max-width: 98vw !important;
        max-height: 70vh !important;
        object-fit: contain !important;
        image-rendering: pixelated;
        image-rendering: crisp-edges;
        display: block;
        margin: 0 auto;
    }
    .screen {
        min-height: 100vh;
        padding: 0;
    }
}

@media (max-width: 400px) {
    .arcade-title {
        font-size: 22px;
    }
    .game-title {
        font-size: 14px;
    }
    .game-item {
        font-size: 13px;
        padding: 8px;
    }
    .menu-button {
        font-size: 12px;
        padding: 6px 10px;
    }
}
