

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    -webkit-tap-highlight-color: transparent;
}



button,
a,
.nav-arrow,
.logo,
.search-button,
.mobile-nav-trigger,
.mobile-search-trigger {
    -webkit-touch-callout: none;
    
    -webkit-user-select: none;
    
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}



input,
textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

html {
    overflow-y: scroll;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #fdfdfd;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

header {
    width: 100%;
    background-color: #fdfdfd;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
    transform: translateZ(0);
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0;

    align-items: center;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 0;
}

.logo {
    margin-right: clamp(20px, 10vw, 232px);
}

.logo a img {
    height: 45px;
    display: block;
}

.search-bar {
    padding: 0;
    text-align: left;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 525px;
}

.search-container input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background: none;
    border: none;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;

    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.search-button:hover {
    color: #3B1977;
}

.main-content {
    display: grid;
    grid-template-columns: clamp(180px, 15vw, 250px) 1fr;
    gap: 40px;
    margin-top: 15px;
    align-items: start;
    position: relative;
    transition: grid-template-columns 0.7s ease, gap 0.7s ease;
}

body.sidebar-collapsed .main-content {
    grid-template-columns: 0px 1fr;
    gap: 0px;
}

main {
    flex: 1;
}

.sidebar {
    margin-top: 166px;
    transition: opacity 0.25s ease-in-out 0.62s;
}

.sidebar-header {
    display: none;
}

body.sidebar-collapsed .sidebar {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s linear;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.results-area {
    width: auto;
    min-width: 0;
    transition: width 0.7s ease 0.1s;
}

body.sidebar-collapsed .results-area {
    width: 100%;
}

.view-toggle {
    display: flex;
    gap: 10px;

}

.view-toggle button {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
    cursor: pointer;
}

.view-toggle button svg {
    fill: #d1d1d1;
    display: block;
    width: 24px;
    height: 24px;
}

.view-toggle button.active svg {
    fill: #3B1977;
}

.sidebar h3 {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 5px;
    padding-right: 9px;
    font-size: 1.1rem;
    color: #3B1977;
    line-height: 1.8;

}

.sidebar ul {
    list-style: none;
    font-weight: 450;
    padding-left: 4px;
    padding-right: 4px;
}

.sidebar li {
    margin-bottom: 15px;
    display: block;
}

.sidebar-header-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-header-text {
    margin-right: 10px;
}

.mini-sort-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #eef2f5;
    padding: 2px;
    border-radius: 20px;
    box-shadow: inset 1px 1px 3px #dbe0e3, inset -1px -1px 3px #ffffff;
    position: relative;
    margin-top: 4px;
    height: 28px;
}

.mini-sort-controls button {
    background: none;
    border: none;
    width: 28px;
    height: 24px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: #adb5bd;
    transition: color 0.3s ease;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.mini-sort-controls button.active {
    color: #3B1977;
}

.mini-sort-controls .mini-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 28px;
    height: 24px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 1px 1px 3px #dbe0e3, -1px -1px 3px #ffffff;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.mini-sort-controls button[data-sort="zh"].active~.mini-slider {
    transform: translateX(28px);
}

.custom-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 5px 5px 5px 10px;
}

.custom-checkbox .label-text {
    flex-grow: 1;
    margin-right: 15px;
    overflow-wrap: break-word;
}

.custom-checkbox input {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    flex-shrink: 0;
}

.custom-checkbox input:checked~.checkmark {
    background-color: #3B1977;
    border-color: #3B1977;
}

.custom-checkbox input:checked~.checkmark::after {
    content: '';
    position: absolute;
    display: block;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    line-height: 1.2;
    font-weight: 500;
    color: #000000b5;
}

.label-text .sub-text {
    display: block;
    color: #888;
    font-size: 0.9em;
    font-weight: 400;
    margin-top: 4px;
}

.filter-group {
    margin-bottom: 20px;
}

.featured-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.featured-control h3 {
    gap: 5px;
    margin-bottom: 3px;
    padding-top: 11px;
    padding-bottom: 4px;
}

.collapsible-header {
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}


.collapsible-header .nav-arrow {
    transition: transform 0.3s ease;
    transform: rotate(180deg);

    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    margin-right: -4px;
    margin-top: 3px;
}

.collapsible-header.collapsed .nav-arrow {
    transform: rotate(0deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 1s ease-in-out;
    max-height: 10000px;
}

.collapsible-content.hidden {
    transition: max-height 0.25s ease-in-out;
    max-height: 0;
}

.sidebar .collapsible-content li {
    border-radius: 10px;
    transition: background-color 0.2s ease;
    margin: 5px -5px 0px -5px;
}

.sidebar .collapsible-content li:hover {
    background-color: #f1e9ff;
}

.sidebar .collapsible-content li.no-hover:hover {
    background-color: transparent;
    cursor: default;
}

.custom-checkbox * {
    cursor: pointer;
}


.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}


.results-header .title h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3B1977;
    margin: 0;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.results-header .title p {
    font-size: 1.5rem;
    font-weight: 500;
    color: #3B1977;
    min-height: 2.15rem;
}

.results-header .title {
    padding-top: 0px;
    min-width: 0;
}

.category-badge,
.search-category-badge {
    display: inline-block;
    color: #3B1977;
    border: 1.5px solid #3B1977;
    background-color: transparent;
    padding: 2px 8px 5px 8px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 0px;
    line-height: 1;
    transition: all 0.2s ease;
}

.category-badge:hover {
    background-color: #3B1977;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(59, 25, 119, 0.2);
}

@media (max-width: 768px) {

    .category-badge,
    .search-category-badge {
        font-size: 0.75rem;
        padding: 3px 7px 4px 7px;
        margin-bottom: 5px;
    }
}

.controls-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-count {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
}


.filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-controls>.custom-checkbox {
    justify-content: flex-start;
    gap: 8px;
}

.filter-controls .filter-control-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-label {
    color: #3B1977;
    font-weight: 700;
    white-space: nowrap;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: clamp(2px, 2vw, 35px);
    row-gap: clamp(2px, 3vw, 55px);
    margin-top: 30px;
    align-items: end;
    opacity: 1;
    transition: row-gap 0.7s ease, opacity 0.2s ease-out;
    position: relative;

}

body.sidebar-collapsed .results-grid {
    row-gap: clamp(2px, 4.4vw, 80px);
    transition: row-gap 0.7s ease, opacity 0.2s ease-out;
    ;

}

.results-grid.fade-start {
    opacity: 0 !important;
    transition: none !important;
    
}

.results-grid:not(:has(.book-item)) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0px;
}

.no-results-message {
    text-align: center;
    line-height: 1.6;
    color: #6c757d;
    font-size: 1.5rem;
}

.no-results-zh {
    font-size: 0.9em;
    color: #868e96;
}

.results-grid>p {
    grid-column: auto;
}

.results-grid.compact-view {
    grid-template-columns: repeat(5, 1fr);
    row-gap: clamp(2px, 2.4vw, 44px);
    transition: row-gap 0.7s ease, opacity 0.2s ease-out;
}

body.sidebar-collapsed .results-grid.compact-view {
    row-gap: clamp(2px, 3vw, 55px);
    transition: row-gap 0.7s ease, opacity 0.2s ease-out;

}

.book-item {
    position: relative;
    border-radius: 5px;
    box-shadow:
        0px 2px 4px 0px rgba(0, 0, 0, 0.12),
        0px 8px 16px 0px rgba(0, 0, 0, 0.16);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    width: fit-content;
    margin: 0 auto;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    flex-direction: column;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;

}

.book-cover-wrapper {
    position: relative;
    background-color: #e9ecef;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    z-index: 1;
}


.book-cover-wrapper img {
    height: clamp(10px, 17vw, 280px);
    width: auto;
    display: block;
    border-radius: 5px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    transition: height 0.7s ease;
}


.results-grid.compact-view .book-cover-wrapper img {
    height: clamp(10px, 14vw, 230px);
    transition: height 0.7s ease;
}


body.sidebar-collapsed .book-cover-wrapper img,
body.sidebar-collapsed .no-cover-placeholder {
    height: clamp(10px, 24vw, 340px);
    transition: height 0.7s ease;
}

body.sidebar-collapsed .results-grid.compact-view .book-cover-wrapper img,
body.sidebar-collapsed .results-grid.compact-view .no-cover-placeholder {
    height: clamp(10px, 18vw, 280px);
    transition: height 0.7s ease;
}




.year-badge {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    background-color: #f0ad4e;
    color: white;
    padding: 2.5px 7px;
    border-radius: 0 5px 0 5px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 2;
    transform: translateZ(0);

}

.results-grid:not(.compact-view) .year-badge {
    transform: translateZ(0);
    transition:
        padding 0.7s ease,
        font-size 0.7s ease;
}

.results-grid.compact-view .year-badge {
    transform: translateZ(0);
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    transition:
        padding 0.7s ease,
        font-size 0.7s ease;
}

body.sidebar-collapsed .results-grid:not(.compact-view) .year-badge {
    transform: translateZ(0);
    padding: 3px 9px;
    font-size: 0.95rem;
    transition:
        padding 0.7s ease,
        font-size 0.7s ease;
}


body.sidebar-collapsed .results-grid.compact-view .year-badge {
    transform: translateZ(0);
    padding: 2.5px 7px;
    font-size: 0.85rem;
    transition:
        padding 0.7s ease,
        font-size 0.7s ease;
}



.book-item:hover {
    transform: scale(1.05) translateZ(0) translateY(-13px);
    box-shadow:
        
        0px 4px 8px 0px rgba(0, 0, 0, 0.12),
        
        0px 12px 28px 0px rgba(0, 0, 0, 0.16);
    z-index: 10;
}

.book-item.expanded {
    overflow: visible;
    z-index: 11;
}

.book-details {
    display: none;
}


@media (min-width: 769px) {
    nav {
        margin-left: clamp(20px, 5vw, 120px);
    }

    .results-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        overflow: hidden;
    }

    .results-header .title {
        flex: 1;
        min-width: 0;
        margin-right: 20px;
    }

    .results-header .title h1 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        display: block;
        width: 100%;

        line-height: 1.2;
        padding-bottom: 5px;
        margin-bottom: -5px;
    }

    .book-details {
        display: flex;
        position: absolute;
        top: 0;
        min-height: 100%;
        height: auto;
        grid-column: 1 / -1;
        grid-row: 1 / -1;
        z-index: 0;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(60px) saturate(1000%);
        -webkit-backdrop-filter: blur(60px) saturate(1000%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0s ease, box-shadow 0.3s ease;
        color: #2c3e50;
        font-size: 0.9rem;
        font-weight: 600;
        line-height: 1.7;
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-shadow: 5px 0px 20px -5px rgba(0, 0, 0, 0.1);
        left: 100%;
        margin-left: 0;
        border-radius: 0 8px 8px 8px;
        container-type: inline-size;
        container-name: book-details-container;
        padding: clamp(5px, 1.5cqi, 25px) clamp(6px, 1.8cqi, 30px) !important;
        margin-top: clamp(15px, 1.3cqi, 20px);
    }

    .results-grid.compact-view .book-details {
        margin-top: clamp(15px, 1.4cqi, 18px);
    }

    
    .book-details h3,
    body.sidebar-collapsed .results-grid.compact-view .book-details h3 {
        font-size: clamp(0.7rem, 5cqi, 1.3rem) !important;

    }

    
    .book-details,
    .book-details strong,
    .book-details .label-text,
    .book-details .year-value,
    .book-details .edition-text span {
        
        font-size: clamp(0.7rem, 3.2cqi, 0.9rem);
    }

    .book-details .title-with-donor {
        margin-bottom: clamp(4px, 2.5cqi, 8px) !important;
    }

    
    .book-details .detail-group {

        padding-top: clamp(8px, 2.2cqi, 14px) !important;
    }

    
    .tag-capsule {
        font-size: clamp(0.6rem, 3cqi, 0.8rem) !important;
        padding: 0.2cqi 1cqi !important;
        gap: 0.8cqi !important;
    }

    .tags-group {
        gap: clamp(10px, 4cqi, 30px) !important;
    }

    
    .status-dot {
        width: clamp(10px, 3cqi, 18px) !important;
        height: clamp(10px, 3cqi, 18px) !important;
    }

    .availability-item .icon-help {
        width: clamp(12px, 2.8cqi, 16px) !important;
        height: clamp(12px, 2.8cqi, 16px) !important;
        font-size: clamp(10px, 2cqi, 12px) !important;
        margin-left: 1cqi !important;
        margin-right: 0cqi;
    }


    .user-page .book-details .availability-item .icon-help::after {
        left: auto;
        
        right: clamp(14px, 4.2cqi, 25px) !important;
        
        transform: none;
        
    }

    .status-dot,
    .icon-help {
        flex-shrink: 0 !important;
    }

    
    .download-icon img {
        height: clamp(12px, 3.6cqi, 18px) !important;
    }

    
    .donor-info-icon img {
        height: clamp(24px, 5.2cqi, 32px) !important;
        width: auto !important;
    }

    
    .book-details .download-row {
        gap: clamp(0px, 8cqi, 50px) !important;
    }

    .download-row {
        grid-template-columns: minmax(0, 1fr) clamp(120px, 36cqi, 500px) !important;

        gap: 0px;
    }

    .download-rows-container {
        gap: clamp(0px, 0.7cqi, 3px) !important;
    }

    .book-details .icon-group {
        gap: 4cqi !important;
    }

    .book-details .availability-item {
        padding-right: 0;
    }

    .book-details .availability {
        display: grid !important;
        
        grid-template-columns: minmax(0, 1fr) clamp(120px, 36cqi, 500px) !important;
        gap: 0px !important;
        align-items: center;
        
        justify-content: start;
        
    }

    .book-details .file-type-badge span {
        font-size: 0.85em;
        padding: 1px 5px;
        margin-top: 2px;
    }

    .book-details .download-section {
        gap: 0 !important;
    }

    .series-badge {
        padding: 0px 5px;
        border-radius: 4px;
        font-size: clamp(0.7rem, 3.2cqi, 0.9rem);
    }

    @container book-details-container (max-width: 380px) {
        .download-title-area {
            display: none !important;
            
        }

        .detail-group.download-section {
            gap: 0 !important;
            
        }


        .file-type-badge .text-full {
            display: none !important;
            
        }

        .file-type-badge .text-short {
            display: inline !important;
            
        }

    }

    .book-item.expanded .book-details {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-5px);
    }

    .results-grid:not(.compact-view) .book-details {
        width: clamp(20px, 36vw, 585px);
    }

    body.sidebar-collapsed .results-grid:not(.compact-view) .book-details {
        padding: 30px 35px;
        font-size: 1rem;
        line-height: 1.8;
        width: clamp(20px, 45vw, 720px);
    }

    .results-grid:not(.compact-view) .book-item:nth-child(4n-1) .book-details,
    .results-grid:not(.compact-view) .book-item:nth-child(4n) .book-details {
        left: auto;
        right: calc(100%);
        border-radius: 8px 0 8px 8px;
        box-shadow: -5px 0px 20px -5px rgba(0, 0, 0, 0.1);
        transform: translateX(5px);
    }

    .results-grid.compact-view .book-details {
        padding: 20px 25px;
        font-size: 0.8rem;
        line-height: 1.6;
        width: clamp(20px, 30vw, 465px);
    }

    body.sidebar-collapsed .results-grid.compact-view .book-details {
        padding: 25px 30px;
        font-size: 0.9rem;
        line-height: 1.7;
        width: clamp(20px, 36vw, 585px);
    }

    .results-grid.compact-view .book-item:nth-child(5n-1) .book-details,
    .results-grid.compact-view .book-item:nth-child(5n) .book-details {
        left: auto;
        right: calc(100%);
        border-radius: 8px 0 8px 8px;
        box-shadow: -5px 0px 20px -5px rgba(0, 0, 0, 0.1);
        transform: translateX(4px);
    }
}


