body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;

    background: url('../assets/images/bg.png') no-repeat center center fixed;
    background-size: cover;
    color: #f0f0f0;
    transition: background-image 1s ease-in-out;
}

.app-container {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 40px 60px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    max-width: 700px;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease-in-out;
}

.header {
    margin-bottom: 20px;
}

.logo {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

h1,
h2,
h3 {
    color: #4a90e2;
    margin-bottom: 25px;
    font-weight: 700;
}

.screen {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

input[type="text"] {
    width: 80%;
    padding: 15px;
    border: 2px solid #4a90e2;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #7b9fe7;
}

.timer {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #e67e22;
    background-color: rgba(230, 126, 34, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

#time-left.warning {
    color: #dc3545;
}

.question-container {
    margin-bottom: 15px;
}

#question-text {
    font-size: 1.7em;
    margin-bottom: 25px;
    line-height: 1.4;
}

/* Buttons */
.btn-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

button {
    width: 100%;
    padding: 18px;
    font-size: 1.3em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background-color: #4a90e2;
    color: white;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover:not(:disabled) {
    background-color: #357bd9;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #8bb7f3;
    cursor: not-allowed;
    box-shadow: none;
}

.cancel-btn {
    background-color: #e74c3c;
}

.cancel-btn:hover {
    background-color: #c0392b;
}

#explanation-page .feedback-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#explanation-page .feedback-container p {
    margin: 10px 0;
    font-size: 1.1em;
}

#user-answer-display {
    font-weight: bold;
    color: #e74c3c;
}

#correct-answer-display {
    font-weight: bold;
    color: #2ecc71;
}

#explanation-text {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

#leaderboard-list,
#history-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin: 20px 0;
}

#leaderboard-list li,
#history-list li {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
}

.difficulty-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.difficulty-container label {
    font-size: 1.2em;
    font-weight: bold;
}

.difficulty-container select {
    padding: 10px;
    border-radius: 8px;
    font-size: 1em;
    border: 1px solid #ccc;
}

#loading-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: auto;
}

#loading-page p {
    font-size: 1.5em;
    font-weight: bold;
    color: #4a90e2;
    margin-top: 0;
}

.loader {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #4a90e2;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
