/* Reset for full-screen immersion */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#scanner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Force the library container to be full screen */
#interactive-reader {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* Force the actual <video> element to fill the screen */
#interactive-reader video {
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important; /* Crops the video to fill the screen */
}

/* UI Overlay Layer */
.scanner-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allows clicks to pass through to the start button */
}

/* The Scanning Square */
.scan-frame {
    width: 260px;
    height: 260px;
    position: relative;
    border-radius: 35px;
    /* The "Haze": massive shadow creates the dark overlay around the hole */
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.6); 
}

/* Purple Bracket Corners */
.corner {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 6px solid #a855f7; /* Your cool purple */
    border-radius: 15px;
}

.top-left { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.top-right { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
.bottom-left { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }
.bottom-right { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }

.scan-text {
    color: white;
    margin-top: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    padding: 0 40px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    pointer-events: auto;
}

/* The Close/Start Buttons */
#start-btn {
    pointer-events: auto;
    margin-top: 20px;
    padding: 16px 32px;
    background: #1DB954; /* Spotify Green */
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}