.book-details h3,
body.sidebar-collapsed .results-grid.compact-view .book-details h3 {
    font-size: 1.3rem;
    font-weight: bold;

    color: #3B1977;
    line-height: 1.5;
}

body.sidebar-collapsed .book-details h3 {
    font-size: 1.4rem;

}

.book-details .detail-group {
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 51, 102, 0.2);
}

.book-details> :last-child {
    margin-bottom: 0;
}

.book-details .detail-group:first-of-type {
    border-top: none;
    padding-top: 0;
}

.book-details .tags-group {
    border-top: none;
    padding-top: 0;
}

.book-details strong {
    font-weight: 600;
    color: #3B1977;
    white-space: nowrap;

}

.book-details .availability .form-row {
    display: flex;
    align-items: center;

    justify-content: flex-start;
    gap: 60px;
}


.book-details .custom-checkbox .label-text {
    margin-right: 8px;
}


.admin-page .availability-item.featured-item .label-text {
    margin-right: 10px;
}

.admin-page .availability-item.featured-item {
    grid-column: 2;
    justify-self: center;
}

.user-page .book-details .availability {
    display: flex;
    justify-content: space-between;
    align-items: center;

}


.availability-item,
body.sidebar-collapsed .results-grid.compact-view .availability-item {
    display: flex;
    align-items: center;
    padding-right: 115px;
}

.admin-page .availability-item {
    padding-right: 0px;
}

.results-grid.compact-view .availability-item {
    padding-right: 80px;
}

body.sidebar-collapsed .results-grid:not(.compact-view) .availability-item {
    display: flex;
    align-items: center;
    padding-right: 115px;
}

.availability-item strong {
    margin-right: clamp(0px, 2cqi, 9px);
}

.availability .status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 25%;
    vertical-align: middle;
    margin: 0 0px;

}


.icon-help {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 15px;
    height: 15px;
    position: relative;
    border: 1.5px solid #3B1977;
    color: #3B1977;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
    cursor: help;
    margin: 0 5px;

}

.icon-help:hover {
    background-color: #3B1977;
    color: white;
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(100px, 5vw, 118px);
}

nav .nav-item {
    position: relative;
}

nav .nav-item>a {
    display: flex;
    align-items: center;
    padding: 15px 0px;
    text-decoration: none;
    color: #3B1977;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

nav .nav-item>a:hover {
    color: #5d00ff;
}

nav .nav-arrow {
    margin-left: 8px;
    margin-top: 4px;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;

}


nav .nav-arrow svg {
    width: 14px;
    height: 14px;
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    position: absolute;
    top: 100%;
    left: -22%;
    background-color: #ffffff;
    width: clamp(480px, 33vw, 555px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    z-index: 9999;
    padding: 10px;
    display: flex;
}

@media (min-width: 769px) {
    .dropdown-content {
        font-size: clamp(0.9rem, 1vw, 1rem);
    }
}

#explore-menu .dropdown-content {
    min-width: auto;
    width: max-content;
    left: -31%;
}

.dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown.open .nav-arrow {
    transform: rotate(180deg);
}

.discipline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-right: 1px solid #e9ecef;
    flex: 0 0 250px;
}

.discipline-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #212529;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.discipline-name {
    text-overflow: ellipsis;
    overflow: hidden;
    padding-right: 15px;
}

.discipline-list li a::after {
    content: '›';
    font-size: 1.2em;
    color: #adb5bd;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.subject-list-container {
    flex-grow: 1;
    padding: 0 0px 0 10px;
}

.subject-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}

.subject-list.active {
    display: block;
}

.subject-list li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: 400;
    border-radius: 10px;
    line-height: 1.4;
}

.subject-list .subject-en {
    display: block;
    color: #495057;
    font-weight: 500;
}

.subject-list .subject-zh {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 2px;
}

.discipline-list li.active a,
.discipline-list li:hover a {
    background-color: #f1e9ff;
    color: #3B1977;
}

.subject-list li a:hover {
    background-color: #f1e9ff;
}

.dropdown-content .simple-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-content .simple-list li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #212529;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 10px;
}

.dropdown-content .simple-list li a:hover {
    background-color: #f1e9ff;
    color: #3B1977;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.results-per-page-select .select-selected {
    width: 60px;
}

.sort-by-select .select-selected {
    width: 125px;
}

.custom-select-wrapper select {
    display: none;
}

.select-selected {
    background-color: white;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    font-weight: 600;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
    gap: 8px;
}

.select-selected .select-arrow {
    position: static;
    transform: none;
    color: #888;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
}

.select-selected.select-arrow-active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select-selected.select-arrow-active .select-arrow {
    transform: rotate(180deg);
}

.select-items {
    position: absolute;
    background-color: white;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    border-top: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    overflow: hidden;
    z-index: 99;
}

.select-hide {
    display: none;
}

.select-items div {
    padding: 4px 8px;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 1px solid #f1e9ff;
}

@media (min-width: 769px) {
    .select-selected {
        padding: 3px 8px 5px 8px;
    }

    .select-selected .select-arrow {
        margin-top: 3px;
    }

    .select-items div {
        padding: 3px 8px 5px 8px;
    }
}

.select-items div:last-child {
    border-bottom: none;
}

.select-items div:hover {
    background-color: #f1e9ff;
}

.same-as-selected {
    background-color: #f4f4f4;
}

.download-section {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.download-rows-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 3px;
}

.download-row,
body.sidebar-collapsed .results-grid.compact-view .download-row {
    display: grid;

    align-items: center;

}

.results-grid.compact-view .download-row {
    min-height: 0px;
}



.edition-text {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    min-height: 1.6em;
}

.edition-text>span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.edition-text .file-type-badge {
    flex-shrink: 0;
}

.icon-group,
body.sidebar-collapsed .results-grid.compact-view .icon-group {
    display: grid;

    flex-shrink: 0;
}



.download-icon {
    display: flex;
    justify-content: flex-start;
    align-items: center;

    vertical-align: middle;
}


.download-icon.drive-a {
    grid-column: 1;
}


.download-icon.drive-b {
    grid-column: 2;
}


.icon-group:not(:has(.drive-a)) .drive-b {
    
    grid-column: 1;
}

.download-icon img,
body.sidebar-collapsed .results-grid.compact-view .download-icon img {
    height: 24px;
    width: auto;
    display: block;
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0.9;
    background-color: rgba(255, 255, 255, 0);

}



body.sidebar-collapsed .results-grid:not(.compact-view) .download-icon img {
    height: 26px;
}

.download-icon:hover img {
    opacity: 1;
    transform: scale(1.05) translateZ(0);
}



.year-badge {
    background-color: #6c757d;
    color: white;
}

.year-badge.status-green {
    background-color: #28a745;
}

.year-badge.status-yellow {
    background-color: #ffc107;
    color: #212529;
}

.year-badge.status-red {
    background-color: #dc3545;
}

.status-dot {
    background-color: #6c757d;
}

.status-dot.status-green {
    background-color: #28a745;
}

.status-dot.status-yellow {
    background-color: #ffc107;
}

.status-dot.status-red {
    background-color: #dc3545;
}

