/* --- Base Reset & Layout --- */
body {
    background-color: #000;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- The Locked Coordinate Container --- */
.scene-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    /* REPLACE THESE PLACEHOLDERS WITH EXACT PIXEL DIMENSIONS OF bg_vertical.jpg */
    aspect-ratio: 1408 / 2504;
    background-image: url('../assets/bg_vertical.jpg');
    background-position: center;
    background-size: 100% 100%;
    
    /* Enable container queries for the input font size */
    container-type: inline-size; 
    overflow: hidden;
    transition: opacity 1.5s ease;
}

/* Triggered by JS on success */
.scene-container.fade-out {
    opacity: 0;
}

/* --- UI Elements --- */
.ui-input {
    position: absolute;
    /* ADJUST THESE % VALUES TO MATCH THE DRAWN BOX ON YOUR BACKGROUND */
    top: 13%; 
    left: 25%;
    width: 46%;
    height: 5%;
    
    background: transparent;
    /* border: 3px solid red; */
    border: transparent;
    outline: none;
    
    /* Typography */
    font-family: 'Special Elite', monospace;
    font-size: 7cqw;
    text-align: center;
    color: #2a2a2a;
}

/* Hide number input arrows for a clean look */
.ui-input::-webkit-outer-spin-button,
.ui-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ui-input[type=number] {
    -moz-appearance: textfield;
}

.ui-button {
    position: absolute;
    /* ADJUST THESE % VALUES TO MATCH THE DRAWN MECHANISM ON YOUR BACKGROUND */
    top: 20%;
    left: 35%;
    width: 27%;
    aspect-ratio: 1 / 1;
    
    background: transparent;
    border: none;
    /* border: 3px solid red; */
    cursor: pointer;
    padding: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s ease;
}

.ui-button img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures the brass button doesn't stretch weirdly */
}

.ui-button:active {
    transform: scale(0.92) translateY(2px);
}

/* --- Cinematic Overlay --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Crucial: lets clicks pass through to input/button */
    
    /* CSS generated vignette and subtle film grain */
    background: 
        radial-gradient(circle, rgba(0,0,0,0) 40%, rgba(0,0,0,0.65) 100%),
        url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.12"/%3E%3C/svg%3E');
}

/* --- Error Animation --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
