* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    height: 100vh;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#username {
    font-size: 1.2rem;
    padding: 0.5em;
    margin-bottom: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    outline: none;
    text-align: center;
}


.start-screen, .score-container {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease-in-out;
}

/* .scoreboard {
    margin-top: 1.5em;
    font-size: 1rem;
    color: white;
    text-align: center;
}

.scoreboard-item {
    padding: 0.3em 0;
} */

/* Scoreboard container */
.scoreboard-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 18px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #000;
    
}

#scoreboard{
    background-color:#ddd;
    border-radius: 5px;
    width: 45%;
    margin-top: 20px;
    padding: 5px;
}

/* Scoreboard title */
.scoreboard-title {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}

/* Individual score items */
.scoreboard-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 10px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.scoreboard-item:hover {
    background-color: #f0f0f0;
}

/* Styling for the rank number */
.scoreboard-rank {
    font-weight: bold;
    color: black;
    margin-right: 10px;
}

/* Styling for the username */
.scoreboard-username {
    flex-grow: 1;
    text-align: left;
}

/* Styling for the score */
.scoreboard-score {
    font-weight: bold;
    color: red;
    text-transform: uppercase;

}

/* No scores message */
.no-scores {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Clear scores button */
#clear-scores-btn {
    display: block;
    margin: 10px auto 0;
    background-color: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#clear-scores-btn:hover {
    background-color: #d32f2f;
}

.scoreboard{
    background-color: #ddd;
    border-radius: 5px;
    width: 45%;
    margin-top: 20px;
    padding: 5px;
}



button {
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-btn, #restart {
    font-size: 1.33rem;
    padding: 0.7rem 2rem;
    border-radius: 30px;
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#start-btn:hover, #restart:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#restart {
    margin-top: 1.5em;
}

#display-container {
    background-color: white;
    padding: 3.1em 2.5em;
    width: 90%;
    max-width: 40em;
    margin: 0 auto;
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    margin-bottom: 2em;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1em;
    border-bottom: 2px solid #f0f0f0;
}

.timer-div {
    background-color: #e7f6fd;
    width: 7.5em;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7em 1.8em;
    font-weight: 600;
    color: #0077be;
}

.question {
    margin-bottom: 2em;
    font-weight: 600;
    font-size: 1.2em;
    color: #333;
}

.option-div {
    font-size: 1em;
    width: 100%;
    padding: 1em 1.5em;
    margin: 0.8em 0;
    text-align: left;
    outline: none;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-div:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.option-div:disabled {
    color: #999;
    cursor: not-allowed;
    background: #f9f9f9;
}

.next-button {
    font-size: 1em;
    margin-top: 2em;
    color: white;
    padding: 0.8em 2em;
    border-radius: 30px;
    background-color: #0077be;
    float: right;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.next-button:hover {
    background-color: #005fa3;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.hide {
    display: none;
    opacity: 0;
}

.incorrect {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #d32f2f;
    animation: shake 0.5s ease-in-out;
}

.correct {
    background-color: #e8f5e9;
    color: #388e3c;
    border-color: #388e3c;
    animation: pulse 0.5s ease-in-out;
}

#user-score {
    font-size: 2em;
    color: white;
    margin-bottom: 0.5em;
}

/* Clear Scoreboard Button Styling */
#clear-scores-btn {
    font-size: 1em;
    padding: 0.8em 2em;
    margin-top: 1.5em;
    color: white;
    background-color: #e74c3c; /* Red background */
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

#clear-scores-btn:hover {
    background-color: #c0392b; /* Darker red on hover */
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#clear-scores-btn:active {
    background-color: #a93226; /* Even darker red on click */
    transform: translateY(0); /* Remove lift effect on click */
}

/* Additional styles for category and difficulty dropdowns */
#category-select, #difficulty-select {
    font-size: 1.2rem;
    padding: 0.5em;
    margin-bottom: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    outline: none;
    text-align: center;
    width: 20%;
    background-color: #f9f9f9;
}

/* Existing styles */
body {
    height: 100vh;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}





@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}