.book-item .year-badge {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.book-item.expanded .year-badge {
    opacity: 0;
    pointer-events: none;
}


.results-grid.compact-view .book-details h3 {
    font-size: 1.1rem;
    line-height: 1.3;
}

.results-grid.compact-view .book-details .detail-group {
    padding-top: 8px;
    margin-bottom: 8px;
}


.results-grid.compact-view .download-row {

    gap: 0px;
}

.results-grid.compact-view .icon-group {
    gap: 0px;
    
}

.results-grid.compact-view .download-icon img {
    height: 20px;
}

.results-grid.compact-view .icon-placeholder {
    height: 20px;
}

.user-page .results-grid.compact-view .book-details .availability {
    display: flex;
    justify-content: space-between;
    
    align-items: center;
}






.tags-group,
body.sidebar-collapsed .results-grid.compact-view .tags-group {
    display: flex;
    align-items: flex-start;
    gap: 33px;
}

.results-grid.compact-view .tags-group {
    gap: 30px;
}

body.sidebar-collapsed .tags-group {
    gap: 36px;
}



.tags-container {
    display: flex;
    flex-wrap: wrap;
    
    gap: 0.3em;
    
    flex-grow: 1;
}


.tag-capsule {
    display: inline-block !important;
    white-space: normal !important;
    
    padding: 1px 5px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 500;
    color: #3B1977;
    text-decoration: none;
    gap: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    
    align-items: baseline;
    line-height: 1.4 !important;
    
    text-align: left;
    
    max-width: 100%;
    

}

.tag-capsule .tag-en {
    display: inline !important;
}


.tag-capsule .tag-zh {
    margin-left: 0.5em !important;
    
}

@media(min-width:769px) {

    
    .tag-capsule:hover {
        background-color: #3B1977 !important;
        
        color: #ffffff;
        
        border: 1px solid #3B1977;
        
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.1s ease;
    }
}

.tag-capsule .tag-zh {
    font-size: 0.9em;

    font-weight: 500;
}

.file-type-badge {
    display: inline-block;
    padding-bottom: 2px;
    border-radius: 5px;
    font-weight: 600;
    line-height: 1.2;
    color: white;
    font-size: 0.85em;
    margin-left: clamp(0px, 1cqi, 5px);
    vertical-align: middle;
}

.edition-text>.file-type-badge:first-child {
    margin-left: 0 !important;
}

.file-type-badge.badge-green {
    background-color: #28a745;
}

.file-type-badge.badge-red {
    background-color: #dc3545;
}

.file-type-badge .text-short {
    display: none;
}

.file-type-badge .text-full {
    display: inline;
}


@media (max-width: 768px) {
    .file-type-badge .text-full {
        display: none;
    }

    .file-type-badge .text-short {
        display: inline;
    }

    .file-type-badge {
        font-size: 0.85em;

    }

    .file-type-badge {
        padding: 1px 5px;
    }

    .series-badge {
        font-size: 0.9em;

    }
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    
    padding-bottom: 20px;
}

.pagination-controls button {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background-color: #e9ecef;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls span {
    color: #6c757d;
    font-weight: 500;
}








.icon-help::before {
    content: attr(data-tooltip);
    
    position: absolute;
    bottom: 180%;
    
    left: 50%;
    transform: translateX(-50%);
    
    
    background-color: var(--tooltip-bg-color, #3B1977);
    
    color: white;
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    
    white-space: pre-line;
    
    width: max-content;
    
    max-width: 300px;
    
    text-align: center;
    
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(5px);
    
}


.icon-help::after {
    content: '';
    position: absolute;
    bottom: calc(150% - 5px);
    
    left: -110%;
    transform: translateX(-50%);

    
    border-width: 5px;
    border-style: solid;
    border-color: var(--tooltip-bg-color, #3B1977) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(5px);
}

@media (max-width: 768px) {
    .sidebar .icon-help::before {
        bottom: auto;
        
        top: 160%;
        
        left: 0%;
        

        
        transform: translateX(-50%) translateY(-10px);
        z-index: 3;

    }

    
    .sidebar .icon-help::after {
        bottom: auto;
        
        top: 90%;
        
        left: -400% !important;
        

        
        
        border-color: transparent transparent var(--tooltip-bg-color, #3B1977) transparent;

        
        transform: translateX(-50%) translateY(-10px);
        z-index: 3;
    }

    
    .sidebar .icon-help:hover::before,
    .sidebar .icon-help:hover::after,
    .sidebar .icon-help:active::before,
    .sidebar .icon-help:active::after {
        opacity: 1;
        visibility: visible;
        
        transform: translateX(-50%) translateY(0);
    }
}

.filter-group .icon-help {
    margin-top: 1px;
}

@media (max-width: 768px) {
    .filter-group .icon-help {
        margin-top: 0.5px;
    }
}


.filter-group .icon-help::after {
    left: -400%;
}

.icon-help:hover::before,
.icon-help:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


.availability-item:has(.status-green) {
    --tooltip-bg-color: #28a745;
}

.availability-item:has(.status-yellow) {
    --tooltip-bg-color: #ffc107;
}

.availability-item:has(.status-red) {
    --tooltip-bg-color: #dc3545;
}

.availability-item:has(.status-yellow) .icon-help::before {
    color: #212529;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    
    margin-top: 80px;
    padding-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}


.pagination-controls .page-link,
.pagination-controls .prev-next {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    color: #3B1977;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}


.pagination-controls .prev-next {
    font-size: 1.2rem;
    padding-bottom: 2px;
}


.pagination-controls .page-link:hover {
    background-color: #f1e9ff;
}


.pagination-controls .page-link.active {
    background-color: #3B1977;
    color: white;
    font-weight: 700;
    cursor: default;
}


.pagination-controls .ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 5px;
    color: #3B1977;
    font-weight: 600;
}


.pagination-controls .prev-next.disabled {
    color: #adb5bd;
    cursor: not-allowed;
    pointer-events: none;
}

.no-cover-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;

    
    height: 300px;
    width: 212px;
    

    background-color: #e9ecef;
    
    border-radius: 5px;
    
    transition: height 0.7s ease;
    color: #adb5bd;
    
    font-size: 1.1rem;
    font-weight: 500;
}


.results-grid.compact-view .no-cover-placeholder {
    height: 230px;
    width: 163px;
    transition: height 0.7s ease;
    
}



.admin-page .book-item:hover {
    transform: none;
    
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    
    z-index: 100;
    
}




.details-form {
    display: contents;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    
}


.form-row input,
.form-row select {
    font-size: 1em;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
}


.form-row input[name^="download_link_edition"] {
    flex-shrink: 0;
    width: 60px;
}


.form-row select[name^="download_link_type"] {
    flex-shrink: 0;
    width: 140px;
}


.form-row input[name^="download_link_url"] {
    flex-grow: 1;
    
    width: 100px;
    
}


.form-submit-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
}

.details-submit-btn {
    background-color: #5d00ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.details-submit-btn:hover {
    background-color: #3B1977;
}

.details-edit-btn {
    
    padding: 4px 10px;
    font-size: 0.8em;
    margin-left: auto;
}

.modal-overlay {
    
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content-admin {
    
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-cancel,
.btn-save {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel {
    background-color: #e9ecef;
}

.btn-save {
    background-color: #007bff;
    color: white;
}










.book-details .deep-edit-view {
    display: none;
}

.book-details .quick-edit-view {
    display: block;
}


.book-details.deep-edit-mode .deep-edit-view {
    display: block;
}

.book-details.deep-edit-mode .quick-edit-view {
    display: none;
}


.deep-edit-view .form-group {
    margin-bottom: 1rem;
}

.deep-edit-view label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.deep-edit-view input[type="text"],
.deep-edit-view input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}



.details-actions {
    position: absolute;
    
    bottom: 20px;
    left: 30px;
    display: flex;
    gap: 10px;
}

.details-action-btn {
    background: none;
    border: 1px solid #3B1977;
    color: #3B1977;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8em;
}

.details-action-btn:hover {
    background-color: #3B1977;
    color: white;
}

.deep-edit-view .form-group {
    margin-bottom: 1rem;
}



.deep-edit-view input[type="text"],
.deep-edit-view input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}


.deep-edit-view .choices {
    margin-bottom: 0;
}

.deep-edit-view .choices__inner {
    display: flex;
    
    flex-wrap: wrap;

    font-size: 0.9em;
    border-radius: 6px;
    padding: 5px;
    
    min-height: 40px;
    
    cursor: text;
    
}


.deep-edit-view .choices__list--multiple .choices__item {
    background-color: #5e35a4;
    border: none;
    color: #ffffff;
    font-size: 0.9em;
    border-radius: 4px;
    
    margin: 3px;
    
}

.deep-edit-view .choices__list--multiple .choices__item[data-deletable] {
    padding-right: 8px;

}



.deep-edit-view .choices__input {
    flex-grow: 1;
    
    min-width: 150px;
    
    margin: 0 !important;
    
    padding: 2px !important;
    background-color: transparent !important;
    border: none !important;
}


.deep-edit-view textarea {
    
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: inherit;
}

.deep-edit-view .cover-upload-area {
    
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


.cover-upload-area {
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    position: relative;
    
}

.cover-upload-area:hover,
.cover-upload-area.is-dragover {
    background-color: #f1e9ff;
    border-color: #3B1977;
}

.cover-upload-area.has-file {
    border-style: solid;
    border-color: #28a745;
    padding: 1rem;
}

.cover-upload-area span {
    transition: opacity 0.2s ease;
}

.cover-upload-area.has-file span {
    opacity: 0;
    display: none;
}


.cover-preview {
    max-width: 100%;
    max-height: 150px;
    margin-top: 0;
    display: none;
    position: relative;
    z-index: 1;
}

.cover-upload-area.has-file .cover-preview {
    display: block;
}





.toast {
    position: fixed;
    
    bottom: 25px;
    right: 25px;

    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);

    
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    z-index: 20000;
    
}


.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.toast.success {
    background-color: #28a745;
}


.toast.error {
    background-color: #dc3545;
}



.toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}


.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}


.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e9ecef;
    
    border-radius: 20px;
    
    transition: background-color 0.4s;
    box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.1);
    
}


.slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    
    transition: transform 0.4s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    
}


input:checked+.slider {
    background-color: #3B1977;
    
}

input:checked+.slider::before {
    
    
    transform: translateX(14px);
}

.series-badge {
    display: inline-flex;
    align-self: flex-start;
    background-color: #5d00ff;
    
    color: #ffffff;
    padding: 0px 5px;
    border-radius: 4px;
    font-size: clamp(0.6rem, 3cqi, 0.8rem);
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 3px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    align-items: baseline;
    gap: 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-badge .series-en,
.series-badge .series-zh {
    display: inline;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-badge:hover {

    
    color: white;
    transform: scale(1.02) translateZ(0);
}



.series-badge .series-zh {
    font-size: 0.85em;
    

    color: inherit;
    opacity: 1;
    
    font-weight: 600;

    
}





.download-and-donor-wrapper {
    display: flex;
    align-items: flex-start;
    

    
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 51, 102, 0.2);
}

.download-title-area {
    display: flex;
    flex-direction: column;
    
    align-items: flex-start;
    

    
    flex-shrink: 0;
}


.download-title-area strong {
    white-space: nowrap;
    
    margin-right: clamp(0px, 2cqi, 9px);
}

.title-with-donor {
    display: flex;
    align-items: center;
    
    gap: 8px;
    
}


.title-with-donor h3 {
    margin-bottom: 0;
}


.book-details .title-with-donor {
    margin-bottom: 18px;
}


.results-grid.compact-view .book-details .title-with-donor {
    margin-bottom: 0px;
}


.title-with-donor .donor-info-icon {
    flex-shrink: 0;
}


.donor-info-icon {
    position: relative;
    display: flex;
    align-items: center;
    color: #6c757d;
    padding: 0 0px;
    
}

.donor-info-icon img,
body.sidebar-collapsed .results-grid.compact-view .donor-info-icon img {
    height: 30px;
    
    width: 27px;
    
    cursor: help;

}

.results-grid.compact-view .donor-info-icon img {

    
    height: 25px;
    width: 22.5px;
    
}

body.sidebar-collapsed .donor-info-icon img {
    height: 35px;
    
    width: 31.5px;


}


.donor-info-icon::before {
    content: attr(data-tooltip);
    position: absolute;
    
    top: 125%;
    right: 0%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    background-color: #f1e9ff;
    color: #3B1977;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: pre-line;
    width: max-content;
    max-width: 500px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    transform: translateY(-5px);
    
}


.donor-info-icon::after {
    content: '';
    position: absolute;
    
    top: 95%;
    left: 20%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    
    border-color: transparent transparent #f1e9ff transparent;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    transform: translateY(-5px);
}



.donor-info-icon:hover::before,
.donor-info-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateZ(0);
}




.sidebar-toggle-pill {
    position: absolute;
    top: 125px;
    left: clamp(138px, 12.6vw, 208px);

    align-items: center;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    height: 45px;
    border-radius: 25px;
    width: 45px;
    transition: left 0.5s cubic-bezier(0.24, 0, 0.24, 1),
        width 0.5s ease,
        margin-left 0.5s cubic-bezier(0.76, 0, 0.24, 1),
        transform 0.2s ease,
        box-shadow 0.3s ease;


}

.sidebar-toggle-pill:hover {
    transform: scale(1.03) translateZ(0);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.sidebar-toggle-pill .icon-logo {
    width: 36px;
    height: 32px;
}

.toggle-logo-wrapper {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-left: 4px;
    margin-top: 0px;
    transition: margin-left 0.5s cubic-bezier(0.76, 0, 0.24, 1),
        margin-top 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

body.sidebar-collapsed .toggle-logo-wrapper {
    margin-left: 6px;
    margin-top: 3px;
}

body.sidebar-collapsed .sidebar-toggle-pill {
    left: 160px;
    width: 110px;
}

body.sidebar-collapsed .icon-paths>path {
    transform: none;
    opacity: 1;
}

.toggle-text-wrapper {
    display: flex;
    flex-direction: column;
    color: #3B1977;
    margin-left: 8px;
    margin-bottom: 2px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;

    transform: translateX(-10px);
    white-space: nowrap;
    overflow: hidden;
}

body.sidebar-collapsed .toggle-text-wrapper {
    opacity: 1;
    transform: translateX(0);
}

.toggle-text-wrapper .text-en {
    font-size: 1.2rem;
    font-weight: 700;
}

.toggle-text-wrapper .text-zh {
    font-size: 0.7rem;
    font-weight: 600;
}

.icon-paths>path {
    transition: transform 0.7s cubic-bezier(0.24, 0, 0.24, 1);
    transform-origin: 265px 279px;
}

.logo-pupil {
    transform: translate(-200px, 280px) rotate(30deg);
}

.logo-eyelid-fade {

    transform: translate(-25px, -60px) rotate(80deg);
}

.logo-lash-top {
    transform: translate(-25px, -60px) rotate(80deg);
}

.logo-lash-bottom {
    transform: translate(-65px, 145px) rotate(90deg);
}

.logo-eyelid-main {
    transform: translate(-20px, -60px) rotate(35deg);
}

body.sidebar-collapsed .icon-paths>path {
    transform: none;
}

@keyframes pupilWiggle {


    0%,
    100% {
        transform: translate(-200px, 280px) rotate(30deg);
    }

    20% {
        transform: translate(-125px, 275px) rotate(25deg);
    }

    45% {
        transform: translate(-140px, 290px) rotate(35deg);
    }

    60% {
        transform: translate(-210px, 270px) rotate(30deg);
    }

    85% {
        transform: translate(-160px, 300px) rotate(25deg);
    }


}

body:not(.sidebar-collapsed) .sidebar-toggle-pill:hover .logo-pupil {
    animation: pupilWiggle 2s infinite cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}





.hero-section {
    text-align: center;
    padding: 1rem 1rem 2rem 1rem;
}

.admin-actions {
    font-size: 1.1rem;
    color: #3B1977;

    font-weight: 700;
}

.hero-section h1 {
    font-size: 2.5rem;
    color: #3B1977;
    margin-bottom: 1rem;
    font-weight: 700;
}


#interactive-homepage {
    width: 100%;
    aspect-ratio: 16 / 12;
    margin: 0 auto 0rem auto;
    position: relative;
    background: #fdfdfd;
    border-radius: 25px;
    overflow: hidden;
    container-type: inline-size;

}


.discipline-panel {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: clip-path 0.8s cubic-bezier(0.76, 0, 0.24, 1);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    
    will-change: opacity;
    will-change: clip-path;
    
    transform: translateZ(0);
}




@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.discipline-panel .bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    will-change: transform, filter;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6) contrast(1.1);
    transition: transform 0.8s ease, opacity 0.5s ease, filter 0.5s ease;
}

