
.question-bank-page {
    width: 100%;
    min-height: calc(100vh - 92px);
    background: #f8fafc;
    box-sizing: border-box;
}

.question-bank-header {
    width: calc(100% - 40px);
    max-width: 1440px;
    margin: 0 auto;
    padding: 64px 0 42px;
    box-sizing: border-box;
}

.page-eyebrow {
    margin-bottom: 10px;
    color: #0f766e;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
    line-height: 20px;
}

.question-bank-header h1 {
    margin: 0;
    color: #0f172a;
    font-family: "Poppins", sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
}

.question-bank-header p {
    max-width: 780px;
    margin: 14px 0 0;
    color: #64748b;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 27px;
}

.question-bank-content {
    width: calc(100% - 40px);
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 80px;
    box-sizing: border-box;
}

.search-container {
    position: relative;
    width: 100%;
    margin-bottom: 22px;
}

.search-container input {
    width: 100%;
    height: 52px;
    padding: 0 18px 0 50px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    box-sizing: border-box;
}

.search-container input::placeholder {
    color: #94a3b8;
}

.search-container input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    width: 19px;
    height: 19px;
    transform: translateY(-50%);
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.8;
    pointer-events: none;
}

.section-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar {
    display: none;
}

.section-tab {
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.section-tab.active {
    border-color: #0f766e;
    background: #0f766e;
    color: #ffffff;
}

.filters-row {
    display: grid;
    grid-template-columns:
        minmax(0, 2fr)
        minmax(180px, 1fr)
        minmax(180px, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.filter-group label {
    color: #334155;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.filter-dropdown {
    position: relative;
    width: 100%;
}

.filter-dropdown-trigger {
    width: 100%;
    height: 46px;
    padding: 0 40px 0 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: #334155;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease,
        background-color 0.18s ease;
}

.filter-dropdown-trigger:hover {
    border-color: #b7c7d8;
    background: #fbfdff;
    transform: translateY(-1px);
}

.filter-dropdown.open .filter-dropdown-trigger {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.09);
    background: #ffffff;
    transform: translateY(-1px);
}

.filter-dropdown-chevron {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 17px;
    line-height: 1;
    transform: translateY(-1px);
    transition:
        color 0.18s ease,
        transform 0.2s ease;
}

.filter-dropdown.open .filter-dropdown-chevron {
    color: #0f766e;
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 80;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition:
        opacity 0.18s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.filter-dropdown.open .filter-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.filter-dropdown-option {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        transform 0.15s ease;
}

.filter-dropdown-option:hover {
    background: #f0fdfa;
    color: #0f766e;
    transform: translateX(2px);
}

.filter-dropdown-option.active {
    background: #ecfdfb;
    color: #0f766e;
    font-weight: 600;
}

.filter-dropdown-option.active::after {
    content: "✓";
    margin-left: auto;
    font-size: 13px;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .filter-dropdown-trigger,
    .filter-dropdown-chevron,
    .filter-dropdown-menu,
    .filter-dropdown-option {
        transition: none !important;
        animation: none !important;
    }
}


.review-filter {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 25px;
}

.review-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.review-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    position: relative;
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
}

.review-checkbox input:checked + .custom-checkbox {
    border-color: #0f766e;
    background: #0f766e;
}

.review-checkbox input:checked + .custom-checkbox::after {
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    content: "";
    transform: rotate(45deg);
}

.results-header {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin-bottom: 22px;
}

.results-header > div {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.results-header strong {
    color: #0f172a;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.results-header span {
    color: #94a3b8;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
}

.question-list {
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    align-items: start;
    justify-content: stretch;
    column-gap: 10px;
    row-gap: 28px;
}

.question-group {
    display: contents;
}

.question-group .question-icon-wrapper,
.question-group .question-icon {
    flex: 0 0 auto;
}

.question-icon-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
}

.question-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 15px;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.question-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.09);
}

.question-icon.difficulty-easy {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.question-icon.difficulty-medium {
    background: #fef9c3;
    border-color: #fde047;
    color: #854d0e;
}

.question-icon.difficulty-hard {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.question-icon-number {
    display: block;
}

.question-status-dot {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.question-status-dot.unanswered {
    background: #94a3b8;
}

.question-status-dot.correct {
    background: #22c55e;
}

.question-status-dot.incorrect {
    background: #ef4444;
}

.question-review-icon {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12);
    z-index: 2;
}

.question-review-icon.active {
    color: #eab308;
}

.question-review-icon svg {
    width: 12px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.question-review-icon.active svg {
    fill: currentColor;
}

.question-review-icon:hover {
    color: #ca8a04;
}

.empty-state {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 50px 25px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    text-align: center;
    box-sizing: border-box;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: #f1f5f9;
}

.empty-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.6;
}

.empty-state h2 {
    margin: 0;
    color: #334155;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.empty-state p {
    max-width: 520px;
    margin: 8px 0 0;
    color: #94a3b8;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    line-height: 21px;
}

.loading-state {
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    gap: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #64748b;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #dbe3ec;
    border-top-color: #0f766e;
    border-radius: 50%;
    animation: question-bank-spin 0.75s linear infinite;
}

@keyframes question-bank-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 700px) {
    .question-bank-header {
        width: calc(100% - 30px);
        padding-top: 38px;
        padding-bottom: 28px;
    }

    .question-bank-content {
        width: calc(100% - 30px);
    }

    .question-bank-header h1 {
        font-size: 31px;
    }

    .question-bank-header p {
        font-size: 14px;
        line-height: 24px;
    }

    .filters-row {
        grid-template-columns: 1fr;
    }

    .question-list {
        grid-template-columns: repeat(9, 56px);
        column-gap: 12px;
        row-gap: 22px;
    }

    .question-icon-wrapper,
    .question-icon {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .question-icon {
        font-size: 16px;
        border-radius: 13px;
    }
}

@media (max-width: 480px) {
    .question-bank-header,
    .question-bank-content {
        width: calc(100% - 24px);
    }

    .question-bank-header h1 {
        font-size: 28px;
    }

    .question-icon-wrapper,
    .question-icon {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .question-icon {
        font-size: 15px;
        border-radius: 12px;
    }

    .question-list {
        grid-template-columns: repeat(6, 52px);
        row-gap: 20px;
        column-gap: 10px;
    }
}
