/* Global Font Reset */
body {
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    color: #333;
    background: #ffffff;
    font-size: 16px;
}

.alert
{
    margin-bottom: 0;
}

.alert-success
{
    margin-bottom: 20px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", sans-serif;
    font-weight: 600; /* Semi-bold for headings */
    margin-bottom: 10px;
}

/* Text Elements */
p, span, a, li {
    font-family: "Poppins", sans-serif;
    font-weight: 400; /* Regular weight for body text */
    margin-bottom: 0;
    margin-top: 0;
    font-size: 0.95rem;
}

/* Buttons */
button, .btn, .next-btn, .custom-btn {
    font-family: "Poppins", sans-serif;
    font-weight: 500; /* Medium weight for buttons */
    font-size: 16px;
}

/* Custom Button */
.custom-btn {
    background-color: #FDE251 !important; /* Button color */
    border-color: #FDE251 !important;    /* Border color */
    color: white;                        /* Text color */
    font-family: "Poppins", sans-serif;  /* Font */
    font-weight: 500;                    /* Medium */
    font-size: 16px;
}

.custom-btn:hover {
    background-color: #00D67A !important; /* Darker shade for hover */
    border-color: #00D67A !important;
}

/* Animation for fading out */
.fade-out {
    animation: fadeOut 0.5s forwards;
}

/* Animation for fading in */
.fade-in {
    animation: fadeIn 0.5s forwards;
}

/* Full-width blue background for the informational section with flex alignment */
.quiz-info-alt {
    background-color: #229FFF; /* Blue background */
    color: white; /* White text */
    padding: 15px 30px; /* Spacing inside */
    margin: 0 -30px 40px; /* Extend background to the edges of the card */
    border-radius: 12px 12px 0 0; /* Rounded corners at the top */
}

.quiz-title-left {
    font-size: 20px; /* Larger font size */
    font-weight: bold;
}

.quiz-date-left {
    font-size: 16px;
}

/* Quiz footer text styling */
.quiz-footer-text {
    font-size: 14px; /* Small letters */
    color: #666; /* Dark grey color */
    text-align: center; /* Centered text */
    margin-top: 20px; /* Spacing above the footer */
    line-height: 1.5; /* Slightly increased line height for better readability */
    padding-bottom: 50px;
}

/* Time's Up Message */
#time-up-message {
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
    color: #FB2056;
}

.timer-wrapper {
    width: 100%; /* Match the answer block width */
    max-width: 500px; /* Align with the answer block */
    margin: 20px auto; /* Center the timer bar */
    height: 30px;
    border-radius: 12px; /* Rounded corners */
    background-color: #ddd; /* Gray background */
    overflow: hidden;
    position: relative;
}

.timer-bar {
    height: 100%;
    background-color: #00F081; /* Green for countdown */
    width: 100%; /* Start at full width */
    transition: width linear; /* Smooth shrinking effect */
}

.timer-container {
    max-width: 500px; /* Matches answer block width */
    margin: 10px auto 20px;
    height: 30px;
    position: relative;
}

.timer-background {
    background-color: #ddd; /* Grey background */
    width: 100%;
    height: 100%;
    border-radius: 15px; /* Rounded corners */
    position: relative;
    overflow: hidden;
}

.timer-foreground {
    background-color: #00F081; /* Green timer */
    width: 100%; /* Starts full */
    height: 100%;
    border-radius: 15px; /* Rounded corners */
    position: absolute;
    left: 0;
    top: 0;
    transition: width 15s linear; /* Smooth reduction */
}

/* Quiz Image Styling */
.quiz-image {
    width: 100%; /* Matches the width of the parent container */
    height: 200px; /* Fixed height */
    object-fit: cover; /* Ensure the image scales nicely within the dimensions */
    border-radius: 12px; /* Rounded corners */
}

/* Quiz of the Day Card */
.quiz-of-the-day-card {
    background-color: #fff; /* White background */
    border: 1px solid #ddd; /* Thin gray border */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    padding: 30px;
    max-width: 460px;
    margin: 50px auto; /* Center horizontally */
}

/* Progress Circles */
.progress-circles {
    display: flex;
    justify-content: space-between; /* Distribute circles evenly */
    max-width: 500px; /* Match the width of the timer, image, and answer block */
    margin: 0 auto; /* Center horizontally */
    padding: 0; /* Remove extra padding */
    overflow: visible; /* Ensure circles remain fully visible */
}

/* Individual Circle */
.circle {
    width: 20px; /* Fixed width for consistency */
    height: 20px; /* Maintain circular shape */
    background-color: #ddd; /* Default background color */
    border-radius: 50%; /* Ensure circles are fully rounded */
    flex-shrink: 0; /* Prevent shrinking */
}
.circle.active {
    background-color: #229FFF; /* Blue for active */
}
.circle.correct {
    background-color: #00F081; /* Green for correct */
}
.circle.wrong {
    background-color: #FB2056; /* Red for wrong */
}


/* Answer Block */
.answer-block {
    background-color: #229FFF; /* Blue */
    color: white;
    padding: 5px 30px;
    max-width: 500px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
}
.answer-block.correct {
    background-color: #00F081; /* Green */
}
.answer-block.wrong {
    background-color: #FB2056; /* Red */
}
.answer-option {
    border-bottom: 1px solid white;
    padding: 15px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}

.answer-option:last-child {
    border-bottom: none;
}
.answer-option.wrong {
    text-decoration: line-through;
}
.answer-option.correct {
    font-weight: bold;
}

.sprint-score{
    position: relative;
}