.discipline-panel:hover .bg-image {
    transform: scale(1.03) translateZ(0);
    filter: brightness(0.75) contrast(1.1);
}

.discipline-panel .title {
    position: absolute;
    z-index: 4;
    color: white;
    font-size: 2.9cqi;
    font-weight: bold;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9);
    transition: opacity 0.5s ease, top 0.8s cubic-bezier(0.76, 0, 0.24, 1), bottom 0.8s cubic-bezier(0.76, 0, 0.24, 1);
    pointer-events: none;
    
    top: var(--title-top, auto);
    left: var(--title-left, auto);
    bottom: var(--title-bottom, auto);
    right: var(--title-right, auto);
    padding: 1.47cqi 2.75cqi;
}

.panel-content-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    
    height: 100%;
    
}

[data-discipline="Natural Sciences"] .bg-image {
    width: 90%;
    height: 60%;
    top: 0%;
    right: 10%;
    object-position: 0% 40%;
}

[data-discipline="Engineering and Technology"] .bg-image {
    width: 80%;
    height: 60%;
    top: auto;
    right: auto;
    left: 35%;
    bottom: 40%;
    object-position: 0% 0%;
}


[data-discipline="Medical and Health Sciences"] .bg-image {
    width: 70%;
    height: 60%;
    bottom: 20%;
    right: 30%;
    top: auto;
    right: auto;
    object-position: 0% 50%;
}




[data-discipline="Agricultural and Veterinary Sciences"] .bg-image {
    object-position: 50% 30%;
    width: 70%;
    height: 60%;
    top: 20%;
    left: 30%;

    
}

[data-discipline="Humanities and the Arts"] .bg-image {
    width: 60%;
    height: 60%;
    top: 40%;
    right: 40%;
    object-position: 0% 40%;
}

[data-discipline="Social Sciences"] .bg-image {
    object-position: 50% 40%;
    width: 90%;
    height: 60%;
    top: 40%;
    left: 10%;

    
}







.discipline-panel.active .title {
    opacity: 0;
}






.panel-content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    
    
    background-color: rgba(45, 25, 80, 0.7);

    z-index: 3;
    
    opacity: 0;
    
    pointer-events: none;
    
    transition: opacity 0.7s ease;
    
}


#interactive-homepage[class^="state-"] .discipline-panel:not(.active) .panel-content-wrapper::before {
    opacity: 1;
}




#interactive-homepage[class^="state-"] .discipline-panel:not(.active) .bg-image {
    
    filter: blur(4px) brightness(0.6);
}






.subjects-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;

    pointer-events: none;
    visibility: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 2cqi;

}

.discipline-panel.active .subjects-view {
    visibility: visible;
    pointer-events: auto;
}

.subject-card-dynamic {
    opacity: 0;
    backdrop-filter: blur(5px);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);

    border-radius: 1.5cqi;
    text-decoration: none;
    font-size: 1.9cqi;
    padding: 0.7cqi 1.5cqi;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.5s ease 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    
    display: inline-flex;
    
    flex-direction: column;
    
    justify-content: center;
    
    align-items: center;
    
    text-align: center;
}

.subject-card-dynamic .subject-en {
    line-height: 1.2;
    
}


.subject-card-dynamic .subject-zh {
    font-size: 0.7em;
    
    margin-top: 3px;
    
    opacity: 0.9;
    
    font-weight: 500;
    
}

.discipline-panel.active .subject-card-dynamic {
    opacity: 1;
}

.subject-card-dynamic:hover {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}


@media (min-width: 769px) {
    [data-discipline="Engineering and Technology"] .subject-card-dynamic {
        font-size: 1.7cqi;
        padding: 0.5cqi 1.0cqi;
        border-radius: 1.4cqi;
    }



    [data-discipline="Engineering and Technology"] .subjects-view {
        
        gap: 1.4cqi;
    }

    [data-discipline="Engineering and Technology"] .subjects-view::after {
        content: "";
        flex-basis: 100%;
        
        height: 0;
        
        order: 1;
        
    }

    
    
    [data-discipline="Engineering and Technology"] .subjects-view>.subject-card-dynamic:first-child {
        order: 0;
        margin-bottom: -1.4cqi;
        
    }

    
    
    [data-discipline="Engineering and Technology"] .subjects-view>.subject-card-dynamic {
        order: 2;
        
    }

}




[data-discipline="Natural Sciences"] .subjects-view {
    padding: 8% 50% 6% 5%;
    
    justify-content: flex-start;
    align-content: flex-start;
}


[data-discipline="Engineering and Technology"] .subjects-view {
    padding: 4% 2% 6% 40%;
    justify-content: flex-end;
    align-content: flex-start;
}


[data-discipline="Medical and Health Sciences"] .subjects-view {
    padding: 5% 75% 5% 5%;
    justify-content: flex-start;
    align-content: center;
}


[data-discipline="Agricultural and Veterinary Sciences"] .subjects-view {
    padding: 5% 5% 5% 70%;
    justify-content: flex-end;
    align-content: center;
}


[data-discipline="Humanities and the Arts"] .subjects-view {
    padding: 5% 60% 8% 5%;
    justify-content: flex-start;
    align-content: flex-end;
}


[data-discipline="Social Sciences"] .subjects-view {
    padding: 6% 5% 4% 44%;
    justify-content: flex-end;
    align-content: flex-end;
}








[data-discipline="Engineering and Technology"] .title,
[data-discipline="Agricultural and Veterinary Sciences"] .title,
[data-discipline="Social Sciences"] .title {
    text-align: right;
}


[data-discipline="Natural Sciences"] {
    --title-top: 0;
    --title-left: 0;
}

[data-discipline="Medical and Health Sciences"] {
    --title-top: 35.1%;
    
    --title-left: 0;
}

[data-discipline="Humanities and the Arts"] {
    --title-top: 70.2%;
    
    --title-left: 0;
}


[data-discipline="Engineering and Technology"] {
    --title-bottom: 70.7%;
    
    --title-right: 0;
}

[data-discipline="Agricultural and Veterinary Sciences"] {
    --title-bottom: 35.6%;
    
    --title-right: 0;
}

[data-discipline="Social Sciences"] {
    --title-bottom: 0.5%;
    --title-right: 0;
}





.state-natural-sciences [data-discipline="Engineering and Technology"] {
    --title-bottom: 40.5%;
}

.state-engineering-technology [data-discipline="Natural Sciences"] {
    --title-top: 0;
}

.state-natural-sciences [data-discipline="Medical and Health Sciences"],
.state-engineering-technology [data-discipline="Medical and Health Sciences"] {
    --title-top: 65.3%;
}

.state-natural-sciences [data-discipline="Agricultural and Veterinary Sciences"],
.state-engineering-technology [data-discipline="Agricultural and Veterinary Sciences"] {
    --title-bottom: 20.5%;
}

.state-natural-sciences [data-discipline="Humanities and the Arts"],
.state-engineering-technology [data-discipline="Humanities and the Arts"] {
    --title-top: 85.3%;
}

.state-natural-sciences [data-discipline="Social Sciences"],
.state-engineering-technology [data-discipline="Social Sciences"] {
    --title-bottom: 0.5%;
}



.state-medical-health-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
    --title-bottom: 20.5%;
}

.state-agricultural-veterinary-sciences [data-discipline="Medical and Health Sciences"] {
    --title-top: 20%;
}

.state-medical-health-sciences [data-discipline="Natural Sciences"],
.state-agricultural-veterinary-sciences [data-discipline="Natural Sciences"] {
    --title-top: 0;
}

.state-medical-health-sciences [data-discipline="Engineering and Technology"],
.state-agricultural-veterinary-sciences [data-discipline="Engineering and Technology"] {
    --title-bottom: 85.8%;
}

.state-medical-health-sciences [data-discipline="Humanities and the Arts"],
.state-agricultural-veterinary-sciences [data-discipline="Humanities and the Arts"] {
    --title-top: 85.3%;
}

.state-medical-health-sciences [data-discipline="Social Sciences"],
.state-agricultural-veterinary-sciences [data-discipline="Social Sciences"] {
    --title-bottom: 0.5%;
}



.state-social-sciences [data-discipline="Humanities and the Arts"] {
    --title-top: 40%;
}

.state-humanities-the-arts [data-discipline="Social Sciences"] {
    --title-bottom: 0.5%;
}

.state-humanities-the-arts [data-discipline="Natural Sciences"],
.state-social-sciences [data-discipline="Natural Sciences"] {
    --title-top: 0;
}

.state-humanities-the-arts [data-discipline="Engineering and Technology"],
.state-social-sciences [data-discipline="Engineering and Technology"] {
    --title-bottom: 85.8%;
}

.state-humanities-the-arts [data-discipline="Medical and Health Sciences"],
.state-social-sciences [data-discipline="Medical and Health Sciences"] {
    --title-top: 20%;
}

.state-humanities-the-arts [data-discipline="Agricultural and Veterinary Sciences"],
.state-social-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
    --title-bottom: 65.8%;
}





[data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 65% 0%, 54.57% 29.8%, 0% 29.8%);
}

[data-discipline="Engineering and Technology"] {
    clip-path: polygon(70% 0%, 100% 0%, 100% 29.8%, 59.57% 29.8%);
}

[data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 35.1%, 52.715% 35.1%, 42.285% 64.9%, 0% 64.9%);
}

[data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(57.715% 35.1%, 100% 35.1%, 100% 64.9%, 47.285% 64.9%);
}

[data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 70.2%, 40.43% 70.2%, 30% 100%, 0% 100%);
}

[data-discipline="Social Sciences"] {
    clip-path: polygon(45.43% 70.2%, 100% 70.2%, 100% 100%, 35% 100%);
}


.state-natural-sciences [data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 70% 0%, 49% 60%, 0% 60%);
}

.state-natural-sciences [data-discipline="Engineering and Technology"] {
    clip-path: polygon(75% 0%, 100% 0%, 100% 60%, 54% 60%);
}

.state-natural-sciences [data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 65.3%, 47.145% 65.3%, 42% 80%, 0% 80%);
}

.state-natural-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(52.145% 65.3%, 100% 65.3%, 100% 80%, 47% 80%);
}

.state-natural-sciences [data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 85.3%, 40.145% 85.3%, 35% 100%, 0% 100%);
}

.state-natural-sciences [data-discipline="Social Sciences"] {
    clip-path: polygon(45.145% 85.3%, 100% 85.3%, 100% 100%, 40% 100%);
}


.state-engineering-technology [data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 55% 0%, 34% 60%, 0% 60%);
}

.state-engineering-technology [data-discipline="Engineering and Technology"] {
    clip-path: polygon(60% 0%, 100% 0%, 100% 60%, 39% 60%);
}

.state-engineering-technology [data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 65.3%, 32.145% 65.3%, 27% 80%, 0% 80%);
}

.state-engineering-technology [data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(37.145% 65.3%, 100% 65.3%, 100% 80%, 32% 80%);
}

.state-engineering-technology [data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 85.3%, 25.145% 85.3%, 20% 100%, 0% 100%);
}

.state-engineering-technology [data-discipline="Social Sciences"] {
    clip-path: polygon(30.145% 85.3%, 100% 85.3%, 100% 100%, 25% 100%);
}





.state-medical-health-sciences [data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 70% 0%, 64.855% 14.7%, 0% 14.7%);
}

.state-medical-health-sciences [data-discipline="Engineering and Technology"] {
    clip-path: polygon(75% 0%, 100% 0%, 100% 14.7%, 69.855% 14.7%);
}

.state-medical-health-sciences [data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 20%, 63% 20%, 42% 80%, 0% 80%);
}

.state-medical-health-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(68% 20%, 100% 20%, 100% 80%, 47% 80%);
}

.state-medical-health-sciences [data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 85.3%, 40.145% 85.3%, 35% 100%, 0% 100%);
}

.state-medical-health-sciences [data-discipline="Social Sciences"] {
    clip-path: polygon(45.145% 85.3%, 100% 85.3%, 100% 100%, 40% 100%);
}




