body {
    background-color: #000;
    color: #555;
    font-family: 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    overflow: hidden; /* Hide scrollbars until experience starts */
    transition: background-color 0.5s;
}

#app-container {
    max-width: 600px;
    padding: 2em;
    border: 1px solid #222;
    background-color: #0a0a0a;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.1);
}

h1, label {
    font-family: 'Creepster', cursive;
    color: #a00;
    letter-spacing: 2px;
}

h1 {
    font-size: 3em;
    margin-bottom: 0;
}

p {
    line-height: 1.6;
}

#controls {
    margin-top: 2em;
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

select, button {
    background-color: #111;
    border: 1px solid #a00;
    color: #eee;
    padding: 10px 15px;
    font-size: 1em;
    cursor: pointer;
    font-family: 'Helvetica Neue', sans-serif;
    transition: all 0.2s;
}

select:hover, button:hover {
    background-color: #a00;
    color: #fff;
}

#start-btn {
    font-family: 'Creepster', cursive;
    font-size: 1.5em;
    margin-top: 1em;
    letter-spacing: 1px;
    width: 80%;
}

.hidden {
    display: none !important;
}

#main-content {
    margin-top: 2em;
    border: 1px dashed #333;
    padding: 2em;
    min-height: 200px;
    transition: filter 0.2s;
}

.interaction-prompt {
    font-style: italic;
    color: #444;
}

#countdown-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 1.5em;
    color: #a00;
    font-family: 'Creepster', cursive;
}


/* Jumpscare Elements */
#jumpscare-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
}

#jumpscare-container.active {
    display: flex;
}

#jumpscare-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.8);
    filter: brightness(1.5);
}

#jumpscare-image.visible {
    animation: fadeInScare 0.1s forwards, fadeOutScare 0.2s 1.3s forwards;
}

#jumpscare-image.glitch {
    animation: fadeInScare 0.1s forwards, glitchEffect 1.5s 0.1s linear, fadeOutScare 0.2s 1.3s forwards;
}

#flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    opacity: 0;
    z-index: 101;
}

#flash-overlay.flash {
    animation: flashBang 0.2s ease-out;
}


/* Animations */
body.shake-mild { animation: shake 0.3s cubic-bezier(.36,.07,.19,.97) both; }
body.shake-medium { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
body.shake-extreme { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }


@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes flashBang {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

@keyframes fadeInScare {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScare {
    to {
        opacity: 0;
        transform: scale(1.2);
    }
}

@keyframes glitchEffect {
  0% { clip-path: inset(29% 0 49% 0); }
  10% { clip-path: inset(44% 0 42% 0); }
  20% { clip-path: inset(93% 0 3% 0); }
  30% { clip-path: inset(15% 0 76% 0); }
  40% { clip-path: inset(45% 0 33% 0); }
  50% { clip-path: inset(1% 0 95% 0); }
  60% { clip-path: inset(72% 0 10% 0); }
  70% { clip-path: inset(88% 0 1% 0); }
  80% { clip-path: inset(36% 0 51% 0); }
  90% { clip-path: inset(96% 0 2% 0); }
  100% { clip-path: inset(57% 0 33% 0); }
}

