#color-area, #click-color-area {
    width: 100%;
    margin: 0;
    padding: 0;
}

.chimp-button-container {
    text-align: center;
    margin-top: 50px;
}

.chimp-button {
    font-size: 24px;
    font-weight: bold;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 5px;
    line-height: 30px;
    height: 50px;
    vertical-align: middle;
}

.chimp-grid .chimp-button {
    height: 75px;
    width: 75px;
    line-height: 50px;
    font-size: 50px;
    padding: 10px 0;
}

.chimp-grid .chimp-button.covered {
    background-color: #718096 !important;
    color: transparent !important;
}

.chimp-grid .chimp-button.covered:before {
    height: 75px;
    width: 75px;
    position: relative;
    display: block;
    top: -10px;
    left: -20px;
    content: ' ';
}

.chimp-grid {
    margin: 50px auto;
    display: grid;
    grid-gap: 5px;
    max-height: 50vh;
}

@media (max-width: 600px) {
    .chimp-grid .chimp-button {
        height: 35px;
        width: 35px;
        line-height: 25px;
        font-size: 25px;
        padding: 5px 0;
    }
}

#aim-area {
    max-width: 100vw;
    max-height: 66vh;
}

.w-1000 {
    width: 1000px;
}

.h-500 {
    height: 500px;
}

.hidden {
    display: none;
}

#text::-webkit-scrollbar {
    display: none;
}

.letter {
    position: relative;
    display: inline-block;
}

.incorrect {
    color: red;
}

.correct {
    color: #00ff00;
}

.letter.cursor::before {
    content: "|";
    display: inline-block;
    position: absolute;
    margin: -2px -3px;
    color: black;
    animation: blink .85s infinite linear;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.fade {
    position: relative;
    top: 25px;
    left: 0;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 15px 0;
    z-index: 1;
    background-image: linear-gradient(to top, transparent, #f3f4f6);
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 18px;
    font-weight: bold;
}

@media (prefers-color-scheme: dark) {
    /* Base background and text colors */
    body, .card-panel, .game-card, #disclaimer {
        background-color: #0f172a; /* Dark background */
        color: #E0E0E0; /* Light text for readability */
    }

    /* Navbar and input areas */
    nav, .navbar, .bg-gray-800, .bg-gray-50, #aim-area, .square, #math-answer {
        background-color: #1A1A1A; /* Slightly different shade for distinction */
    }

    /* Game cards and test screens */
    .game-card, .test-screen, .card-panel {
        border-color: #333333; /* Darker borders for visual separation */
    }

    /* Links and important text */
    a, .text-white, #scoresContent, .points, #emo-score, #math-score, #verbal-score, #reaction-time, #number-level {
        color: #BB86FC; /* Light purple for emphasis */
    }

    /* Buttons */
    button, .btn, .waves-effect, #closeScoresModal, #start-reaction-time-test,
    #start-number-memory-test, #start-verbal-memory-test, #start-chimp-test,
    #start-aim-test, #start-pattern-memory-test, #start-sequence-memory-test,
    #start-stroop-test, #start-math-test, #start-emotion-test, #restart-button {
        background-color: #3700B3; /* Deep purple for buttons */
        color: #E0E0E0; /* Light text on dark buttons */
    }

    /* Button hover states */
    button:hover, .btn:hover, .waves-effect:hover {
        background-color: #4B0082; /* Lighter purple for hover states */
    }

    /* Hover text color */
    .hover\:text-white:hover {
        color: #E0E0E0; /* Light text color on hover */
    }

    /* Specific color adjustments for game elements */
    .bg-red-500, #color-dummy, #color-area {
        background-color: #B71C1C; /* Dark red */
    }

    .bg-green-500, #click-color-area {
        background-color: #1B5E20; /* Dark green */
    }

    .bg-blue-500 {
        background-color: #0D47A1; /* Dark blue */
    }

    /* Adjusting text color for different contexts */
    .text-gray-500 {
        color: #9E9E9E; /* Light grey for less important text */
    }

    .text-gray-900 {
        color: #E0E0E0; /* Light color for primary text */
    }

    .text-gray-800 {
        color: #BDBDBD; /* Medium grey for secondary text */
    }

    .fade {
        background-image: linear-gradient(to top, transparent, #082f49);
    }
}