.state-agricultural-veterinary-sciences [data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 55% 0%, 49.855% 14.7%, 0% 14.7%);
}


.state-agricultural-veterinary-sciences [data-discipline="Engineering and Technology"] {
    clip-path: polygon(60% 0%, 100% 0%, 100% 14.7%, 54.855% 14.7%);
}


.state-agricultural-veterinary-sciences [data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 20%, 48% 20%, 27% 80%, 0% 80%);
}


.state-agricultural-veterinary-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(53% 20%, 100% 20%, 100% 80%, 32% 80%);
}


.state-agricultural-veterinary-sciences [data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 85.3%, 25.145% 85.3%, 20% 100%, 0% 100%);
}


.state-agricultural-veterinary-sciences [data-discipline="Social Sciences"] {
    clip-path: polygon(30.145% 85.3%, 100% 85.3%, 100% 100%, 25% 100%);
}


.state-humanities-the-arts [data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 70% 0%, 64.855% 14.7%, 0% 14.7%);
}

.state-humanities-the-arts [data-discipline="Engineering and Technology"] {
    clip-path: polygon(75% 0%, 100% 0%, 100% 14.7%, 69.855% 14.7%);
}

.state-humanities-the-arts [data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 20%, 63% 20%, 57.855% 34.7%, 0% 34.7%);
}

.state-humanities-the-arts [data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(68% 20%, 100% 20%, 100% 34.7%, 62.855% 34.7%);
}

.state-humanities-the-arts [data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 40%, 56% 40%, 35% 100%, 0% 100%);
}

.state-humanities-the-arts [data-discipline="Social Sciences"] {
    clip-path: polygon(61% 40%, 100% 40%, 100% 100%, 40% 100%);
}


.state-social-sciences [data-discipline="Natural Sciences"] {
    clip-path: polygon(0% 0%, 55% 0%, 49.855% 14.7%, 0% 14.7%);
}

.state-social-sciences [data-discipline="Engineering and Technology"] {
    clip-path: polygon(60% 0%, 100% 0%, 100% 14.7%, 54.855% 14.7%);
}

.state-social-sciences [data-discipline="Medical and Health Sciences"] {
    clip-path: polygon(0% 20%, 48% 20%, 42.855% 34.7%, 0% 34.7%);
}

.state-social-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
    clip-path: polygon(53% 20%, 100% 20%, 100% 34.7%, 47.855% 34.7%);
}

.state-social-sciences [data-discipline="Humanities and the Arts"] {
    clip-path: polygon(0% 40%, 41% 40%, 20% 100%, 0% 100%);
}

.state-social-sciences [data-discipline="Social Sciences"] {
    clip-path: polygon(46% 40%, 100% 40%, 100% 100%, 25% 100%);
}

@media (max-width: 768px) {
    [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 65.5% 0%, 54.51% 31.4%, 0% 31.4%);
    }

    [data-discipline="Engineering and Technology"] {
        clip-path: polygon(70% 0%, 100% 0%, 100% 31.4%, 59.01% 31.4%);
    }

    [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 34.3%, 53.495% 34.3%, 42.505% 65.7%, 0% 65.7%);
    }

    [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(57.995% 34.3%, 100% 34.3%, 100% 65.7%, 47.005% 65.7%);
    }

    [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 68.6%, 41.49% 68.6%, 30.5% 100%, 0% 100%);
    }

    [data-discipline="Social Sciences"] {
        clip-path: polygon(45.99% 68.6%, 100% 68.6%, 100% 100%, 35% 100%);
    }

    
    .state-natural-sciences [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 78.485% 0%, 51.5% 77.1%, 0% 77.1%);
    }

    .state-natural-sciences [data-discipline="Engineering and Technology"] {
        clip-path: polygon(82.985% 0%, 100% 0%, 100% 77.1%, 56% 77.1%);
    }

    .state-natural-sciences [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 80%, 50.5% 80%, 47.5% 88.55%, 0% 88.55%);
    }

    .state-natural-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(55% 80%, 100% 80%, 100% 88.55%, 52% 88.55%);
    }

    .state-natural-sciences [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 91.45%, 46.5% 91.45%, 43.5% 100%, 0% 100%);
    }

    .state-natural-sciences [data-discipline="Social Sciences"] {
        clip-path: polygon(51% 91.45%, 100% 91.45%, 100% 100%, 48% 100%);
    }

    
    .state-engineering-technology [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 47.5% 0%, 20.515% 77.1%, 0% 77.1%);
    }

    .state-engineering-technology [data-discipline="Engineering and Technology"] {
        clip-path: polygon(52% 0%, 100% 0%, 100% 77.1%, 25.015% 77.1%);
    }

    .state-engineering-technology [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 80%, 50.5% 80%, 47.5% 88.55%, 0% 88.55%);
    }

    .state-engineering-technology [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(55% 80%, 100% 80%, 100% 88.55%, 52% 88.55%);
    }

    .state-engineering-technology [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 91.45%, 46.5% 91.45%, 43.5% 100%, 0% 100%);
    }

    .state-engineering-technology [data-discipline="Social Sciences"] {
        clip-path: polygon(51% 91.45%, 100% 91.45%, 100% 100%, 48% 100%);
    }

    
    .state-medical-health-sciences [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 47.5% 0%, 44.5% 8.55%, 0% 8.55%);
    }

    .state-medical-health-sciences [data-discipline="Engineering and Technology"] {
        clip-path: polygon(52% 0%, 100% 0%, 100% 8.55%, 49% 8.55%);
    }

    .state-medical-health-sciences [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 11.45%, 74.485% 11.45%, 47.5% 88.55%, 0% 88.55%);
    }

    .state-medical-health-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(78.985% 11.45%, 100% 11.45%, 100% 88.55%, 52% 88.55%);
    }

    .state-medical-health-sciences [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 91.45%, 46.5% 91.45%, 43.5% 100%, 0% 100%);
    }

    .state-medical-health-sciences [data-discipline="Social Sciences"] {
        clip-path: polygon(51% 91.45%, 100% 91.45%, 100% 100%, 48% 100%);
    }

    
    .state-agricultural-veterinary-sciences [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 47.5% 0%, 44.5% 8.55%, 0% 8.55%);
    }

    .state-agricultural-veterinary-sciences [data-discipline="Engineering and Technology"] {
        clip-path: polygon(52% 0%, 100% 0%, 100% 8.55%, 49% 8.55%);
    }

    .state-agricultural-veterinary-sciences [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 11.45%, 43.5% 11.45%, 16.515% 88.55%, 0% 88.55%);
    }

    .state-agricultural-veterinary-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(48% 11.45%, 100% 11.45%, 100% 88.55%, 21.015% 88.55%);
    }

    .state-agricultural-veterinary-sciences [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 91.45%, 46.5% 91.45%, 43.5% 100%, 0% 100%);
    }

    .state-agricultural-veterinary-sciences [data-discipline="Social Sciences"] {
        clip-path: polygon(51% 91.45%, 100% 91.45%, 100% 100%, 48% 100%);
    }

    
    .state-humanities-the-arts [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 47.5% 0%, 44.5% 8.55%, 0% 8.55%);
    }

    .state-humanities-the-arts [data-discipline="Engineering and Technology"] {
        clip-path: polygon(52% 0%, 100% 0%, 100% 8.55%, 49% 8.55%);
    }

    .state-humanities-the-arts [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 11.45%, 43.5% 11.45%, 40.5% 20%, 0% 20%);
    }

    .state-humanities-the-arts [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(48% 11.45%, 100% 11.45%, 100% 20%, 45% 20%);
    }

    .state-humanities-the-arts [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 22.9%, 70.485% 22.9%, 43.5% 100%, 0% 100%);
    }

    .state-humanities-the-arts [data-discipline="Social Sciences"] {
        clip-path: polygon(74.985% 22.9%, 100% 22.9%, 100% 100%, 48% 100%);
    }

    
    .state-social-sciences [data-discipline="Natural Sciences"] {
        clip-path: polygon(0% 0%, 47.5% 0%, 44.5% 8.55%, 0% 8.55%);
    }

    .state-social-sciences [data-discipline="Engineering and Technology"] {
        clip-path: polygon(52% 0%, 100% 0%, 100% 8.55%, 49% 8.55%);
    }

    .state-social-sciences [data-discipline="Medical and Health Sciences"] {
        clip-path: polygon(0% 11.45%, 43.5% 11.45%, 40.5% 20%, 0% 20%);
    }

    .state-social-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
        clip-path: polygon(48% 11.45%, 100% 11.45%, 100% 20%, 45% 20%);
    }

    .state-social-sciences [data-discipline="Humanities and the Arts"] {
        clip-path: polygon(0% 22.9%, 39.5% 22.9%, 12.515% 100%, 0% 100%);
    }

    .state-social-sciences [data-discipline="Social Sciences"] {
        clip-path: polygon(44% 22.9%, 100% 22.9%, 100% 100%, 17.015% 100%);
    }


    [data-discipline="Engineering and Technology"] .title,
    [data-discipline="Agricultural and Veterinary Sciences"] .title,
    [data-discipline="Social Sciences"] .title {
        text-align: right;
    }

    
    [data-discipline="Natural Sciences"] {
        --title-top: 0;
        --title-left: 0;
    }

    [data-discipline="Medical and Health Sciences"] {
        --title-top: 34.3%;
        
        --title-left: 0;
    }

    [data-discipline="Humanities and the Arts"] {
        --title-top: 68.6%;
        
        --title-left: 0;
    }

    
    [data-discipline="Engineering and Technology"] {
        --title-bottom: 69.2%;
        
        --title-right: 0;
    }

    [data-discipline="Agricultural and Veterinary Sciences"] {
        --title-bottom: 34.9%;
        
        --title-right: 0;
    }

    [data-discipline="Social Sciences"] {
        --title-bottom: 0.6%;
        --title-right: 0;
    }

    @supports (-webkit-touch-callout: none) {
        [data-discipline="Natural Sciences"] {
            --title-top: 0.3%;
            --title-left: 0;
        }

        [data-discipline="Medical and Health Sciences"] {
            --title-top: 34.6%;
            
            --title-left: 0;
        }

        [data-discipline="Humanities and the Arts"] {
            --title-top: 68.9%;
            
            --title-left: 0;
        }


    }

    .state-natural-sciences [data-discipline="Engineering and Technology"] {
        --title-bottom: 23.5%;
    }

    .state-engineering-technology [data-discipline="Natural Sciences"] {
        --title-top: 0;
    }

    .state-natural-sciences [data-discipline="Medical and Health Sciences"],
    .state-engineering-technology [data-discipline="Medical and Health Sciences"] {
        --title-top: 80.1%;
    }

    .state-natural-sciences [data-discipline="Agricultural and Veterinary Sciences"],
    .state-engineering-technology [data-discipline="Agricultural and Veterinary Sciences"] {
        --title-bottom: 11.9%;
    }

    .state-natural-sciences [data-discipline="Humanities and the Arts"],
    .state-engineering-technology [data-discipline="Humanities and the Arts"] {
        --title-top: 91.45%;
    }

    .state-natural-sciences [data-discipline="Social Sciences"],
    .state-engineering-technology [data-discipline="Social Sciences"] {
        --title-bottom: 0.6%;
    }

    @supports (-webkit-touch-callout: none) {

        .state-natural-sciences [data-discipline="Medical and Health Sciences"],
        .state-engineering-technology [data-discipline="Medical and Health Sciences"] {
            --title-top: 80.4%;
        }

        .state-natural-sciences [data-discipline="Humanities and the Arts"],
        .state-engineering-technology [data-discipline="Humanities and the Arts"] {
            --title-top: 91.75%;
        }
    }

    
    .state-medical-health-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
        --title-bottom: 11.9%;
    }

    .state-agricultural-veterinary-sciences [data-discipline="Medical and Health Sciences"] {
        --title-top: 11.45%;
    }

    .state-medical-health-sciences [data-discipline="Natural Sciences"],
    .state-agricultural-veterinary-sciences [data-discipline="Natural Sciences"] {
        --title-top: 0;
    }

    .state-medical-health-sciences [data-discipline="Engineering and Technology"],
    .state-agricultural-veterinary-sciences [data-discipline="Engineering and Technology"] {
        --title-bottom: calc(100% - 8%);
    }

    .state-medical-health-sciences [data-discipline="Humanities and the Arts"],
    .state-agricultural-veterinary-sciences [data-discipline="Humanities and the Arts"] {
        --title-top: 91.45%;
    }

    .state-medical-health-sciences [data-discipline="Social Sciences"],
    .state-agricultural-veterinary-sciences [data-discipline="Social Sciences"] {
        --title-bottom: 0.6%;
    }

    @supports (-webkit-touch-callout: none) {

        .state-medical-health-sciences [data-discipline="Natural Sciences"],
        .state-agricultural-veterinary-sciences [data-discipline="Natural Sciences"] {
            --title-top: 0.3%;
        }

        .state-medical-health-sciences [data-discipline="Humanities and the Arts"],
        .state-agricultural-veterinary-sciences [data-discipline="Humanities and the Arts"] {
            --title-top: 91.75%;
        }
    }

    
    .state-social-sciences [data-discipline="Humanities and the Arts"] {
        --title-top: 23%;
    }

    .state-humanities-the-arts [data-discipline="Social Sciences"] {
        --title-bottom: 0.6%;
    }

    .state-humanities-the-arts [data-discipline="Natural Sciences"],
    .state-social-sciences [data-discipline="Natural Sciences"] {
        --title-top: 0;
    }

    .state-humanities-the-arts [data-discipline="Engineering and Technology"],
    .state-social-sciences [data-discipline="Engineering and Technology"] {
        --title-bottom: calc(100% - 8%);
    }

    .state-humanities-the-arts [data-discipline="Medical and Health Sciences"],
    .state-social-sciences [data-discipline="Medical and Health Sciences"] {
        --title-top: 11.45%;
    }

    .state-humanities-the-arts [data-discipline="Agricultural and Veterinary Sciences"],
    .state-social-sciences [data-discipline="Agricultural and Veterinary Sciences"] {
        --title-bottom: calc(100% - 19.5%);
    }

    @supports (-webkit-touch-callout: none) {

        .state-humanities-the-arts [data-discipline="Natural Sciences"],
        .state-social-sciences [data-discipline="Natural Sciences"] {
            --title-top: 0.3%;
        }

        .state-humanities-the-arts [data-discipline="Medical and Health Sciences"],
        .state-social-sciences [data-discipline="Medical and Health Sciences"] {
            --title-top: 11.75%;
        }
    }

    [data-discipline="Natural Sciences"] .bg-image {
        width: 90%;
        height: 80%;
        top: 0%;
        right: 10%;
        object-position: 0% 40%;
    }

    [data-discipline="Engineering and Technology"] .bg-image {
        width: 100%;
        height: 80%;
        top: auto;
        right: auto;
        left: 0%;
        bottom: 20%;
        object-position: 0% 0%;
    }

    [data-discipline="Medical and Health Sciences"] .bg-image {
        width: 100%;
        height: 80%;
        bottom: 10%;
        right: 0%;
        top: auto;
        right: auto;
        object-position: 90% 20%;
        
    }

    [data-discipline="Agricultural and Veterinary Sciences"] .bg-image {
        object-position: 40% 30%;
        width: 80%;
        height: 80%;
        top: 10%;
        left: 20%;

        
    }

    [data-discipline="Humanities and the Arts"] .bg-image {
        width: 100%;
        height: 80%;
        top: 20%;
        right: 0%;
        object-position: 0% 40%;
        
    }

    [data-discipline="Social Sciences"] .bg-image {
        object-position: 50% 40%;
        width: 100%;
        height: 80%;
        top: 20%;

        
    }
}