.leaderboard-tab {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.leaderboard-tab:hover {
    background-color: #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
}

.leaderboard-tab.active {
    color: blue;
    font-weight: bold;
}

.leaderboard-tab:not(.active) {
    color: #333;
}

.new-score-sprint{
    font-size: 2.5rem;
    font-weight: bold;
    color: #00F081;
    margin-top: 20px;
    text-align: center;
    position: absolute;
    top: -100%;
    left: 100%;
}

.question-text
{
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Next Button */
.next-btn {
    width: 100%; /* Matches the width of the answer block */
    max-width: 500px;
    margin: 20px auto 0px; /* Space below the answer block */
    background-color: #229FFF; /* Blue */
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.next-btn:hover {
    background-color: #1a8cd8; /* Slightly darker blue on hover */
}

/* Keyframes for fadeOut */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Keyframes for fadeIn */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
    }
}

/* Full-Width Quiz Card on Mobile */
@media (max-width: 768px) {
    .quiz-of-the-day-card {
        width: 100%; /* Full width of the screen */
        max-width: 100%; /* Ensure it stretches edge-to-edge */
        margin: 0px; /* Remove margin */
        padding: 20px; /* Remove padding */
        border: none; /* Remove border */
        border-radius: 0; /* Remove rounded corners */
        box-shadow: none; /* Remove shadow for a flat design */
    }

    /* Remove padding or margin between card and navigation */
    .quiz-info-alt {
        display: none;
    }
    
    body
    {
        background: #fff;
    }
}

.hero-section {
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 8px;
}

.quiz-of-the-day .card {
    border-radius: 12px;
    overflow: hidden;
}

.featured-quizzes .card {
    transition: transform 0.2s;
}

.featured-quizzes .card:hover {
    transform: scale(1.05);
}

div.row.g-3 .col-md-6:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease-in-out;
}

.btn-dark:hover {
    background-color: #333;
    color: #fff;
}

.btn-warning:hover {
    background-color: #ffd454;
}

    .blur-content {
        filter: blur(5px);
        pointer-events: none;
        user-select: none;
    }

    .blur-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.8);
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.25rem;
        z-index: 10;
    }
   .blur-wrapper {
        position: relative;
        filter: blur(5px);
        pointer-events: none;
        user-select: none;
    }

    .blur-wrapper:after {
        content: "Login to access the archive";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #ff0000;
        font-size: 1.5rem;
        font-weight: bold;
        background: rgba(255, 255, 255, 0.8);
        padding: 10px 20px;
        border-radius: 5px;
        z-index: 10;
    }
    
    #qotdPopup .modal-header {
        background-color: #004aad;
        color: white;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }

    #qotdPopup .modal-title {
        font-size: 1.8rem;
        font-weight: bold;
    }

    #qotdPopup .modal-body {
        font-size: 1.2rem;
        text-align: center;
    }

    #qotdPopup .btn-warning {
        padding: 10px 20px;
        font-size: 1.3rem;
        font-weight: bold;
    }

.bg-light {
    background-color: #f8f9fa !important;
}

.border {
    border-color: #ddd !important;
}

.btn-primary {
    background-color: #004aad !important;
    border: none !important;
}

.btn-primary:hover {
    background-color: #003080 !important;
}

    .modal-content {
        background-color: #f9f9f9;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }
    .modal-header {
        background-color: #004aad;
        color: white;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }
    .modal-title {
        font-size: 1.5rem;
        font-weight: bold;
    }
    .modal-body {
        font-size: 1.1rem;
    }
    .modal-body a {
        margin: 10px 0;
    }
    
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
    }
    .border-right {
        border-right: 1px solid #ddd;

.table {
    width: 100%;
    margin: auto;
    text-align: left;
}

.quiz-row {
    transition: background-color 0.3s;
}

.table-success {
    background-color: #d4edda !important;
}

    .quiz-header {
        background-color: #f8f9fa;
        border-radius: 10px;
        border: 1px solid #e9ecef;
    }
    .quiz-title {
        font-size: 1.75rem;
        font-weight: bold;
    }
    .quiz-description {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .quiz-info p {
        font-size: 1.1rem;
        margin: 0.5rem 0;
    }
    .quiz-answer {
        min-height: 40px; /* Ensure a minimum height */
        height: 40px; /* Set a fixed height */
        vertical-align: middle; /* Vertically align text in the center */
        font-size: 1rem; /* Font size for consistency */
        font-weight: bold; /* Make text bold */
        text-align: center; /* Center align text horizontally */
    }

    .quiz-answer.correct {
        background-color: lightgreen; /* Highlight correct answers */
    }

    .table {
        table-layout: fixed; /* Enforce equal column widths */
        width: 100%; /* Ensure table spans full width */
    }
.quiz-answer.unanswered {
    background-color: red; /* Highlight unanswered answers */
    color: white; /* White text for contrast */
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -20px;
    border-radius: 50%;
    animation: fall 3s linear infinite;
    z-index: 9999;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

.personal-best-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 800;
    color: lightgreen;
    padding: 20px;
    border-radius: 10px;
    z-index: 1000;
    white-space: nowrap;
    text-align: center;
}


/* Sprint Trivia */



}

@media (max-width: 980px) { 

    
    .table-res table {
        display: flex;
        flex-wrap: wrap;
    }

    .table-res tbody {
        display: flex;
        flex-wrap: wrap;
    }

   
    
    .table-res thead {
        display: flex;
        width: 100%;   
    }

    .table-res th:nth-child(3),
    .table-res th:nth-child(4),
    .table-res th:nth-child(5),
    .table-res th:nth-child(6) {
        display: none;
    }

    .table-res tr {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }
    .table-res th {
        width: 100%; /* Cada celda ocupará la mitad del ancho */
        text-align: center;
        display: block;
        flex: 1; 
        text-align: center;

    }

    .table-res td{
        width: 50%; /* Cada celda ocupará la mitad del ancho */
        text-align: center;
    }
}

