body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    background: linear-gradient(135deg, #02569D 0%, #5a9bd5 100%);
    color: #333;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 5px solid #F55446;
}

.passage-title-text {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #02569D;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    /*animation: bounce 2s infinite;*/
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.reading-passage {
    background-color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 3px dashed #02569D;
}

.reading-passage p {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
}

.progress-text {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #02569D;
    margin: 15px 0;
}

#progressBar {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid #02569D;
    position: relative;
}

#progressBar>div {
    height: 100%;
    background: #F55446;
    /*background: linear-gradient(45deg,
            #02569D 0%,
            #5a9bd5 25%,
            #F55446 50%,
            #ff8a7f 75%,
            #F55446 100%);*/
    background-size: 200% 100%;
    border-radius: 8px;
    transition: width 0.5s ease-in-out;
    /*animation: shimmer 3s infinite linear;*/
    box-shadow: 0 0 10px rgba(245, 84, 70, 0.5);
    position: relative;
}

#progressBar>div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.3) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(0, 0, 0, 0.1) 100%);
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

/* Add animated dots to the progress bar */
#progressBar::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: progressDot 1.5s infinite ease-in-out;
}

@keyframes progressDot {

    0%,
    100% {
        opacity: 0.2;
        transform: translateY(-50%) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

.question-text {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #02569D;
    background-color: rgba(2, 86, 157, 0.1);
    padding: 15px;
    border-radius: 10px;
}

.answers-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-option {
    width: 100%;
    font-size: 18px;
    text-align: left;
    padding: 15px;
    background-color: white;
    border: 3px solid #02569D;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.answer-option:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(2, 86, 157, 0.1);
    transition: width 0.3s ease;
    z-index: 0;
}

.answer-option:hover:not(.disabled):before {
    width: 100%;
}

.answer-option:hover:not(.disabled) {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.answer-option.selected {
    background-color: rgba(245, 84, 70, 0.2);
    border-color: #F55446;
    transform: scale(1.05);
}

.answer-option.correct {
    background-color: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #28a745;
    font-weight: bold;
}

.answer-option.incorrect {
    background-color: rgba(245, 84, 70, 0.2);
    border-color: #F55446;
    color: #F55446;
    font-weight: bold;
}

.star-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #F55446 0%, #ff8a7f 100%);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: fit-content;
    margin-left: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.star-counter:hover {
    transform: scale(1.1) rotate(5deg);
}

.star-icon {
    color: #FFD700;
    font-size: 24px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    50% {
        transform: rotate(0deg);
    }

    75% {
        transform: rotate(-20deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

#starCount {
    font-size: 20px;
    font-weight: bold;
    color: white;
}

#summaryContainer {
    padding: 10px;
    text-align: center;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
}

#summaryContainer h2 {
    color: #02569D;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

#summaryDetails {
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #02569D;
}

#summaryDetails p {
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    background-color: rgba(2, 86, 157, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid #F55446;
}

#summaryDetails p strong {
    color: #02569D;
    font-weight: bold;
}

.summary-value {
    color: #F55446;
    font-weight: bold;
}

/* Add some animation to the summary details */
#summaryDetails p {
    animation: fadeIn 0.5s ease-in-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

#summaryDetails p:nth-child(1) {
    animation-delay: 0.1s;
}

#summaryDetails p:nth-child(2) {
    animation-delay: 0.2s;
}

#summaryDetails p:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reset-button {
    margin-bottom: 20px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #02569D 0%, #0077d6 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.reset-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #F55446 0%, #ff7a6e 100%);
}

.hidden {
    display: none;
}

/* Add some animations for correct/incorrect answers */
@keyframes correctAnswer {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes incorrectAnswer {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-10px);
    }

    40%,
    80% {
        transform: translateX(10px);
    }
}

.answer-option.correct {
    animation: correctAnswer 0.5s ease-in-out;
}

.answer-option.incorrect {
    animation: incorrectAnswer 0.5s ease-in-out;
}

/* Add this to your CSS file to help with mobile hover states */
@media (hover: hover) {
    .answer-option:hover:not(.disabled):before {
        width: 100%;
    }

    .answer-option:hover:not(.disabled) {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    }
}

/* For touch devices, disable hover effects */
@media (hover: none) {
    .answer-option:before {
        display: none;
    }

    .answer-option:hover {
        transform: none !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    }
}

/* Charts styling */
.charts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    justify-content: center;
}

.chart-wrapper {
    flex: 1 1 45%;
    min-width: 300px;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid #02569D;
}

/* Make the time chart taller on mobile */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }

    .chart-wrapper:nth-child(2) {
        height: 400px !important;
        /* Much taller height with !important to override any conflicting styles */
    }

    /* Ensure the canvas inside takes up the full height */
    .chart-wrapper:nth-child(2) canvas {
        height: 350px !important;
        /* Give the canvas element itself more height */
    }
}

.chart-wrapper canvas {
    max-height: 200px;
}

#questionStats {
    margin-top: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #02569D;
}

#questionStats h3 {
    color: #02569D;
    margin-bottom: 15px;
    font-size: 20px;
}

.question-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: rgba(2, 86, 157, 0.05);
    transition: transform 0.2s ease;
}

.question-stat-item:hover {
    transform: translateX(5px);
    background-color: rgba(2, 86, 157, 0.1);
}

.question-stat-item.correct {
    border-left: 5px solid #28a745;
}

.question-stat-item.incorrect {
    border-left: 5px solid #F55446;
}

.question-number {
    font-weight: bold;
    color: #02569D;
}

.question-time {
    color: #F55446;
    font-weight: bold;
}

.question-status {
    font-size: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .charts-container {
        flex-direction: column;
    }

    .chart-wrapper {
        width: 100%;
    }
}