* {
    letter-spacing: 0.03em;
}

i {
    letter-spacing: 0;
}

mark {
    padding: 0;
    background-color: transparent;
    color: #f20c00;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

span.space {
    padding: 0 0.5rem;
    color: darkgray;
}

span.space-big {
    padding: 0 0.8rem;
    color: darkgray;
}

.search-left-logo {
    height: 88px;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .input-group .form-control {
        border-radius: 6px;
    }

    .input-group .btn {
        width: 100%;
        margin-top: 8px;
        border-top-left-radius: 0.5rem !important;
        border-bottom-left-radius: 0.5rem !important;
    }
}

@media (max-width: 768px) {
    .search-radio {
        font-size: 12px;
        margin-right: 6px;
    }
}

@media (max-width: 768px) {
    .page-explain {
        text-align: center;
    }

    .explain-info {
        font-size: 12px;
        margin: 5px 0 15px 0;
    }
}

input::placeholder, img, label,
.invalid-feedback, .err-box,
.nav-action-link, .dropdown-item {
    user-select: none;
    -webkit-user-select: none;
}

.none-select {
    user-select: none;
    -webkit-user-select: none;
}

.empty-result {
    padding-top: 5rem!important;
    padding-bottom: 5rem!important;
}

.empty-result .empty-txt,
.empty-result .empty-icon {
    color: #999;
}

.book-cell-info p {
    color: #333333;
    margin-bottom: 0.2rem;
}

.book-cell-info p strong {
    color: darkslateblue;
    opacity: 45%;
    user-select: none;
    -webkit-user-select: none;
}

.search-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.search-radio {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.search-radio.form-check-inline {
    padding-right: 0.8rem;
    margin-right: 0.2rem;
    margin-bottom: 0;
}

.search-radio:hover {
    background-color: #f8f9fa;
}

.search-radio .form-check-input,
.search-radio .form-check-label {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}

.form-check-label {
    user-select: none;
}

.pagination .page-link {
    color: #198754;
}

.pagination .page-link:hover {
    color: #146c43;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.pagination .page-item.active .page-link {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #98c7ae;
    background-color: white;
    border-color: #dee2e6;
}

.pagination {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .head-page, .tail-page {
        display: none;
    }
}

nav {
    display: flex;
    align-items: center;
}

/*宝蓝*/
.bg-bao-lan {
    background-color: #4b5cc4;
}

/*靛青*/
.bg-dian-qing {
    background-color: #177cb0;
}

/*青莲*/
.bg-qing-lian {
    background-color: #801dae;
}

/*樱桃*/
.bg-pin-hong {
    background-color: #f00056;
}

/*绯红*/
.bg-fei-hong {
    background-color: #c83c23;
}

.search-clear {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    aspect-ratio: 1 / 1;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #bbb;
    cursor: pointer;
    display: none;
    transition: color 0.2s ease;
}

.search-clear:hover {
    color: #333;
}

.dropdown-menu {
    padding: 0.25rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    line-height: 1.4;
}

.dropdown-item:hover {
    background-color: #fff;
    color: #198754;
}

.dropdown-item.active {
    background-color: #198754;
    color: #fff;
}

.navbar-toggler {
    border: none;
    background: transparent;
    padding: 6px 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler:hover {
    opacity: 0.7;
}

.navbar-collapse {
    z-index: 2000;
}

.book-navbar {
    height: 56px;
    background-color: #fff;
    border-bottom: 1px solid #f1f3f5;
}

.book-navbar .logo-info {
    font-weight: bold;
    color: #999999;
    opacity: 0.5;
}

.book-navbar .logo-info .info-iw {
    color: #4b5cc4;
}

.book-navbar .logo-info .info-so {
    color: #f20c00;
}

.book-navbar .logo-info .info-sy {
    color: #198754;
}

.nav-action-link {
    text-decoration: none;
    color: #495057;

    font-size: 14px;
    transition: color 0.2s ease;
    padding: 7px 0;
}

.nav-action-link:hover {
    color: #198754;
}

.nav-register {
    font-weight: 600;
}

.user-menu {
    user-select: none;
    -webkit-user-select: none;
    text-decoration: none;
    color: #343a40;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 7px 0;
}

.book-navbar .user-menu {
    color: #6610f2;
}

.bi {
    line-height: 1;
}

.user-menu:hover {
    color: #198754;
}

.user-form {
    padding: 4rem;
}

.logo-banner {
    margin-bottom: 1.5rem !important;
}

@media (max-width: 768px) {
    .user-form {
        padding: 1.5rem;
    }

    .logo-banner {
        margin-bottom: 1rem !important;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.switch-link:hover {
    color: #198754 !important;
}

.explain-info {
    opacity: 0.5;
    font-style: italic;
}

.explain-info .guest {
    color: red;
}

.explain-info .member {
    color: blue;
    padding-left: 1rem;
}

.page-intro {
    font-size: 15px;
    line-height: 1.8;
    color: #6b7280;
    margin-top: 10px;
    margin-bottom: 28px;
}

.card-book-name {
    max-width: 100%;
    color: darkslateblue;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foot-bar {
    color: #8c8c8c;
    font-size: .875em;
    padding: 0 10px;
    margin-bottom: 0.5rem!important;
    margin-top: 1.5rem!important;
}

.foot-bar a {
    color: #8c8c8c;
    text-decoration: none;
    margin-right: 10px;
}

@media (max-width: 768px) {
    .foot-bar {
        font-size: .575em;
    }
}

.cover-box {
    position: relative;
    display: inline-block;
}

.preview-trigger {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 6px;
}

.cover-hint {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffff00;
    border-radius: 8px;
    font-size: 18px;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    background:
        linear-gradient(
            to bottom left,
            rgba(255, 0, 128, .8),
            rgba(128, 0, 255, .8),
            rgba(0, 128, 255, .8)
        );
    background-size: 800% 800%;
    animation: gradientMove 2s linear infinite;
}

@media (hover: hover) {
    .cover-box:hover .cover-hint {
        background:
            linear-gradient(
                to bottom left,
                rgba(255, 0, 128, 1),
                rgba(128, 0, 255, 1),
                rgba(0, 128, 255, 1)
            );
        background-size: 800% 800%;
        animation: gradientMove 1s linear infinite;
    }
}

@keyframes gradientMove {
  0%   { background-position: 0% 0%; }
  12.5%{ background-position: 50% 0%; }
  25%  { background-position: 100% 0%; }
  37.5%{ background-position: 100% 50%; }
  50%  { background-position: 100% 100%; }
  62.5%{ background-position: 50% 100%; }
  75%  { background-position: 0% 100%; }
  87.5%{ background-position: 0% 50%; }
  100% { background-position: 0% 0%; }
}

.book-cover {
    width: 100%;
    height: auto;
}

.cover-preview {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 999;
    opacity: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 1s ease;
}

.cover-preview img {
    max-height: 100vh;
    max-width: 100vw;
    object-fit: contain;
    border-radius: 8px;
    transform-origin: top left;
    filter: grayscale(1) contrast(0.95) brightness(1.05);
    transition: filter .8s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

@media (hover: hover) {
    .cover-box:hover + .cover-preview {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .cover-box:hover + .cover-preview img {
        filter: grayscale(0) contrast(1.05) brightness(1);
    }
}

.cover-preview.show {
    opacity: 1;
    pointer-events: auto;
}

.cover-preview.show img {
    filter: grayscale(0) contrast(1.05) brightness(1);
}

.normal-adv-btn {
    white-space: nowrap;
}

.book-cell {
    display: flex;
    align-items: center;
}

.book-cell-cover {
    flex: 0 0 200px;
}

.book-cell-info {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .book-cell {
        flex-direction: column;
        align-items: center;
    }

    .book-cell-cover {
        flex: none;
        width: 200px;
        margin-bottom: 1rem;
    }

    .book-cell-info {
        width: 100%;
        text-align: left;
    }

    .detail-book-cover {
        margin-bottom: 1.5rem;
    }
}

.top-logo-img {
    height: 280px;
}

@media (max-width: 768px) {
    .top-logo-img {
        height: 130px;
    }
}

@media (max-width: 768px) {
    .navbar-collapse {
        margin-top: .5rem;
        background-color: rgba(224, 224, 224, 0.95);
        border-radius: 0 0 10px 10px;
    }

    .nav-item .nav-link {
        padding: 12px 15px;
        font-weight: bold;
        font-size: 18px;
    }
}

.no-user-btn {
    font-weight: bold;
}

#suggest-box .list-group-item.active {
    background-color: #56004f;
    border-color: #56004f;
    color: white;
}

#suggest-box .list-group-item.active mark {
    color: yellow;
}

.text-bg-warning {
    background-color: lightyellow !important;
    color: red !important;
}