:root {
    --matrix-green: #00FF41;
    --matrix-dark: #003B00;
    --bg-black: #0D0208;
    --terminal-shadow: 0 0 12px rgba(0, 255, 65, 0.6);
}

body.event-active {
    --matrix-green: #ff0000;
    --matrix-dark: #3b0000;
    --terminal-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    color: #ff0000;
}

body {
    background-color: var(--bg-black);
    color: var(--matrix-green);
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    overflow: hidden;
    transition: color 0.5s ease;
}

.scanner {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
    background-size: 100% 4px;
    z-index: 10;
    pointer-events: none;
}

main {
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 800px;
    animation: flicker 0.15s infinite;
}

.header-info {
    align-self: flex-start;
    font-size: 0.7rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    opacity: 0.8;
}

h1 {
    font-size: 1.2rem;
    letter-spacing: 6px;
    margin: 0 0 1.5rem 0;
    text-shadow: var(--terminal-shadow);
}

#timer {
    font-size: clamp(2rem, 8vw, 5rem);
    padding: 20px 40px;
    border: 1px solid var(--matrix-green);
    background: rgba(0, 59, 0, 0.1);
    box-shadow: var(--terminal-shadow), inset 0 0 15px var(--matrix-dark);
    font-weight: bold;
    letter-spacing: 4px;
    display: inline-block;
}

body.event-active #timer {
    animation: rapid-flicker 0.1s infinite;
}

.progress-section {
    width: 100%;
    max-width: 500px;
    margin-top: 2rem;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 8px;
}

.progress-container {
    width: 100%;
    height: 15px;
    border: 1px solid var(--matrix-green);
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--matrix-green);
    box-shadow: 0 0 15px var(--matrix-green);
    transition: width 0.4s ease-out;
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 2px, transparent 2px);
    background-size: 6px 100%;
}

@keyframes flicker {
    0% {
        opacity: 0.98;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.99;
    }
}

@keyframes rapid-flicker {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.footer-info {
    margin-top: 2rem;
    font-size: 0.7rem;
    opacity: 0.6;
}