.year-badge.status-blue,
.status-dot.status-blue {
    background-color: #0d6efd;
    
}


.admin-quick-filter-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
}

.admin-quick-filter-btn:hover {
    background-color: #e9ecef;
}


.admin-quick-filter-btn.active {
    background-color: #3B1977;
    
    color: white;
    border-color: #3B1977;
}

.featured-control-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    
}

.featured-control-inline h3 {
    margin: 0;
    font-size: 1rem;
    
    font-weight: 600;
    color: #666;
}

@media (max-width: 768px) {

    .hero-section {
        text-align: center;
        padding: 0.4rem 1rem 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 7vw;
        margin-bottom: 0rem;
    }

    
    #interactive-homepage {
        border-radius: 10px;
        aspect-ratio: 2 / 3;
    }

    
    .discipline-panel .title {
        font-size: 4vw;
        
        line-height: 1.1;
        
        padding: 1vw 2vw;
        
    }

    
    .subjects-view {
        gap: 1.8vw;
        row-gap: 4vw;
        
    }

    .subject-card-dynamic {
        font-size: 4.5vw;
        
        padding: 0.8vw 1.5vw;
        border-radius: 11px;
    }

    .subject-card-dynamic .subject-zh {
        font-size: 0.65em;
        margin-top: 2px;
    }

    [data-discipline="Humanities and the Arts"] .subjects-view,
    [data-discipline="Natural Sciences"] .subjects-view {
        row-gap: 3.5vw;
    }

    [data-discipline="Humanities and the Arts"] .subject-card-dynamic,
    [data-discipline="Natural Sciences"] .subject-card-dynamic {
        font-size: 3.9vw;
        border-radius: 10px;
    }

    [data-discipline="Humanities and the Arts"] .subject-card-dynamic .subject-zh,
    [data-discipline="Natural Sciences"] .subject-card-dynamic .subject-zh {
        font-size: 0.7em;
    }

    [data-discipline="Engineering and Technology"] .subject-card-dynamic {
        font-size: 3.2vw;
        border-radius: 8px;
        
        padding: 0.8vw 1.4vw;
    }

    [data-discipline="Engineering and Technology"] .subject-card-dynamic .subject-zh {
        font-size: 0.8em;
    }

    [data-discipline="Engineering and Technology"] .subjects-view {
        gap: 2.2vw;
        
    }


    [data-discipline="Social Sciences"] .subject-card-dynamic {
        font-size: 3.6vw;
        border-radius: 9px;
        padding: 0.8vw 1.5vw;
    }

    [data-discipline="Social Sciences"] .subject-card-dynamic .subject-zh {
        font-size: 0.75em;
    }



    [data-discipline="Natural Sciences"] .subjects-view {
        padding: 9% 40% 6% 4%;
    }

    [data-discipline="Engineering and Technology"] .subjects-view {
        padding: 7% 4% 6% 30%;
    }

    [data-discipline="Medical and Health Sciences"] .subjects-view {
        padding: 5% 50% 5% 4%;
    }

    [data-discipline="Agricultural and Veterinary Sciences"] .subjects-view {
        padding: 5% 4% 5% 45%;
    }

    [data-discipline="Humanities and the Arts"] .subjects-view {
        padding: 6% 30% 20% 4%;
    }

    [data-discipline="Social Sciences"] .subjects-view {
        padding: 6% 4% 2.5% 34%;
    }

    @supports (-webkit-touch-callout: none) {

        
        [data-discipline="Natural Sciences"] .subjects-view {
            padding: 8% 40% 6% 4%;
        }

        
        [data-discipline="Engineering and Technology"] .subject-card-dynamic {
            font-size: 3vw;
        }

        [data-discipline="Engineering and Technology"] .subject-card-dynamic .subject-zh {
            font-size: 0.82em;
        }

        [data-discipline="Engineering and Technology"] .subjects-view {
            padding: 9% 4% 6% 30%;
        }

        [data-discipline="Social Sciences"] .subject-card-dynamic {
            font-size: 3.5vw;
        }

        [data-discipline="Social Sciences"] .subject-card-dynamic .subject-zh {
            font-size: 0.76em;
        }

        [data-discipline="Social Sciences"] .subjects-view {
            padding: 6% 4% 2.5% 34%;
        }
    }
}

.mobile-break {
    display: none;
}


@media (max-width: 768px) {
    .mobile-break {
        display: inline;
    }
}

.mobile-flex-break {
    display: none;
}


@media (max-width: 768px) {
    .mobile-flex-break {
        display: block;
        width: 100%;
        
        height: 0;
        
        content: "";
    }

    [data-discipline="Engineering and Technology"] .subjects-view,
    [data-discipline="Social Sciences"] .subjects-view {
        row-gap: 0 !important;
        
    }

    [data-discipline="Engineering and Technology"] .subject-card-dynamic {
        margin-bottom: 3vw;
    }

    [data-discipline="Social Sciences"] .subject-card-dynamic {
        margin-bottom: 2.1vw;
    }
}


.mobile-nav-trigger,
.mobile-search-trigger {
    display: none;
    
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    color: #3B1977;
}


@media (max-width: 768px) {

    
    .mobile-search-trigger {
        padding: 8px;
        
        margin-top: 3px;
        margin-right: 4px;
        
    }

    .mobile-nav-trigger {
        margin-right: -9px;
        
    }

    
    .mobile-search-trigger svg {
        width: 22px;
        
        height: 22px;
        
    }
}

.mobile-nav-trigger .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #3B1977;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}


@media (max-width: 768px) {
    .header-content {
        grid-template-columns: auto 1fr auto auto;
        
        gap: 15px;
        width: 90%;
        padding-top: 6px;
        padding-bottom: 6px;
        min-height: 60px;

        
        align-items: center;
    }

    .logo a img {
        
        height: 40px;
    }

    
    .search-bar {
        display: none;
    }

    
    .mobile-nav-trigger,
    .mobile-search-trigger {
        display: block;
    }

    .logo {
        grid-column: 1;
    }

    .mobile-search-trigger {
        grid-column: 3;
    }

    .mobile-nav-trigger {
        grid-column: 4;
    }
}

