/* Audience Display Styles - Optimized for iPad Pro 11" (1194x834) */
html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0f;
}

/* Start Button - left half = real, right half = rigged (invisible to audience) */
#start-btn {
    position: relative;
    z-index: 100;
    margin-top: 5vh;
    background: #00ff41;
    border: none;
    border-radius: 15px;
    padding: 20px 80px;
    cursor: pointer;
    pointer-events: auto;
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #000;
    transition: transform 0.1s, opacity 0.2s;
}

#start-btn:active {
    transform: scale(0.98);
    opacity: 0.8;
}

#start-btn.hidden {
    display: none;
}

/* Progress bar at bottom */
.progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff41, #00ff41);
    transition: width 0.1s linear;
}

#progress-bar.rigged {
    background: linear-gradient(90deg, #ff0040, #ff6600);
}

/* LED Matrix as full background - increased brightness */
.led-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.65;
    z-index: 1;
}

#led-matrix {
    width: 100%;
    height: 100%;
}

/* Content on top of LED */
.content-layer {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

/* MAX label - shown only after measurement */
#max-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 8vw;
    font-weight: 700;
    color: #ff0040;
    text-shadow:
        0 0 20px rgba(255, 0, 64, 0.8),
        0 0 40px rgba(255, 0, 64, 0.5);
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    display: none;
}

/* dB Display - Main number */
.db-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

#db-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 42vw;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 0.85;
    min-width: 3ch;
    text-align: center;
    transition: color 0.3s, text-shadow 0.3s;
    pointer-events: auto;
    cursor: pointer;
}

/* Idle state - white */
#db-value.idle {
    color: #ffffff;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.3);
}

/* Measuring state - green */
#db-value.measuring {
    color: #00ff41;
    text-shadow:
        0 0 30px #00ff41,
        0 0 60px #00ff41,
        0 0 90px rgba(0, 255, 65, 0.6),
        0 0 120px rgba(0, 255, 65, 0.4);
}

/* Result state - red blinking */
#db-value.result {
    color: #ff0040;
    text-shadow:
        0 0 30px #ff0040,
        0 0 60px #ff0040,
        0 0 90px rgba(255, 0, 64, 0.6),
        0 0 120px rgba(255, 0, 64, 0.4);
    animation: blink 0.8s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}


/* Portrait mode - use height-based sizing */
@media (orientation: portrait) {
    #db-value {
        font-size: 30vh;
    }

    #max-label {
        font-size: 6vh;
    }

    #start-btn {
        padding: 15px 50px;
        font-size: 20px;
    }
}

/* Flash effect for final reveal */
.flash .led-background {
    animation: flash-led 0.3s ease;
}

@keyframes flash-led {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 0.9; }
}
