.novel-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 22px 0;
    color: var(--text-soft);
    font-size: 10px;
}

.novel-breadcrumb a {
    color: var(--text-soft);
    transition: color .2s ease;
}

.novel-breadcrumb a:hover {
    color: var(--primary);
}

.novel-breadcrumb strong {
    max-width: 300px;
    overflow: hidden;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.novel-header {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 30px;
    padding: 25px 0 35px;
}

.novel-cover {
    width: 220px;
    height: 315px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface-soft);
    box-shadow: 0 15px 40px rgba(0, 0, 0, .12);
}

.novel-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.novel-main {
    min-width: 0;
    padding-top: 5px;
}

.novel-status {
    display: inline-block;
    padding: 5px 7px;
    border-radius: 3px;
    background: rgba(0, 191, 166, .1);
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
}

.novel-main h1 {
    max-width: 800px;
    margin: 9px 0 5px;
    color: var(--text);
    font-size: 32px;
    line-height: 1.2;
}

.novel-author {
    color: var(--text-soft);
    font-size: 11px;
}

.novel-author strong {
    color: var(--text);
}

.novel-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 13px;
}

.star {
    color: #ccc;
    font-size: 14px;
    letter-spacing: -2px;
}

.star.active {
    color: var(--yellow);
}

.novel-rating strong {
    color: var(--text);
    font-size: 11px;
}

.novel-rating > span {
    margin-left: 4px;
    color: var(--text-soft);
    font-size: 9px;
}

.novel-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 15px;
}

.novel-genres a {
    padding: 5px 8px;
    border-radius: 4px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 8px;
    transition:
        background .2s ease,
        color .2s ease;
}

.novel-genres a:hover {
    background: rgba(0, 191, 166, .1);
    color: var(--primary);
}

.novel-description {
    max-width: 750px;
    margin: 18px 0;
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.8;
}

.novel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: 800;
    transition:
        opacity .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.primary-button {
    background: var(--primary);
    color: white;
}

.primary-button:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.secondary-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.secondary-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.novel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 35px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.novel-stats > div {
    padding: 17px 20px;
    border-right: 1px solid var(--border);
}

.novel-stats > div:last-child {
    border-right: 0;
}

.novel-stats span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 8px;
}

.novel-stats strong {
    display: block;
    color: var(--text);
    font-size: 14px;
}

.novel-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 25px;
    padding-bottom: 50px;
}

.chapters-section {
    min-width: 0;
}

.chapters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 13px;
}

.chapters-header h2 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
}

.chapters-header p {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 9px;
}

.chapter-search {
    width: 125px;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    transition: border-color .2s ease;
}

.chapter-search:focus-within {
    border-color: var(--primary);
}

.chapter-search span {
    flex-shrink: 0;
    font-size: 10px;
}

.chapter-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 9px;
}

.chapter-search input::placeholder {
    color: var(--text-light);
}

.chapters-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.chapters-toolbar button,
.chapters-toolbar a {
    padding: 7px 9px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 8px;
    transition:
        border-color .2s ease,
        color .2s ease,
        background .2s ease;
}

.chapters-toolbar button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.chapters-toolbar a {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.chapters-toolbar a:hover {
    opacity: .9;
}

.chapters-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    transition:
        border-color .2s ease,
        transform .2s ease,
        background .2s ease;
}

.chapter-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.chapter-item span {
    display: block;
    color: var(--text-soft);
    font-size: 8px;
}

.chapter-item strong {
    display: block;
    margin-top: 2px;
    color: var(--text);
    font-size: 11px;
}

.chapter-item small {
    color: var(--primary);
    font-size: 8px;
    font-weight: 700;
}

.chapter-item.hidden {
    display: none;
}

.all-chapters {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.all-chapters button {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 9px;
    transition:
        border-color .2s ease,
        color .2s ease,
        background .2s ease;
}

.all-chapters button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.all-chapters button:disabled {
    opacity: .6;
    cursor: default;
}

.novel-sidebar {
    min-width: 0;
}

.sidebar-card {
    margin-bottom: 15px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.sidebar-card h3 {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row span {
    color: var(--text-soft);
    font-size: 9px;
}

.info-row strong {
    color: var(--text);
    font-size: 9px;
    text-align: right;
}

.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 2px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 9px;
    transition: color .2s ease;
}

.quick-link:last-child {
    border-bottom: 0;
}

.quick-link:hover {
    color: var(--primary);
}

.related-section {
    padding-bottom: 60px;
}

.related-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.related-heading h2 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.related-heading p {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 9px;
}

.related-heading > a {
    flex-shrink: 0;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.related-card {
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    transition:
        border-color .2s ease,
        transform .2s ease;
}

.related-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.related-cover {
    width: 48px;
    height: 67px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: var(--surface-soft);
}

.related-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card > div {
    min-width: 0;
}

.related-card h3 {
    margin: 2px 0 4px;
    font-size: 9px;
    line-height: 1.5;
}

.related-card h3 a {
    color: var(--text);
}

.related-card h3 a:hover {
    color: var(--primary);
}

.related-card p {
    margin: 0;
    color: var(--text-soft);
    font-size: 8px;
}

@media (max-width: 850px) {

    .novel-header {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 20px;
    }

    .novel-cover {
        width: 180px;
        height: 260px;
    }

    .novel-main h1 {
        font-size: 26px;
    }

    .novel-layout {
        grid-template-columns: 1fr;
    }

    .novel-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .sidebar-card {
        margin-bottom: 0;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .novel-breadcrumb {
        padding: 17px 0;
    }

    .novel-header {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 15px;
    }

    .novel-cover {
        width: 110px;
        height: 160px;
    }

    .novel-main {
        padding-top: 0;
    }

    .novel-main h1 {
        font-size: 19px;
    }

    .novel-description {
        grid-column: 1 / -1;
        max-width: none;
    }

    .novel-actions {
        grid-column: 1 / -1;
    }

    .novel-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .novel-stats > div:nth-child(2) {
        border-right: 0;
    }

    .novel-stats > div:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .novel-stats > div:nth-child(3) {
        border-right: 1px solid var(--border);
    }

    .novel-layout {
        display: block;
    }

    .novel-sidebar {
        display: block;
        margin-top: 25px;
    }

    .sidebar-card {
        margin-bottom: 15px;
    }

    .chapters-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chapter-search {
        width: 100%;
    }

    .chapters-list {
        grid-template-columns: 1fr;
    }

    .related-heading {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (max-width: 420px) {

    .novel-header {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 12px;
    }

    .novel-cover {
        width: 90px;
        height: 130px;
        border-radius: 6px;
    }

    .novel-status {
        padding: 4px 5px;
        font-size: 7px;
    }

    .novel-main h1 {
        margin-top: 7px;
        font-size: 17px;
    }

    .novel-author {
        font-size: 9px;
    }

    .novel-rating {
        margin-top: 8px;
    }

    .novel-rating .star {
        font-size: 11px;
    }

    .novel-rating > span {
        display: none;
    }

    .novel-genres {
        margin-top: 9px;
    }

    .novel-genres a {
        padding: 4px 6px;
        font-size: 7px;
    }

    .novel-description {
        margin-top: 14px;
        font-size: 10px;
        line-height: 1.7;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .novel-stats > div {
        padding: 13px 14px;
    }

    .novel-stats span {
        font-size: 7px;
    }

    .novel-stats strong {
        font-size: 12px;
    }

    .chapters-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .chapters-toolbar button,
    .chapters-toolbar a {
        text-align: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

}