@media (max-width: 768px) {

    
    nav {
        
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;

        
        gap: 0 !important;
        padding: 0 !important;

        
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fdfdfd;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
        z-index: 1002;

        
        max-height: 0;
        opacity: 0;
        overflow-y: auto;
        overflow-x: hidden;
        visibility: hidden;

    }

    
    
    .mobile-nav-active nav {
        position: fixed;
        top: 60px;
        
        z-index: 1002;
        
        max-height: calc(100vh - 60px);
        
        max-height: calc(100dvh - 60px);
        

        opacity: 1;
        visibility: visible;
        overflow-y: auto;
        
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease,
            visibility 0s;
    }

    header:has(.mobile-nav-active) {
        z-index: 1002;
    }

    
    nav .nav-item {
        width: 100%;
        margin: 0;
    }

    nav .nav-item>a {
        
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;

        
        padding: 24px 6vw !important;

        text-decoration: none;
        color: #3B1977;
        font-size: clamp(15px, 5vw, 22px);
        font-weight: 700;
        box-sizing: border-box;
    }

    
    
    nav .nav-item:first-child>a {
        padding-top: 25px !important;
        
    }

    nav .nav-item:last-child>a,
    nav>.nav-item:last-of-type>a {
        padding-bottom: 25px !important;
        
    }

    nav .nav-arrow svg {
        width: 16px;
        height: 16px;
    }

    .dropdown-content {
        
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        transform: none !important;
        background-color: #fdfdfd;
        
        display: block !important;
        
        max-height: 0;
        overflow: hidden;
        opacity: 0;

        transition:
            max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease-out,
            visibility 0s linear 0.4s;

        padding-left: 6vw;
        padding-right: 6vw;
        
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    
    .dropdown.open .dropdown-content {
        
        max-height: 2000px;
        opacity: 1;

        
        padding-top: 0px !important;
        padding-bottom: 10px !important;
        transition:
            max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            padding-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.3s ease-in,
            visibility 0s;
    }

    .discipline-list>li .subject-list {
        display: block !important;
        
        max-height: 0;
        overflow: hidden;
        opacity: 0;

        
        padding-left: 10px;
        margin-top: 0;

        
        transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    }

    
    .discipline-list>li.active>.subject-list {
        
        max-height: 1200px;
        opacity: 1;
        margin-top: 10px;
        
    }

    
    .discipline-list {
        border-right: none !important;
        border: none !important;
        
        width: 100% !important;
        
    }

    .discipline-name {
        font-weight: 700;
        font-size: clamp(12px, 4.2vw, 18px);
    }

    .dropdown-content .simple-list li a {
        font-weight: 700;
        font-size: clamp(12px, 4.2vw, 18px);
    }

    .mobile-nav-active .dropdown-content .discipline-list,
    .mobile-nav-active .dropdown-content .subject-list-container {
        flex: none;
        width: 100%;
        border: none;
        padding: 0;
    }

    
    .mobile-nav-active .mobile-nav-trigger .icon-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-nav-active .mobile-nav-trigger .icon-bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-active .mobile-nav-trigger .icon-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .discipline-list li a,
    .discipline-list li.active a,
    .discipline-list li:hover a,
    .subject-list li a,
    .simple-list li a,
    
    .simple-list li a:hover {
        background-color: transparent !important;
        
        color: #3B1977 !important;
        
    }

    
    
    .discipline-list li.active>a {
        background-color: transparent !important;
    }

    
    .discipline-list li a::after {
        display: none !important;
        content: none !important;
    }

    .discipline-list li a,
    .dropdown-content .simple-list li a,
    .subject-list li a {
        white-space: normal !important;
        
        height: auto !important;
    }

    .discipline-list li a {
        padding-right: 0;
    }

    
    
    .subject-list .subject-en,
    .subject-list .subject-zh {
        display: block;
        
        width: 100%;
        
        white-space: normal;
        
    }
}

@media (max-width: 768px) {

    .header-content.mobile-search-active .logo,
    .header-content.mobile-search-active .mobile-search-trigger {
        display: none;
    }

    .header-content.mobile-search-active .search-bar {
        display: flex;
        grid-column: 1 / 4;
        
    }

    
    .header-content.mobile-search-active .mobile-nav-trigger .icon-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .header-content.mobile-search-active .mobile-nav-trigger .icon-bar:nth-child(2) {
        opacity: 0;
    }

    .header-content.mobile-search-active .mobile-nav-trigger .icon-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    
    .header-content.mobile-search-active.mobile-nav-active nav {
        display: none;
    }

    .header-content.mobile-search-active .search-container {
        width: 100%;
        
        margin: 0 auto;
        
    }

    
    .header-content.mobile-search-active .search-button {
        color: #3B1977;
        
    }

    .header-content.mobile-search-active .search-button svg {
        
        width: 22px;
        
        height: 22px;
        
    }

    
    
    .header-content.mobile-search-active .search-container input {
        padding-right: 50px;
        
    }

    .header-content.mobile-search-active .search-container input {
        padding-left: 12px;
        
    }

    
    
    .header-content.mobile-search-active .search-container input::-webkit-input-placeholder {
        
        font-size: 0.85rem;
        
    }

    .header-content.mobile-search-active .search-container input:-ms-input-placeholder {
        
        font-size: 0.85rem;
    }

    .header-content.mobile-search-active .search-container input::placeholder {
        
        font-size: 0.85rem;
    }

    .header-content.mobile-search-active .search-container input[type="search"] {
        padding-right: 40px;
        

        
    }

    
    
    .header-content.mobile-search-active .search-container input[type="search"]:placeholder-shown {
        padding-right: 10px;
        
    }

    .header-content.mobile-search-active .search-container input[type="search"]::-webkit-search-cancel-button {

        
        -webkit-appearance: none;

        
        
        background-image: url("/public/images/clear.svg");

        
        width: 18px;
        
        height: 18px;
        

        
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        

        
        cursor: pointer;

        margin-left: 10px;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }


}




input[type="search"]::-webkit-search-cancel-button {

    
    -webkit-appearance: none;
    appearance: none;

    
    background-image: url("/public/images/clear.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    

    
    width: 18px;
    
    height: 18px;

    
    
    cursor: pointer;
    margin-left: 10px;
    

    box-sizing: content-box;

    
    
}




.search-container input {
    
    padding-right: 40px;
}






@media (max-width: 768px) {

    
    
    .mobile-nav-active nav .nav-item {
        margin: 0;
    }

    
    .mobile-nav-active nav {
        gap: 0;
    }

    
    
    .mobile-nav-active nav .nav-item>a {
        
        padding: 20px 25px;
        
    }

    .mobile-nav-active nav .dropdown>a {
        
        padding-bottom: 20px !important;
    }

    
    
    .mobile-nav-active nav .dropdown-content {
        
        padding-top: 0px;
    }

    .mobile-nav-active nav .dropdown>a:hover {
        color: #3B1977;
        
        background-color: transparent;
        
    }

    
    
    .mobile-nav-active nav .dropdown.open>a {
        color: #5d00ff;
        
    }


}


@media (max-width: 768px) {

    
    .mobile-nav-active .subject-list-container {
        display: none;
    }

    .discipline-list>li>a,
    .simple-list li a {
        
        
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        padding-left: 16px !important;
    }

    
    .discipline-list>li.active>.subject-list {
        margin-top: 5px;
        
    }

    .subject-list li a {
        
        padding-top: 6px !important;
        padding-bottom: 16px !important;
        padding-left: 16px !important;
    }

    
    .mobile-nav-active .discipline-list>li.active>a,
    .mobile-nav-active .discipline-list>li>a:hover {
        background-color: transparent;
    }

    
    .mobile-nav-active .discipline-list>li>a::after {
        content: none;
    }

    
    .mobile-nav-active .discipline-list>li>a .nav-arrow svg {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
        transform: rotate(0deg);
        
    }

    .discipline-list>li>a .nav-arrow {
        
        width: 16px;
        height: 16px;

        
        display: flex;
        align-items: center;
        justify-content: center;
        
        margin-top: 0;
        margin-left: auto;
        
        margin-right: 0px;

    }

    
    
    .dropdown-content .nav-arrow {
        transform: none !important;
    }

    
    
    .discipline-list>li>a .nav-arrow svg {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
        transform: rotate(0deg);
        
    }

    
    
    .discipline-list>li.active>a .nav-arrow svg {
        transform: rotate(180deg);
    }

    

    
    .mobile-nav-active .discipline-list>li .subject-list {
        display: none;
    }

    
    .mobile-nav-active .discipline-list>li.active>.subject-list {
        display: block;
    }

    
    .mobile-nav-active .discipline-list>li.active .subject-list li a,
    .mobile-nav-active .subject-list li a:hover {
        background-color: transparent;
        
        color: #495057;
    }

    
    .mobile-nav-active .subject-list li a::after {
        content: none !important;
        display: none !important;
    }
}


@media (max-width: 768px) {
    .results-count {
        font-size: 0.9rem;
        
    }

    .select-selected {
        font-size: 0.9rem;
    }

    .select-items div {
        font-size: 0.9rem;
    }

    .results-per-page-select .select-selected {
        width: 56px;
    }

    .sort-by-select .select-selected {
        width: 110px;
    }

    .availability-item .year-value {
        font-weight: 600;
        
    }

    
    .edition-text>span:first-child {
        font-weight: 600;
        
    }

    .results-header .title h1 {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }

    .results-header .title p {
        font-size: 1.2rem;
    }

    
    .main-content {
        grid-template-columns: 1fr;
        
        gap: 20px;
        width: 90%;
    }

    .pagination-controls {
        
        gap: clamp(4px, 1.5vw, 10px);
        row-gap: 10px;
        margin-top: 35px;
    }

    .pagination-controls .page-link,
    .pagination-controls .prev-next {
        
        
        min-width: 2rem;
        
        height: 2rem;
        

        padding: 0 0.5rem;
        

        
        border-radius: 0.75rem;
        
        font-size: 0.9rem;
    }

    .pagination-controls .prev-next {
        
        font-size: clamp(1.0rem, 3vw, 1.2rem);
        padding-bottom: 3px;
    }

    .pagination-controls .ellipsis {
        
        height: clamp(30px, 8.5vw, 38px);
        padding: 0 4px;
    }

    .modal-backdrop,
    .modal-close-btn,
    .mobile-filter-fab {
        -webkit-tap-highlight-color: transparent;
        
        outline: none;
        
    }


    .filter-controls {
        gap: 8px;
        
    }

    
    #sidebar-toggle-btn,
    .controls-wrapper .view-toggle {
        display: none;
    }

    .results-area {
        width: 100%;
    }

    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        
        column-gap: 2vw;
        row-gap: 8vw !important;
    }

    .results-grid.compact-view {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    
    .book-item:hover {
        transform: none;
        box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12), 0px 8px 16px 0px rgba(0, 0, 0, 0.16);
        z-index: 1;
    }


    .book-cover-wrapper img,
    .no-cover-placeholder {
        height: 48vw !important;
    }

    


    .mobile-filter-fab span {
        font-size: 0.7rem;
        margin-top: 2px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background-color: #fdfdfd;
        z-index: 1003;
        margin-top: 0;
        transform: translateX(-100%);
        
        transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1);
        overflow-y: auto;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px 10px 20px;
        margin-bottom: 0;
        border-bottom: 1px solid #e0e0e0;

        
        position: -webkit-sticky;
        
        position: sticky;
        top: 0;
        
        background-color: #fdfdfd;
        
        z-index: 4;
        
        
    }

    .sidebar-title {
        font-size: 1.4rem;
        
        font-weight: 700;
        
        color: #3B1977;
        
    }

    .sidebar-close-btn {
        
        position: relative;
        width: 40px;
        
        height: 40px;
        
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        margin-right: -3px;
        
        font-size: 0;
        color: transparent;
    }

    
    .sidebar-close-btn::before,
    .sidebar-close-btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;

        
        width: 24px;
        
        height: 2px;
        

        background-color: #888;
        
        border-radius: 2px;
        
        transition: background-color 0.2s ease, transform 0.2s ease;
    }

    
    .sidebar-close-btn::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    
    .sidebar-close-btn::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }



    .featured-control h3 {
        margin-bottom: 10px;
    }

    .sidebar .collapsible-header {
        position: -webkit-sticky;
        position: sticky;

        
        
        top: 60px;
        

        background-color: #fdfdfd;
        z-index: 2;
        
        padding-top: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f0f0;
    }

    .sidebar-content {
        padding: 20px;
        
    }

    .sidebar .collapsible-content li:hover,
    .sidebar .collapsible-content li:active,
    .sidebar .collapsible-content li:focus {
        background-color: transparent !important;
        
    }

    
    .custom-checkbox {
        -webkit-tap-highlight-color: transparent;
    }

    
    body.mobile-filters-active .sidebar {
        transform: translateX(0);
    }

    
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        
        background-color: rgba(0, 0, 0, 0.5);

        
        z-index: 1002;

        
        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        
        transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
            visibility 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
            backdrop-filter 0.4s ease;
        

        
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }

    
    body.mobile-filters-active::after {
        
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    
    .mini-sort-controls {
        margin-top: 2px;
    }

}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}



.book-modal {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%);
    width: 90vw;
    max-width: 1000px;
    max-height: 40vh;
    z-index: 1051;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(60px) saturate(1000%);
    -webkit-backdrop-filter: blur(60px) saturate(1000%);
    border-radius: 8px;
}


.modal-backdrop.active,
.book-modal.active {
    opacity: 1;
    visibility: visible;
}

.book-modal.active {
    transform: translate(-50%);
}

.modal-backdrop.active {
    transition: opacity 0.3s ease;
}

.book-modal.active {
    transition: opacity 0.3s ease, transform 0.3s ease;
}


.modal-close-btn {
    
    position: absolute;
    top: auto;
    
    right: auto;
    
    bottom: -60px;
    
    left: 50%;
    
    transform: translateX(-50%);
    

    
    width: 44px;
    height: 44px;
    border-radius: 50%;
    
    border: none;
    cursor: pointer;

    
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    

    
    display: flex;
    align-items: center;
    justify-content: center;


    
    transition: transform 0.2s ease, background-color 0.2s ease;
    font-size: 0;
}

.modal-close-btn::before,
.modal-close-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;

    
    width: 20px;
    
    height: 2.5px;
    

    
    background-color: #3B1977;
    border-radius: 2px;

}


.modal-close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}


.modal-close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.book-modal .title-with-donor {
    margin-bottom: 0px;
}

.book-modal .year-badge {
    display: none !important;
}


.modal-content {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 36vh;
}

.modal-cover {
    display: flex;
    justify-content: center;
    

    
    width: auto;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    
}


.modal-cover img,
.modal-cover .no-cover-placeholder {
    
    height: 40vh;
    width: auto;

    
    display: block;
    
    border-radius: 8px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.15);

    
    max-width: 90vw;
}


.modal-details {
    padding: 20px;
    padding-top: 0px;
    padding-bottom: 15px;
    margin-top: 5px;
    overflow-y: auto;
    color: #2c3e50;
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: hidden;
}

#modal-details-container>.book-details {
    margin-top: 10px;
}

.modal-details h3 {
    font-size: 1.1rem;
    
    line-height: 1.4;
    
    margin-bottom: 12px;
    
}

.modal-details .detail-group,
.modal-details strong {
    
}

.modal-details .availability-item .icon-help::before,
.user-page .book-details .availability-item .icon-help::before {
    left: auto;
    
    right: 0;
    
    transform: translateX(0);
    
}


.modal-details .availability-item .icon-help::after {
    left: auto;
    
    right: 21px;
    
    transform: none;
    
}

.modal-details .availability-item {
    padding-right: 0px;
}

.modal-details .availability {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    margin-bottom: 8px;
}

.modal-details .download-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 15px;
}

.modal-details .download-row:last-child {
    padding-bottom: 0;
}

.modal-details .icon-group {
    display: flex;
    gap: 2vw;
    justify-content: flex-end;
}

.mobile-filter-fab {
    display: none;
    
}

.modal-details .download-title-area strong {
    display: none;
}






.book-modal {
    overflow: visible;
    
}


.modal-content {
    overflow: visible;
    
    position: relative;
    
}


.modal-cover {
    margin-top: -35vh;

    
    position: relative;
    
    z-index: 2;
    
}




.modal-details {
    position: relative;
    z-index: 1;
}



