/* General settings for all elements */
* {
    box-sizing: border-box;
}

/* Body settings */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    color: #333;
}

/* Quiz container settings */
#quiz-container {
    width: 480px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
}

/* Level display settings */
#level-display {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1em;
    color: #ff4081;
}

/* Level bar settings */
#level-bar-container {
    width: 100%;
    background-color: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

#level-bar {
    height: 20px;
    width: 0%;
    background-color: #673ab7;
    transition: width 0.5s linear;
}

/* Main title settings */
h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #673ab7;
    letter-spacing: 2px;
}

/* Modal settings */
.modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Settings icon settings */
.settings-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    color: #333;
}

.settings-icon:hover {
    color: #ff4081;
}

/* Main button settings */
#start-button, #resume-button, #personal-stats-button {
    background-color: #673ab7;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5em;
    transition: background-color 0.3s, transform 0.2s;
    margin: 10px;
}

#resume-button {
    background-color: #ff9800;
}

#start-button:hover {
    background-color: #5e35b1;
    transform: translateY(-2px);
}

#resume-button:hover {
    background-color: #fb8c00;
    transform: translateY(-2px);
}

#personal-stats-button {
    background-color: #4caf50;
}

#personal-stats-button:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
}

/* Level and category selector settings */
#level-category-selector {
    margin: 20px 0;
}

.selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.selector label {
    margin-right: 10px;
}

#ready-button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#ready-button:hover {
    background-color: #388e3c;
}

/* Info box settings */
.info-box {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    justify-content: center;
    margin: 15px 0;
}

hr {
    border: 1px solid #e0e0e0;
    margin: 20px 0;
}

/* Timer settings */
#timer {
    font-weight: bold;
}

#timer-bar-container {
    width: 100%;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

#timer-bar {
    height: 20px;
    width: 100%;
    background-color: #4caf50;
    transition: width 1s linear, background-color 1s linear;
}

/* Question settings */
#question {
    font-size: 1.5em;
    color: #444;
    margin: 15px 0;
}

#choices {
    margin-top: 20px;
}

.choice {
    display: block;
    margin: 10px 0;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.choice:hover {
    background-color: #e2e6ea;
    transform: translateY(-2px);
}

.choice.correct {
    background-color: #a5d6a7;
}

.choice.incorrect {
    background-color: #ef9a9a;
}

/* Secondary button settings */
#hint-button, #ok-button, #save-exit-button, #close-stats-button {
    background-color: #03a9f4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 10px 5px;
    transition: background-color 0.3s, transform 0.2s;
}

#hint-button:hover, #ok-button:hover, #close-stats-button:hover {
    background-color: #0288d1;
}

#save-exit-button {
    background-color: #e53935;
}

#save-exit-button:hover {
    background-color: #c62828;
}

/* Button container settings */
.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Stats box settings */
#stats-box, #highest-scores-box, #more-scores-box {
    margin-top: 20px;
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    margin: 10px 0;
}

.stat-item i {
    margin-right: 10px;
    color: #ff4081;
}

#highest-scores, #more-scores {
    margin-top: 10px;
    background-color: #e0f7fa;
    padding: 10px;
    border-radius: 5px;
}

/* Additional score items settings */
.highest-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.highest-score-item:last-child {
    border-bottom: none;
}

.highest-score-item i {
    margin-right: 10px;
}

.more-scores-button {
    background-color: #03a9f4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 10px 0;
    transition: background-color 0.3s, transform 0.2s;
}

.more-scores-button:hover {
    background-color: #0288d1;
}