/* Loading screen styles */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    border: 8px solid #f3f3f3;
    border-radius: 50%;
    border-top: 8px solid #2dd71ee6;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
}

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

/* Existing styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Prevent scrolling */
body, html {
    height: 100%;
    overflow: hidden; /* Disable scrolling */
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: white;
}

/* Flexbox to adjust content height */
.game-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding-bottom: 70px;
    /* Allow the content to adjust size if it exceeds the viewport */
    flex-grow: 1;
}

/* Ensure content fits inside the viewport */
.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
    overflow: hidden; /* Prevent overflow outside the viewport */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.coming-soon {
    background-color: #3a3a3a;
    color: #aaa;
    padding: 5px 10px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 2.5vmin;
}
.icon {
    font-size: 15vmin;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    60% { transform: translateY(-15px); }
}
.score {
    font-size: 8vmin;
    font-weight: bold;
    margin-bottom: 20px;
}
.view-score {
    color: #aaa;
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
    font-size: 2.5vmin;
}
.review-lessons, .learn-more {
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 5px;
    font-size: 3vmin;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}
.review-lessons {
    background-color: #3a3a3a;
    color: white;
    text-align: left;
}
.review-lessons:hover {
    background-color: #555;
}
.learn-more {
    background-color: #2dd71ee6;
    color: white;
    font-weight: bold;
}
.learn-more:hover {
    background-color: #e6c200;
}
.learn-more.disabled {
    background-color: #555;
    color: #aaa;
    cursor: not-allowed;
}
.timer {
    font-size: 2.5vmin;
    margin-top: 10px;
}
.nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: #2a2a2a;
    padding: 10px 0;
}
.nav-item {
    color: #aaa;
    text-decoration: none;
    font-size: 3vmin;
    cursor: pointer;
    flex: 1;
    text-align: center;
    padding: 5px 5px;
    transition: color 0.3s ease;
    font-weight: bold;
}
.nav-item.active {
    color: #2dd71ee6;
}
.nav-item:hover {
    color: #2dd71ee6;
}

/* Adjust other sections if needed */
.section {
    display: none;
    justify-content: center;
    align-items: center;
    /* height: 100%; */
    width: 100%;
}

.section.active {
    display: block;
}
.progress-bar {
    width: 100%;
    background-color: #3a3a3a;
    height: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.progress {
    width: 50%;
    background: linear-gradient(90deg, #2dd71ee6, #e6c200);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 10px #2dd71ee6; }
    50% { box-shadow: 0 0 20px #e6c200; }
    100% { box-shadow: 0 0 10px #2dd71ee6; }
}
.task-item, .reward-item {
    background-color: #3a3a3a;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}
.task-item:hover, .reward-item:hover {
    background-color: #555;
}
.task-button {
    background-color: #2dd71ee6;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.task-button:hover {
    background-color: #e6c200;
}

/* Responsive adjustments for smaller screens */
@media (max-height: 600px) {
    .content {
        padding: 10px;
        overflow-y: auto; /* Allow scrolling if content exceeds small screens */
    }
    .icon {
        font-size: 10vmin;
    }
    .score {
        font-size: 6vmin;
    }
    .review-lessons, .learn-more {
        padding: 10px;
    }
}

/* New styles for progress and rewards sections */
.task-item span, .reward-item span {
    display: flex;
    align-items: center;
}
.task-item span i, .reward-item span i {
    margin-right: 10px;
}
/* Styles for the chart */
.chart-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Prevent internal container scrolling */
.game-container, .content, .section {
    overflow: hidden; /* Disable scrolling for these containers */
    flex-grow: 1;
}
