:root {
    --not-studied: #6c757d;
    --studied: #28a745;
    --wrong: #dc3545;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    scrollbar-color: darkgray transparent;
    user-select: none;
    color: unset;
}

.fullscreen-mask {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 50%);
    z-index: 9999;
    display: flex;
    justify-items: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}


.banner-header {
    min-height: 30px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 10px;
    font-size: 2rem;
    font-weight: bold;
}


@media (prefers-color-scheme: dark) {

    :root {
        --not-studied: #6c757d;
        --studied: #28a745;
        --wrong: #dc3545;
    }

    body {
        background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    }

    .app-container {
        background-color: #212529;
        color: #fff;
    }

    .tab-header {
        background-color: rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-tabs .nav-link {
        color: #adb5bd;
    }

    .nav-tabs .nav-link.active {
        color: #6ea8fe;
        border-bottom: 2px solid #6ea8fe;
    }

    .mode-card {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mode-card:hover {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .mode-card[disabled] {
        pointer-events: none;
        opacity: 0.5;
    }

    .mode-card[disabled]:hover {
        transform: none;
    }

    .section-title {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .card {
        background-color: #212529;
        border: 1px solid rgba(255, 255, 255, 0.125);
    }
}


.question-grid-card {
    user-select: none;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    margin: 15px 0;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 300px;
}

@media (max-width: 768px) {
    .question-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .legend-item {
        font-size: 0.7rem;
        padding: 0px 10px 0px 5px;
    }
}

.question-grid .question-grid-none {
    text-align: center;
    grid-column: 1 / -1;
    font-size: 1.25rem;
    opacity: 0.8;
    padding: 20px 0;
}

.question-icon {
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    display: inline;
    margin: 3px auto;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.question-icon:hover {
    transform: scale(1.1);
}

.question-icon.star {
    font-weight: bold;
    color: yellow;
    /* font-size: 1.05em; */
    border: 2px solid yellow;
    line-height: 36px;
    box-sizing: border-box
}

@media (max-width: 768px) {
    .question-icon {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 0.7rem;
        margin: 2px auto;
    }

    .question-icon.star {
        line-height: 31px;
    }
}

@media (max-width: 576px) {
    .question-icon {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 0.6rem;
        margin: 1px auto;
    }

    .question-icon.star {
        line-height: 26px;
    }
}

.not-studied {
    background-color: var(--not-studied);
}

.studied {
    background-color: var(--studied);
}

.wrong {
    background-color: var(--wrong);
}

.legend-item {
    /* height: 50px;
    line-height: 50px; */
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 25px;
    padding: 0 15px 0 5px;
}

.legend-item:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.legend-item .question-icon {
    transform: scale(0.6);
    color: transparent;
    user-select: none;
}

.question-grid-card .legend-item.active {
    background-color: #0d6efd66;
    color: white;
}



.load-container {
    width: 240px;
    height: 240px;
    position: relative;
    overflow: hidden;
    margin: auto;
}

.loading .loader:before,
.loading .loader:after,
.loading .loader {
    border-radius: 50%;
    width: 2.5em;
    height: 2.5em;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation: loading 1.8s infinite ease-in-out;
    animation: loading 1.8s infinite ease-in-out;
}

.loading .loader {
    margin: 8em auto;
    font-size: 10px;
    position: relative;
    text-indent: -9999em;
    -webkit-animation-delay: 0.16s;
    animation-delay: 0.16s;
}

.loading .loader:before {
    left: -3.5em;
}

.loading .loader:after {
    left: 3.5em;
    -webkit-animation-delay: 0.32s;
    animation-delay: 0.32s;
}

.loading .loader:before,
.loader:after {
    content: '';
    position: absolute;
    top: 0;
}

@-webkit-keyframes loading {

    0%,
    80%,
    100% {
        box-shadow: 0 2.5em 0 -1.3em #ffffff;
    }

    40% {
        box-shadow: 0 2.5em 0 0 #FFF;
    }
}

@keyframes loading {

    0%,
    80%,
    100% {
        box-shadow: 0 2.5em 0 -1.3em #ffffff;
    }

    40% {
        box-shadow: 0 2.5em 0 0 #FFF;
    }
}