/*lets do css its been too long*/
:root{
    --background-color: #050505;
    --screen-bg: #111;
    --bezel: #222;
    --primary: #00ff41;
    --secondary: #ff00de;
    --text-color: #ccffcc;
    --scanline: rgba(18,16,16,0.5);
    --font-family: 'Courier New', Courier, monospace;
}
*{
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
}
body, html{
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#arcade-cabinet{
    position: relative;
    background: var(--bezel);
    width: 100%;
    height: 100%;
    max-width: 1000px;
    max-height: 90vh;
    border: 4px solid #444;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px #111, 0 0 50px rgba(0, 0, 0, 0.8) inset 0 0 20px rgba(0, 0, 0, 0.5);
}
/*making this will bring back so much memories of my childhood */
#crt-monitor{
    background-color: var(--screen-bg);
    border: 2px solid #333;
    border-radius: 100px /20px;
    flex: 1;
    position: relative;
    overflow: hidden;
    animation: flicker 0.01s infinite;
    overflow: hidden;
}
#crt-monitor::before{
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}
#crt-monitor::after{
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 10;
    pointer-events: none;
}
canvas{
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    filter: contrast(1.2) brightness(1.1) saturate(1.2);
}
.ui-layer{
    background: rgba(0, 0, 0, 0.84);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    justify-content: center;
    text-align: center;/*only 5 centers in a row??*/
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ui-layer.active{
    opacity: 1;
    pointer-events: all;
}
h1{
    font-size: 4rem;
    margin: 0 0 20px 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 5px;
    animation: neonPulse 1.5s infinite;
}
h2{
    font-size: 2rem;
    color: #fff;
    margin-bottom: 30px;
}
.btn{
    background: transparent;
    color: var(--primary);
    font-size: 1.5rem;
    font-family: var(--font-family);
    cursor: pointer;
    border: 2px solid var(--primary);
    padding: 15px 40px;
    margin: 10px;
    transition: all 0.2s;
    text-transform: uppercase;
}
.btn:hover{
    background: var(--primary);
    color: #000;
    transform: scale(1.05);
}
.stats-hud{
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 15;
    font-size: 1.2rem;
    pointer-events: none;
}
.stat-box{
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border: 1px solid var(--text-color);
    border-radius: 4px;
}
/*little moe*/
.virtual-controls{
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px 40px;
    background: #1a1a1a;
    border-top: 4px solid #333;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}
.d-pad{
    position: relative;
    width: 140px;
    height: 140px;
}
.d-btn{
    position: absolute;
    width: 45px;
    height: 45px;
    color: #888;
    background: #333;
    border: 2px solid #555;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform 0.1s;
}
.d-btn:active{
    transform: translateY(4px);
    background: #444;
}
.d-up{
    top: 0;
    left: 47.48px;
}
.d-down{
    bottom: 0;
    left: 47.48px;
}
.d-left{
    top: 47.5px;
    left: 0;
}
.d-right{
    top: 47.5px;
    right: 0;
}
.action-buttons{
    display: flex;
    gap: 20px;
}
.action-btn{
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #444;/*lol declared border radius before border isnt that funny*/
    cursor: pointer;
    transition: transform 0.1s;
}
.action-btn:active{
    transform: translateY(5px);
}
.btn-a{
    background: #ff0044;
}
.btn-b{
    background: #0088ff;
}
.label{
    color: #666;
    font-size: 0.77rem;
    margin-top: 5px;
    text-align: center;
}
/*lets do the coolest part, animation*/
@keyframes neonPulse {
    0%, 100% { text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary); }
    50% { text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary); }
}
@keyframes flicker{
    0%{
        opacity: 0.97;
    }
    5%{
        opacity: 0.99;
    }
    10%{
        opacity: 0.94;
    }
    15%, 100%{
        opacity: 0.98;
    }
    20%{
        opacity: 0.96;
    }
}
@media(max-width: 768px){
    #arcade-cabinet{
        height: 100vh;
        max-height: none;
        border-radius: 0;
        border: none;
        padding: 0;
    }
    .virtual-controls{
        height: 160px;
        padding: 10px 20px;
    }
    h1{
        font-size: 2.5rem;
    }
    canvas{
        border-radius: 0;
    }
    #crt-monitor{
        border: none;
        border-radius: 0;
    }
}
.hidden{
    display: none !important;
}
.powerup-indicator{
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
}
.p-icon{
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--text-color);
    opacity: 0.5;
}
.p-icon.active{
    opacity: 1;
    animation: pulse 0.5s infinite;
}