@media (max-width: 768px) {

    
    .modal-details .download-title-area {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .modal-details .download-section {
        display: block;
        padding-top: 0px;
    }

    
    .modal-details .download-rows-container {
        display: block;
        margin-top: 10px;
        
    }

    
    .modal-details .download-row {
        display: grid;
        
        grid-template-columns: 1fr auto;
        
        align-items: center;
        gap: 0px;
        
        padding-bottom: 10px;
        
    }

    .modal-details .download-icon {
        width: clamp(45px, 25vw, 90px);
    }

    .download-icon img {
        height: clamp(20px, 6.5vw, 25px);
        padding: 3px 6px;
    }


}


@media (max-width: 768px) {

    
    .pagination-controls {
        margin-top: 25px;
        margin-bottom: 50px;
    }

    .mobile-filter-fab {
        display: flex;
        
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 25px;
        left: 25px;
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.7);
        -webkit-backdrop-filter: blur(15px);
        
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #3B1977;
        border-radius: 50%;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        z-index: 1001;
        cursor: pointer;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        
        transition: opacity 0.2s ease-out !important;
    }

    .mobile-filter-fab.is-loading {
        opacity: 0;
        pointer-events: none !important;
        
    }

}

.mobile-filter-fab img {
    width: 30px;
    
    height: 30px;
    
}



#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fdfdfd;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.5s ease;
}


.morphing-loader {
    --loader-size: 45px;
    --line-thickness: 8px;
    --loader-color: #3B1977;
    --animation-duration: 2.5s;
    
    --easing: cubic-bezier(0.65, 0, 0.35, 1);

    position: relative;
    width: var(--loader-size);
    height: var(--loader-size);
}

.morphing-loader .line {
    position: absolute;
    top: 50%;
    left: 50%;
    background-color: var(--loader-color);
    height: var(--line-thickness);
    border-radius: calc(var(--line-thickness) / 2);
    transform-origin: center center;
}


.morphing-loader .line-1 {
    animation: morph-line-1-v3 var(--animation-duration) var(--easing) infinite;
}

.morphing-loader .line-2 {
    animation: morph-line-2-v3 var(--animation-duration) var(--easing) infinite;
}

.morphing-loader .line-3 {
    animation: morph-line-3-v3 var(--animation-duration) var(--easing) infinite;
}


@keyframes morph-line-2-v3 {

    0%,
    50%,
    100% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%);
    }

    0.01% {
        
        transform: translate(-50%, -50%) rotate(55deg);
    }

    25% {
        
        width: calc(var(--loader-size) * 1.85);
        transform: translate(-50%, -50%) rotate(55deg);
    }


    49.99% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) rotate(55deg);
    }

    50.01% {
        
        transform: translate(-50%, -50%) rotate(-55deg);
    }

    75% {
        
        width: calc(var(--loader-size) * 1.85);
        transform: translate(-50%, -50%) rotate(-55deg);
    }

    99.99% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) rotate(-55deg);
    }
}


@keyframes morph-line-1-v3 {
    0% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * 0.48));
    }

    0.01% {
        
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * 0.48))rotate(-55deg);
    }

    25% {
        
        width: calc(var(--loader-size));
        transform: translate(-50%, -50%) translate(calc(var(--loader-size) * 0.24), calc(var(--loader-size) * 0.34)) rotate(-55deg);
    }

    49.99% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateY(calc(var(--loader-size) * 0.68))rotate(-55deg);
    }

    50% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateY(calc(var(--loader-size) * 0.68));
    }

    50.01% {
        transform: translate(-50%, -50%) translateY(calc(var(--loader-size) * 0.68))rotate(55deg);
    }

    75% {
        width: calc(var(--loader-size));
        transform: translate(-50%, -50%) translate(calc(var(--loader-size) * -0.24), calc(var(--loader-size) * 0.34)) rotate(55deg);
    }

    99.99% {
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * -0.48))rotate(55deg);
    }


    100% {
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * -0.48));
    }
}


@keyframes morph-line-3-v3 {

    0% {
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * -0.48));
    }

    0.01% {
        
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * -0.48))rotate(-55deg);
    }

    25% {
        width: calc(var(--loader-size));
        transform: translate(-50%, -50%) translate(calc(var(--loader-size) * -0.24), calc(var(--loader-size) * -0.34)) rotate(-55deg);

    }

    49.99% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateY(calc(var(--loader-size) * -0.68))rotate(-55deg);
    }

    50% {
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateY(calc(var(--loader-size) * -0.68));
    }


    50.01% {
        
        transform: translate(-50%, -50%) translateY(calc(var(--loader-size) * -0.68))rotate(55deg);
    }

    75% {
        
        width: calc(var(--loader-size));
        transform: translate(-50%, -50%) translate(calc(var(--loader-size) * 0.24), calc(var(--loader-size) * -0.34)) rotate(55deg);
    }

    99.99% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * 0.48))rotate(55deg);
    }


    100% {
        
        width: var(--line-thickness);
        transform: translate(-50%, -50%) translateX(calc(var(--loader-size) * 0.48));
    }


}

.grid-loader-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 200px;
    
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.5s ease;
    background-color: #fdfdfd;
    z-index: 10;
}

.grid-loader-wrapper.is-overlay {
    position: absolute;
    top: -30px;
    left: -40px;
    width: calc(100% + 80px);
    
    height: calc(100% + 60px);

    
    
    align-items: flex-start;
    padding-top: 230px;
    

    pointer-events: none;
    
}

@media (max-width: 768px) {
    .grid-loader-wrapper {
        padding-top: 150px;
        
    }

    .grid-loader-wrapper.is-overlay {
        padding-top: 180px;
        
    }
}

.grid-loader-wrapper.hiding {
    opacity: 0;
}


.grid-loader-wrapper .morphing-loader {
    --loader-size: 45px;
    --line-thickness: 8px;
}

.doody-link {
    text-decoration: none;
    
    border: none;
    
    display: inline-block;
    
    margin-left: 6px;
    margin-bottom: 0.3em;
    
    line-height: 1;
    
    vertical-align: middle;

}


.doody-logo {
    height: 1.8em;
    
    width: auto;
    display: block;
    
    cursor: pointer;
    
    transition: transform 0.2s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    
    
    image-rendering: -webkit-optimize-contrast;
}


.doody-link:hover .doody-logo {
    transform: scale(1.08);
    
}


@media (max-width: 768px) {
    .doody-link {
        margin-left: 5px;
    }

    .doody-logo {
        height: 1.5em;
    }
}

.site-footer {
    width: 100%;
    padding: 0px 0;
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    background-color: #fdfdfd;
}

.site-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

.site-footer a {
    text-decoration: none;
    color: #999;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #3B1977;
}

.footer-divider {
    margin: 0 10px;
    color: #ccc;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .site-footer p {
        font-size: 0.7rem;
    }

    .footer-divider {
        margin: 0 8px;
        font-size: 0.8rem;
    }
}

.custom-checkbox[data-state="included"] .checkmark {
    background-color: #3B1977;
    border-color: #3B1977;
}

.custom-checkbox[data-state="included"] .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: block;
}


.custom-checkbox[data-state="excluded"] .checkmark {
    background-color: #dc3545;
    
    border-color: #dc3545;
}

.custom-checkbox[data-state="excluded"] .checkmark::after {
    content: '✕';
    
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 13px;
    line-height: 16px;
    
    text-align: center;
    border: none;
    transform: none;
    font-weight: bold;
    display: block;
}

@supports (-webkit-touch-callout: none) {
    .custom-checkbox[data-state="excluded"] .checkmark::after {
        font-weight: 400 !important;
        font-size: 20px !important;
        line-height: 14px;
    }
}

.custom-checkbox input {
    pointer-events: none;
}

html:has(body.no-scroll),
body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none;
    overscroll-behavior: none;
}

body.mobile-filters-active #mobile-filter-trigger {
    opacity: 0;
    
    visibility: hidden;
    
    pointer-events: none;
    
    transform: scale(0.8);
    
    transition: all 0.2s ease;
    
}


body.mobile-nav-open header,
body.mobile-filters-active header,
body.book-modal-active header {
    
    position: fixed !important;
    top: 0 !important;

    
    
    

    width: 100%;

    
    transform: translateZ(0);
}

body.mobile-nav-open {
    padding-top: 60px !important;
    
}







@media (min-width: 769px) {

    
    @keyframes delayOverflow {
        0% {
            overflow-y: hidden;
        }

        99% {
            overflow-y: hidden;
        }

        100% {
            overflow-y: auto;
        }
    }

    
    
    .sidebar .collapsible-content {
        scrollbar-gutter: stable;
        transition:
            max-height 0.3s ease-out,
            margin-bottom 0.3s ease-out,
            padding-bottom 0.3s ease-out,
            border-color 0.3s ease-out !important;
    }

    
    .sidebar .collapsible-content.hidden {
        max-height: 0 !important;
        margin-bottom: 0 !important;
        
        padding-bottom: 0 !important;
        
        border-bottom: 1px solid transparent !important;
        
        overflow-y: hidden !important;
        
    }

    
    .sidebar .collapsible-content:not(.hidden) {
        
        max-height: 600px !important;

        
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #f0f0f0 !important;


        
        overflow-y: hidden;
        animation: delayOverflow 0s 0.3s forwards;

        
        overscroll-behavior: contain;
        padding-right: 4px;
    }

    
    .sidebar .collapsible-content::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar .collapsible-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar .collapsible-content::-webkit-scrollbar-thumb {
        background-color: #e0e0e0;
        border-radius: 10px;
        background-clip: content-box;
        border: 1px solid transparent;
    }

    .sidebar .collapsible-content::-webkit-scrollbar-thumb:hover {
        background-color: #5d00ff;
    }

    .collapsible-header .nav-arrow {
        margin-right: -2px;
    }

    .toggle-switch {
        margin-top: 5px;
        margin-right: 2px;
    }

}



.scroll-indicator {
    
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;

    
    color: #3B1977;
    
    background-color: transparent;
    
    box-shadow: none;
    
    backdrop-filter: none;
    
    border-radius: 0;
    

    
    width: 36px;
    
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;

    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}


.scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
    animation: bounceIndicator 2s infinite;
}


@keyframes bounceIndicator {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-4px);
    }

    60% {
        transform: translateX(-50%) translateY(-2px);
    }
}







@media (min-width: 769px) {

    
    .search-bar {
        position: relative;
        
        display: flex;
        align-items: center;
        
        padding-right: 0;
        transition: flex-grow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            padding-right 0.3s ease;
    }

    
    .search-container {
        flex-grow: 1;
        transition: all 0.4s ease;
    }

    
    .desktop-search-close-btn {
        position: absolute;
        
        right: -10px;
        
        top: 50%;
        transform: translateY(-50%);
        

        display: none;
        
        background: none;
        border: none;
        cursor: pointer;
        color: #888;
        padding: 0;

        
        opacity: 0;
        width: 40px;
        
        height: 40px;
        

        
        align-items: center;
        justify-content: center;

        
        transition: opacity 0.1s ease, color 0.2s ease;
        z-index: 5;
        
    }

    .desktop-search-close-btn:hover {
        color: #3B1977;

        
        border-radius: 50%;
    }
}

@media (max-width: 768px) {
    .desktop-search-close-btn {
        display: none;

    }

    .search-container {
        max-width: 100%;
    }
}


@media (min-width: 769px) and (max-width: 1200px) {

    
    .desktop-search-close-btn {
        display: flex;

    }

    .search-container {
        max-width: 100%;
    }


    
    nav {
        
        max-width: 600px;
        
        opacity: 1;
        visibility: visible;
        
        
        transition: max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            opacity 0.4s ease 0.2s,
            margin 0.4s ease;
    }

    


    
    .header-content.desktop-search-active nav {
        max-width: 0;
        opacity: 0;
        visibility: hidden;
        margin: 0;
        padding: 0;
        
    }

    
    

    
    .header-content.desktop-search-active .search-bar {
        padding-right: 50px;

        
        
        transition: flex-grow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
            padding-right 0.3s ease 0.2s;
        
    }

    
    .header-content.desktop-search-active .desktop-search-close-btn {
        opacity: 1;
        pointer-events: auto;

        
        transition: opacity 0.3s ease 0.3s, color 0.2s ease;
    }



    .header-content.desktop-search-active .search-bar {
        
        
        
        padding-right: 50px;
    }
}




.search-suggestions {
    position: absolute;
    top: 100%;
    
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 8px;
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    
    display: none;
    
    overflow: hidden;
    max-height: 450px;
    
    overflow-y: auto;
}


.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    
    font-size: 0.95rem;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.1s ease;
    text-decoration: none;
    
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #f1e9ff;
    
}


.suggestion-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    margin-right: 10px;
}

.suggestion-sub-text {
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}


.suggestion-badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px 4px 7px;
    border-radius: 20px;
    line-height: 1;
}



.suggestion-badge.series,
.suggestion-badge.tag {
    color: #3B1977;
    border: 1.4px solid #3B1977;
    background-color: transparent;
}



@media (max-width: 768px) {
    .header-content.mobile-search-active .search-suggestions {
        position: fixed;
        
        top: 60px;
        
        left: 0;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 60px);
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .suggestion-item {
        padding-left: calc(5vw + 12px);
        padding-right: 5vw;
        padding: 12px 5vw 12px calc(5vw + 12px);
    }

    .suggestion-badge {
        padding: 3px 7px 4px 7px;
    }
}