/* --- WELCOME SCREEN STYLES --- */
body {
    /* Gradiant coloring */
    background: linear-gradient(135deg, #89f7fe 0%, #3776ce 100%);
    min-height: 100vh;
    margin: 0;
    /* Centering */
    display: flex;
    justify-content: center;
    align-items: center;
    /* Font */
    font-family: 'Montserrat', sans-serif;
}

/* Countdown timer */
#timer-display {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

#visitor-box {
    position: fixed; /* Stays in the corner */
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    background-color: rgba(255, 255, 255, 0.6); /* Opacity */
    backdrop-filter: blur(5px); /* Blur */
    border-radius: 20px;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    pointer-events: none;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Keeps it on top of the quiz */
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
}

.modal-content h2 {
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
    margin-bottom: 20px;
    color: #333;
}

#nickname-input {
    width: 80%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border-radius: 8px;
    border: 1px solid #333;
    font-size: 1rem;
    text-align: center;
}


#feedback-text {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 20px;
    min-height: 30px;
}

#next-btn {
    background-color: #333;
    display: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    cursor: pointer;
    /* Spacing */
    margin: 30px auto 0 auto;   
    width: 60%;
    transition: background-color 0.2s, transform 0.1s;
}

/* Next button animation */
#next-btn:hover {
    background-color: #555; 
}
#next-btn:active {
    transform: scale(0.95);
}

.text-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.text-btn:hover {
    text-decoration: underline;
    color: #555;
}

/* --- Blur --- */
.blurred {
    filter: blur(8px);
    pointer-events: none; /* Prevents user from pressing background buttons */
    user-select: none;
}

/* Color states for when an answer is clicked */
.btn.correct {
    background-color: #26890c !important;
    color: white;
}

.btn.wrong {
    background-color: #e21b3c !important;
    color: white;
}


#answer-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-bottom: 0px;
}


/* Button animation on click */
.btn:active {
    transform: scale(0.95);
}

.btn:nth-child(1) { background-color: #e2c41b; }
.btn:nth-child(2) { background-color: #1368ce; }
.btn:nth-child(3) { background-color: #be3d16; }
.btn:nth-child(4) { background-color: #a5109e; }

/* ==========================================
   Responsive feature
   ========================================== */
#main-quiz {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 850px;
    padding: clamp(15px, 3vh, 40px) clamp(20px, 5vw, 40px); 
    border-radius: 20px;
    box-shadow: 0 20px 32px 20px rgba(0, 0, 0, 0.2);
}

#question {
    font-size: clamp(1.5rem, 4vw, 2.2rem); 
    font-weight: bold;
    text-align: center;
    margin-top: 0;
    margin-bottom: clamp(20px, 5vh, 50px); 
    color: #333;
}

.btn {
    color: white;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
    min-height: clamp(70px, 15vh, 120px); 
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    padding: clamp(10px, 2vh, 20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: brightness(1.1);
}

#question, .modal-content h2 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   MOBILE RESPONSIVENESS
   ========================================== */
@media (max-width: 600px) {
    #answer-buttons {
        grid-template-columns: 1fr;
    }
    
    #next-btn {
        width: 100%;
    }
}