body {
	margin: 0;
	font-family: Droid Sans Mono;
}

canvas { display: block; }

#instructions {
    position: fixed;
    top: 10px;
    left: 10px;
    width: clamp(150px, 9vw, 200px); /* Minimum 150px, maximum 250px */
    color: white;
    font-size: clamp(12px, 1.2vw, 14px); /* Responsive font size with bounds */
    background: rgba(0,0,0,0.5);
    padding: clamp(8px, 1.5vmin, 15px);
    border-radius: 1vmin;
    display: flex;
    flex-direction: column;
    transition: height 0.2s ease;
    height: auto;
    max-height: 108px;
}

#instructions:has(#levelSection:not(.hidden)) {
    max-height: 84vh;
}

input[type="checkbox"]:checked {
   pointer-events: none;
   opacity: 0.6;
   cursor: not-allowed;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1vmin;
    width: 100%;
    margin-top: 2vmin;
}

.level-box {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid white;
    border-radius: 0.5vmin;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    position: relative;
}

.level-box.locked {
    cursor: not-allowed;
}

.level-box.locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.level-box.locked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('locked.gif');
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 2;
}

.level-box:not(.locked):hover {
    transform: scale(1.05);
}

.section-header {
    font-size: clamp(14px, 1.8vmin, 18px);
    font-weight: bold;
    margin-bottom: 1vmin;
    text-align: center;
    width: 100%;
    padding-bottom: 0.5vmin;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.level-section {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease-in-out, visibility 0.2s;
    margin-top: 2vmin;
}

.level-section.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#abilityText {
    display: none;
}

#timer {
    position: fixed;
    top: 10px;
    right: 10px;
    color: white;
    font-size: clamp(14px, 1.5vw, 18px);
    background: rgba(0,0,0,0.5);
    padding: clamp(8px, 1vw, 8px);
    border-radius: 5px;
    width: auto;
    min-width: 150px;
    text-align: center;
}
        
#winScreen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding-top: 20%;
}

#winScreen h1 {
    color: #ffff00;
    margin-bottom: 20px;
}

#finalTime {
    font-size: 24px;
    margin-bottom: 20px;
}
   
#enemyDeath {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding-top: 20%;
}
 
#fallDeath {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding-top: 20%;
}

#flashText {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Droid Sans Mono', monospace;
    font-size: 24px;
    color: #fff;
    text-align: center;
    animation: flash 1.5s infinite;
    z-index: 1000;
    pointer-events: none; /* So it doesn't interfere with mouse controls */
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.2; }
    100% { opacity: 1; }
}

button {
    font-family: Droid Sans Mono;
    font-size: 16px;
    font-weight: Bold;
    cursor: pointer;
}

