/* General Game Layout */
.game-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border: 2px solid #000000;
    border-radius: 20px;
    box-shadow: 5px 5px 0px #000000;
    font-family: 'Poppins', sans-serif;
}

.password-wrapper {
    margin-bottom: 1.5rem;
}

#password-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #000000;
    border-radius: 10px;
    font-size: 1.2rem;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

/* Timer */
.timer-display {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Courier New', Courier, monospace;
    background: #f0f0f0;
    padding: 0.5rem;
    border-radius: 10px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0 #000;
}

/* Dynamic Info Boxes */
#dynamic-info-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-box {
    background: #f8f9fa;
    border: 2px solid #000000;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 3px 3px 0px #000000;
    transition: background-color 0.3s ease;
}

.info-box .label {
    font-weight: 400;
    color: #555;
    display: block;
    font-size: 0.7rem;
}

/* Pillars Checklist */
#pillars-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden; /* Contains animations */
}

.pillar {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    font-weight: 600;
    border-left-width: 8px;
    border-left-style: solid;
    /* Transitions for smooth state changes */
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, text-decoration 0.4s ease;
}

.pillar.hidden {
    display: none;
}

.pillar.newly-active {
    animation: slide-in 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.pillar.fail {
    background-color: #fbeeee; /* Light Red */
    border-color: #c0392b; /* Red */
    color: #c0392b;
    text-decoration: none;
}

.pillar.pass {
    background-color: #e8f8ef; /* Light Green */
    border-color: #27ae60; /* Green */
    color: #27ae60;
    text-decoration: line-through;
}

/* Animation for a rule that just failed after being passed */
.pillar.just-failed {
    animation: shake 0.6s 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); }
}


/* Completion Screen */
#completion-screen {
    text-align: center;
    padding: 3rem;
    border-top: 2px solid #000;
    margin-top: 2rem;
}

#completion-screen h2 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#final-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

#restart-btn {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}