 /* HEADER
----------------------------------------------- */
 #header {
     background-color: hsl(240deg 10% 95% / 56%);
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     position: sticky;
     top: 0;
     z-index: 100;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
 }

 [data-theme="dark"] #header {
     background-color: hsl(240 10% 20% / 0.8);
 }

 .header__inner {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 30px;
     padding: 20px 0;
 }

 /* Logo */
 .header__logo {
     flex-shrink: 0;
     order: 0;
     margin-right: auto;
 }

 .logo {
     display: flex;
     align-items: center;
     gap: 10px;
     text-decoration: none;
     transition: opacity 0.2s;
 }

 .logo:hover {
     opacity: 0.8;
 }

 .logo__img {
     height: 40px;
     width: auto;
     display: block;
 }

 .logo__text {
     font-size: 24px;
     font-weight: var(--ui-fw-bolder);
     color: var(--accent);
 }

 .logo__text--black {
     color: var(--tt);
 }

 .logo__litres {
     height: 15px;
     width: 55px;
     display: block;
 }

 /* Search */
 .header__search {
     flex: 1 1 0;
     max-width: 500px;
     order: 2;
 }

 .search-form {
     position: relative;
     display: flex;
     align-items: center;
 }

 .search-form__input {
     width: 100%;
     height: 40px;
     padding: 0 45px 0 15px;
     border: 1px solid var(--bdc);
     border-radius: 20px;
     background-color: var(--bg-darker);
     color: var(--tt);
     font-size: 14px;
     transition: all 0.2s;
 }

 .search-form__input:focus {
     outline: none;
 }

 .search-form__btn {
     position: absolute;
     right: 5px;
     width: 30px;
     height: 30px;
     border: none;
     background: none;
     color: var(--tt-fade);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: color 0.2s;
     border-radius: 50%;
 }

 .search-form__btn:hover {
     color: var(--accent);
     background-color: var(--bg-darker);
 }

 /* Theme Toggle */
 .header__theme {
     flex-shrink: 0;
     order: 4;
 }

 .theme-toggle {
     width: 40px;
     height: 40px;
     border: 1px solid var(--bdc);
     border-radius: 50%;
     background-color: var(--bg-darker);
     color: var(--tt);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.2s;
     position: relative;
 }

 .theme-toggle:hover {
     border-color: var(--accent);
     color: var(--accent);
     background-color: var(--bg);
 }

 .theme-icon {
     font-size: 18px;
     position: absolute;
     transition: opacity 0.2s, transform 0.2s;
 }

 .theme-icon--light {
     opacity: 1;
     transform: rotate(0deg);
 }

 .theme-icon--dark {
     opacity: 0;
     transform: rotate(90deg);
 }

 [data-theme="dark"] .theme-icon--light {
     opacity: 0;
     transform: rotate(-90deg);
 }

 [data-theme="dark"] .theme-icon--dark {
     opacity: 1;
     transform: rotate(0deg);
 }

 /* Navigation */
 .header__nav {
     flex-shrink: 0;
     order: 2;
 }

 .nav-list {
     display: flex;
     gap: 20px;
     list-style: none;
     margin: 0;
     padding: 0;
 }

 .nav-list__link {
     color: var(--tt);
     text-decoration: none;
     font-size: 15px;
     font-weight: var(--ui-fw-normal);
     transition: color 0.2s;
     padding: 8px 0;
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .nav-list__link i {
     font-size: 16px;
 }

 .nav-list__link:hover {
     color: var(--accent);
 }

 /* Mobile Menu Button */
 .header__mobile-btn {
     display: none;
     width: 40px;
     height: 40px;
     border: 1px solid var(--bdc);
     border-radius: 8px;
     background: var(--bg-darker);
     color: var(--tt);
     cursor: pointer;
     align-items: center;
     justify-content: center;
     transition: all 0.2s;
 }

 .header__mobile-btn:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
 }

 .header__mobile-btn .fas {
     font-size: 18px;
 }

 /* Overlay */
 .overlay {
     display: none;
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.5);
     backdrop-filter: blur(4px);
     z-index: 9999;
 }

 /* Mobile Menu */
 .mobile-menu {
     position: fixed;
     top: 0;
     left: 0;
     width: 280px;
     max-width: 85%;
     min-height: 100vh;
     min-height: -webkit-fill-available;
     height: 100vh;
     height: -webkit-fill-available;
     background: var(--bg);
     box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
     z-index: 10000;
     overflow-y: auto;
     transform: translateX(-100%);
     transition: transform 0.3s ease;
     visibility: hidden;
     display: flex;
     flex-direction: column;
 }

 .mobile-menu.is-active {
     visibility: visible;
     transform: translateX(0);
 }

 .mobile-menu__header {
     padding: 20px;
     border-bottom: 1px solid var(--bdc);
     display: flex;
     align-items: center;
     flex-shrink: 0;
 }

 .mobile-menu__content {
     padding: 20px;
     flex: 1;
     overflow-y: auto;
 }


 body.mobile-menu-is-opened {
     overflow: hidden;
 }

 .mobile-menu__content .header__nav {
     padding: 0;
     margin: 0;
     display: block !important;
 }

 .mobile-menu__content .nav-list,
 .mobile-menu__content .nav-list--mobile {
     display: flex !important;
     flex-direction: column !important;
     gap: 10px;
     margin: 0;
     padding: 0;
 }

 .mobile-menu__content .nav-list__link {
     padding: 12px 0;
     font-weight: var(--ui-fw-medium);
     display: flex !important;
     align-items: center;
     gap: 12px;
     color: var(--tt);
     transition: color 0.2s;
 }

 .mobile-menu__content .nav-list__link:hover {
     color: var(--accent);
     background: transparent;
 }


 /* Auth */
 .header__auth {
     flex-shrink: 0;
 }

 .auth-user__link {
     display: flex;
     align-items: center;
     gap: 10px;
     text-decoration: none;
     color: var(--tt);
     transition: opacity 0.2s;
 }

 .auth-user__link:hover {
     opacity: 0.8;
 }

 .auth-user__avatar {
     width: 36px;
     height: 36px;
     border-radius: 50%;
     background-size: cover;
     background-position: center;
     background-color: var(--bg-darker);
     border: 2px solid var(--bdc);
 }

 .auth-user__name {
     font-size: 14px;
     font-weight: var(--ui-fw-normal);
 }

 .auth-login__link {
     display: flex;
     align-items: center;
     gap: 8px;
     padding: 8px 16px;
     border: 1px solid var(--bdc);
     border-radius: 20px;
     background-color: var(--bg-darker);
     color: var(--tt);
     text-decoration: none;
     font-size: 14px;
     transition: all 0.2s;
 }

 .auth-login__link:hover {
     border-color: var(--accent);
     color: var(--accent);
     background-color: var(--bg);
 }

 .auth-login__link i {
     font-size: 16px;
 }

 /* CONTENT
----------------------------------------------- */
 .content {
     padding: 20px 0;
 }

 /* CAROUSEL
----------------------------------------------- */
 .carousel {
     margin-bottom: 40px;
 }

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

 .carousel__title {
     font-size: 24px;
     font-weight: var(--ui-fw-bolder);
     color: var(--tt);
     margin: 0;
 }

 .carousel__nav {
     display: flex;
     gap: 10px;
 }

 .carousel__btn {
     width: 40px;
     height: 40px;
     border-radius: 50%;
     border: 1px solid var(--bdc);
     background: var(--bg);
     color: var(--tt);
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.2s;
 }

 .carousel__btn:hover {
     background: var(--accent);
     color: #fff;
     border-color: var(--accent);
 }

 .carousel__btn:disabled {
     opacity: 0.5;
     cursor: default;
 }

 .carousel__btn:disabled:hover {
     background: var(--bg);
     color: var(--tt);
     border-color: var(--bdc);
 }

 .carousel__container {
     position: relative;
     overflow: hidden;
 }

 .carousel__track {
     display: flex;
     gap: 20px;
     transition: transform 0.3s ease;
 }

 .carousel__track .book-card {
     flex: 0 0 153px;
     min-width: 0;
 }

 .book-card.book-carousel .book-card__cover {
     max-height: 220px;
 }

 /* SECTIONS, TABS
----------------------------------------------- */
 .sect {
     margin-bottom: 40px;
 }

 .sect__tabs {
     display: flex;
     gap: 10px;
     margin-bottom: 30px;
     border-bottom: 2px solid var(--bdc);
 }

 .sect__tabs-btn {
     padding: 12px 10px;
     border: none;
     background: none;
     color: var(--tt-fade);
     font-size: 16px;
     font-weight: var(--ui-fw-normal);
     cursor: pointer;
     position: relative;
     transition: all 0.2s;
     border-bottom: 2px solid transparent;
     margin-bottom: -2px;
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .sect__tabs-btn i {
     font-size: 16px;
 }

 .sect__tabs-btn:hover {
     color: var(--tt);
 }

 .sect__tabs-btn.is-active {
     color: var(--accent);
     font-weight: 500;
     border-bottom-color: var(--accent);
 }

 .sect__content {
     display: none;
 }

 .sect__content.is-active {
     display: block;
 }

 /* TABS BLOCK (Player & YouTube)
----------------------------------------------- */
 .tabs-block {
     margin: 40px 0;
 }

 .tabs-block__tabs {
     display: flex;
     gap: 10px;
     margin-bottom: 30px;
     border-bottom: 2px solid var(--bdc);
 }

 .tabs-block__tabs-btn {
     padding: 12px 24px;
     border: none;
     background: none;
     color: var(--tt-fade);
     font-size: 16px;
     font-weight: var(--ui-fw-normal);
     cursor: pointer;
     position: relative;
     transition: all 0.2s;
     border-bottom: 2px solid transparent;
     margin-bottom: -2px;
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .tabs-block__tabs-btn i {
     font-size: 16px;
 }

 .tabs-block__tabs-btn:hover {
     color: var(--tt);
 }

 .tabs-block__tabs-btn.is-active {
     color: var(--accent);
     font-weight: var(--ui-fw-bolder);
     border-bottom-color: var(--accent);
 }

 .tabs-block__content-item {
     display: none;
 }

 .tabs-block__content-item.is-active {
     display: block;
 }

 .tabs-block__youtube iframe {
     width: 100%;
     height: 350px;
     border: none;
     border-radius: 8px;
 }

 .tabs-block__player-placeholder,
 .tabs-block__youtube-placeholder {
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     min-height: 200px;
     color: var(--tt-fade);
     gap: 15px;
 }

 .tabs-block__player-placeholder i,
 .tabs-block__youtube-placeholder i {
     font-size: 48px;
 }

 .tabs-block__player-placeholder p,
 .tabs-block__youtube-placeholder p {
     margin: 0;
     font-size: 16px;
     font-weight: var(--ui-fw-medium);
 }

 /* BOOKS GRID
----------------------------------------------- */
 .books-grid {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
     gap: 20px;
 }

 .books-grid3 {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 20px;
     margin-bottom: 30px;
 }

 .books-grid3__item {
     background: var(--bg-darker);
     border-radius: 8px;
     padding: 20px;
 }

 .books-grid3__item-title {
     font-size: 18px;
     font-weight: var(--ui-fw-bolder);
     color: var(--tt);
     margin: 0 0 15px 0;
     line-height: 1.3;
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .books-grid3__item-title .fas {
     font-size: 18px;
     color: var(--accent);
 }

 .books-grid3__item-content {
     display: flex;
     flex-direction: column;
     gap: 15px;
 }

 /* BOOK CARD
----------------------------------------------- */
 .book-card {
     border-radius: 8px;
     overflow: hidden;
 }

 .book-card>.book-card__link {
     display: flex;
     flex-direction: column;
     text-decoration: none;
     color: inherit;
 }

 .book-card__cover {
     position: relative;
     width: 100%;
     max-height: 265px;
     overflow: hidden;
     background-color: var(--bg-darker);
     border-radius: 8px;
 }

 .book-card__img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     display: block;
     border-radius: 8px;
     transition: transform 0.3s ease;
 }

 .book-card:hover .book-card__img {
     transform: scale(1.05);
     border-radius: 8px;
 }

 /* Рейтинг */
 .book-card__rating {
     position: absolute;
     bottom: 8px;
     right: 8px;
     background: rgba(0, 0, 0, 0.75);
     color: #fff;
     padding: 4px 10px;
     border-radius: 20px;
     font-size: 13px;
     font-weight: var(--ui-fw-bolder);
     z-index: 10;
     display: flex;
     align-items: center;
     gap: 5px;
 }

 .book-card__rating i {
     font-size: 12px;
     color: #fff;
 }


 /* Контент карточки */
 .book-card__content {
     padding: 12px;
     display: flex;
     flex-direction: column;
     gap: 6px;
 }

 .book-card__title {
     margin: 0;
 }

 .book-card__title h3 {
     font-size: 15px;
     line-height: 1.3;
     margin: 0;
     color: var(--tt);
     font-weight: var(--ui-fw-medium);
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
     text-overflow: ellipsis;
 }

 .book-card__meta {
     display: flex;
     flex-direction: column;
     gap: 4px;
 }

 .book-card__author,
 .book-card__readers {
     font-size: 12px;
     color: var(--tt-fade);
 }

 .book-card__author a,
 .book-card__author span a {
     color: var(--tt-fade);
     text-decoration: none;
     transition: color 0.2s;
     display: inline;
 }

 .book-card__author a:hover,
 .book-card__author span a:hover {
     color: var(--accent);
 }

 .book-card__author .book-card__link {
     display: inline;
     flex-direction: row;
 }

 .book-card__readers span {
     color: var(--tt-fade);
 }

 /* FOOTER
----------------------------------------------- */
 #footer {
     border-top: 1px solid var(--bdc);
     margin-top: 60px;
     padding: 40px 0 20px;
 }

 .footer__inner {
     display: flex;
     align-items: flex-start;
     justify-content: space-between;
     gap: 40px;
     margin-bottom: 20px;
 }

 .footer__age-restriction {
     display: flex;
     align-items: center;
     gap: 15px;
     flex-shrink: 0;
 }

 .footer__age-icon {
     width: 40px;
     height: 40px;
     border-radius: 8px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 12px;
     font-weight: var(--ui-fw-bolder);
     background: var(--tt);
     color: var(--bg-content);
 }

 [data-theme="dark"] .footer__age-icon {
     background: var(--tt-fade-0);
     color: var(--tt);
 }

 .footer__age-text {
     font-size: 13px;
     color: var(--tt-fade);
 }

 .footer__links {
     display: flex;
     flex-wrap: wrap;
     justify-content: space-between;
     gap: 20px;
     flex: 1;
     max-width: 50%;
 }

 .footer__links-col {
     display: flex;
     flex-direction: column;
     gap: 10px;
 }

 .footer__link {
     font-size: 14px;
     color: var(--tt-fade);
     text-decoration: none;
     transition: color 0.2s;
 }

 .footer__link:hover {
     color: var(--accent);
 }

 .footer__bottom {
     display: flex;
     align-items: center;
     justify-content: space-between;
     width: 100%;
 }

 .footer__copyright p {
     margin: 0;
     font-size: 14px;
     color: var(--tt-fade);
 }

 .footer__counter {
     text-align: right;
 }

 /* SCROLL TO TOP
----------------------------------------------- */
 .scroll-to-top {
     position: fixed;
     bottom: 30px;
     right: 30px;
     width: 45px;
     height: 45px;
     border-radius: 50%;
     background: var(--accent);
     color: #fff;
     cursor: pointer;
     display: none;
     align-items: center;
     justify-content: center;
     font-size: 18px;
     z-index: 1000;
     box-shadow: var(--bsh);
     transition: all 0.3s ease;
     border: none;
 }

 .scroll-to-top.show {
     display: flex;
     opacity: 1;
     transform: translateY(0);
 }

 .scroll-to-top:hover {
     background: var(--accent-2);
     transform: translateY(-3px);
     box-shadow: var(--bsh-popover);
 }

 /* SEO TEXT
----------------------------------------------- */
 .sect h1:not(.sect__title) {
     font-size: 28px;
     font-weight: var(--ui-fw-bolder);
     color: var(--tt);
     margin: 0 0 20px 0;
     line-height: 1.3;
 }

 .sect p {
     font-size: 15px;
     color: var(--tt);
     line-height: 1.6;
     margin: 0 0 15px 0;
 }

 .sect p:last-child {
     margin-bottom: 0;
 }

 /* CATEGORY/FAVORITES HEADER
----------------------------------------------- */
 .sect__header {
     margin-bottom: 30px;
 }

 .sect__header-info {
     display: flex;
     align-items: center;
     gap: 5px;
     flex-wrap: wrap;
 }

 .sect__header-actions {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 5px;
     flex-wrap: wrap;
     margin-left: auto;
 }

 @media screen and (max-width: 760px) {
     .sect__header-actions {
         width: 100%;
         margin-left: 0;
         margin-top: 10px;
     }
 }

 .sect__title {
     font-size: 28px;
     font-weight: var(--ui-fw-bolder);
     color: var(--tt);
     margin: 0;
     line-height: 1.3;
 }

 .sect__descr {
     font-size: 14px;
     color: var(--tt-fade);
     margin: 0;
     line-height: 1.6;
     white-space: nowrap;
 }

 .sect__btn {
     padding: 10px;
     background: var(--bg-darker);
     border: 1px solid var(--bdc);
     border-radius: 8px;
     color: var(--tt);
     font-size: 14px;
     font-weight: var(--ui-fw-medium);
     cursor: pointer;
     transition: all 0.2s;
     display: inline-flex;
     align-items: center;
     gap: 8px;
     font-family: inherit;
 }

 .sect__btn:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
 }

 .sect__btn .fas {
     font-size: 16px;
 }

 .btn-nobg {
     font-size: 17px;
 }

 .btn-nobg:hover {
     color: var(--accent);
 }

 /* SORTER
----------------------------------------------- */
 .sorter {
     position: relative;
     cursor: pointer;
     height: 40px;
     display: flex;
     align-items: center;
     gap: 10px;
     min-width: 162px;
 }

 .sorter form {
     display: none;
     background-color: var(--bg);
     border: 1px solid var(--bdc);
     padding: 0px;
     box-shadow: var(--bsh);
     position: absolute;
     right: 0;
     top: 100%;
     width: 100%;
     z-index: 99;
     border-radius: 10px;
     margin-top: 5px;
 }

 .sorter .sort {
     list-style: none;
     margin: 0;
     padding: 0;
 }

 .sorter a {
     display: block;
     border-bottom: 1px solid var(--bdc);
     padding: 6px 10px;
     color: var(--tt);
     text-decoration: none;
     transition: all 0.2s;
 }

 .sorter a:hover {
     background-color: var(--bg-darker);
     color: var(--accent);
 }

 .sorter .sort li:last-child a {
     border-bottom: none;
 }

 .sort li.asc a,
 .sort li.desc a {
     background-color: var(--bg-darker);
     color: var(--accent);
     font-weight: var(--ui-fw-medium);
 }

 .sort li.asc a::after,
 .sort li.desc a::after {
     content: "\f063";
     font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', 'FontAwesome';
     font-weight: 900;
     font-style: normal;
     font-variant: normal;
     text-rendering: auto;
     display: inline-block;
     margin-left: 10px;
 }

 .sort li.desc a::after {
     content: "\f062";
 }

 /* PAGINATION
----------------------------------------------- */
 .pagination {
     display: flex;
     flex-wrap: wrap;
     align-items: center;
     justify-content: space-between;
     margin-top: 40px;
     margin-bottom: 40px;
     gap: 20px;
 }

 /* Номера страниц (слева) */
 .pagination__pages {
     display: flex;
     align-items: center;
     gap: 8px;
     flex-wrap: wrap;
 }

 .pagination__pages a,
 .pagination__pages span {
     display: flex;
     align-items: center;
     justify-content: center;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: var(--bg);
     border: 1px solid var(--bdc);
     color: var(--tt);
     text-decoration: none;
     font-size: 14px;
     font-weight: var(--ui-fw-medium);
     transition: all 0.2s;
 }

 .pagination__pages a:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
     transform: scale(1.05);
 }

 .pagination__pages span {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
     cursor: default;
 }

 /* Кнопки навигации (справа) */
 .pagination__nav {
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .pagination__nav a,
 .pagination__nav span {
     display: flex;
     align-items: center;
     justify-content: center;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: var(--bg);
     border: 1px solid var(--bdc);
     color: var(--tt);
     text-decoration: none;
     transition: all 0.2s;
     cursor: pointer;
 }

 .pagination__nav a:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
     transform: scale(1.05);
 }

 .pagination__nav span {
     opacity: 0.5;
     cursor: default;
 }

 .pagination__btn {
     font-size: 14px;
 }

 /* Кнопка "Загрузить еще" (внизу по центру) */
 .pagination__btn-loader {
     flex-basis: 100%;
     width: 100%;
     display: flex;
     justify-content: center;
     margin-top: 0;
 }

 .pagination__btn-loader a {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 12px 24px;
     border-radius: 8px;
     background: var(--bg);
     border: 1px solid var(--bdc);
     color: var(--tt);
     text-decoration: none;
     font-size: 14px;
     font-weight: var(--ui-fw-medium);
     transition: all 0.2s;
 }

 .pagination__btn-loader a:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
 }

 .pagination__btn-loader a.loading {
     cursor: wait;
     opacity: 0.7;
 }

 .pagination__btn-loader a span {
     font-size: 14px;
 }

 .pagination__btn-loader a span:not(.fas) {
     color: #ff9800;
 }

 /* FULL STORY PAGE
----------------------------------------------- */
 .page {
     margin-bottom: 40px;
 }

 /* Book Header with Blur Background */
 .book-header {
     position: relative;
     margin-bottom: 40px;
 }

 .book-header__bg {
     position: absolute;
     top: 0;
     left: 50%;
     width: 100vw;
     height: 100%;
     min-height: 160px;
     margin-left: -50vw;
     background-size: cover;
     background-position: center;
     background-repeat: no-repeat;
     filter: blur(20px);
     transform: scale(1.3);
     opacity: 0.2;
     z-index: 0;
 }

 .book-header__wrapper {
     position: relative;
     z-index: 2;
     display: grid;
     grid-template-columns: 200px 1fr 250px;
     gap: 30px;
     align-items: start;
 }

 .book-header__left {
     position: sticky;
     top: 90px;
     z-index: 4;
 }

 .book-header__cover {
     width: 200px;
     height: 300px;
     border-radius: 8px;
     overflow: hidden;
     box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
     background: var(--bg-darker);
     position: relative;
 }

 .book-header__age {
     position: absolute;
     top: 8px;
     right: 8px;
     background: var(--accent);
     color: #fff;
     font-size: 12px;
     font-weight: 600;
     padding: 4px 8px;
     border-radius: 4px;
     z-index: 2;
 }

 .book-header__center {
     display: flex;
     flex-direction: column;
 }

 /* Book Header Right - Author Books */
 .book-header__right {
     position: sticky;
     top: 90px;
     z-index: 4;
     display: flex;
     flex-direction: column;
     gap: 20px;
 }

 .book-header__right .book-card__cover {
     aspect-ratio: 2 / 3;
     height: auto;
 }

 .book-header__right .book-card__img {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 /* Author Book Card */
 .author-book-card {
     display: grid;
     grid-template-columns: 70px 1fr;
     gap: 15px;
     align-items: flex-start;
 }

 .author-book-card__cover {
     width: 70px;
     height: 100px;
     border-radius: 8px;
     overflow: hidden;
     text-decoration: none;
     display: block;
     transition: opacity 0.2s;
 }

 .author-book-card__cover:hover {
     opacity: 0.8;
 }

 .author-book-card__cover img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     display: block;
 }

 .author-book-card__content {
     display: flex;
     flex-direction: column;
     gap: 8px;
     min-width: 0;
 }

 .author-book-card__title {
     margin: 0;
     font-size: 15px;
     line-height: 1.4;
     color: var(--tt);
     font-weight: var(--ui-fw-bolder);
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
     text-overflow: ellipsis;
     text-decoration: none;
     transition: color 0.2s;
 }

 .author-book-card__title:hover {
     color: var(--accent);
 }

 .author-book-card__meta {
     display: flex;
     flex-direction: column;
     gap: 6px;
 }

 .author-book-card__item {
     font-size: 14px;
     display: flex;
     align-items: center;
     gap: 8px;
     color: var(--tt-fade);
 }

 .author-book-card__item i {
     font-size: 14px;
     color: var(--tt-fade);
     flex-shrink: 0;
 }

 .author-book-card__item span {
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

 .author-book-card__item span a {
     color: var(--tt-fade);
     text-decoration: none;
     transition: color 0.2s;
 }

 .author-book-card__item span a:hover {
     color: var(--accent);
 }

 .author-book-card__item .fa-star {
     color: #ffc107;
 }

 .book-header__right-title {
     font-size: 18px;
     font-weight: var(--ui-fw-bolder);
     color: var(--tt);
     margin: 0;
 }

 .book-header__right-list {
     display: flex;
     flex-direction: column;
     gap: 15px;
 }

 .book-header__right .author-book-card {
     width: 100%;
 }

 .book-header__cover-img {
     width: 100%;
     height: 100%;
     object-fit: cover;
     display: block;
 }


 .book-header__title {
     position: relative;
     z-index: 2;
     font-size: 30px;
     font-weight: var(--ui-fw-bolder);
     color: var(--tt);
     margin: 0 0 20px 0;
     line-height: 1.4;
 }

 .book-header__title .fas.fa-pencil {
     font-size: 16px;
     color: var(--tt-fade);
     margin-left: 8px;
 }

 .book-header__center ul {
     list-style: none;
     padding: 0;
     margin: 0 0 20px 0;
     display: flex;
     flex-direction: column;
     gap: 10px;
 }

 .book-header__center li {
     font-size: 16px;
     font-weight: var(--ui-fw-medium);
     color: var(--tt);
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .book-header__center li span {
     font-size: 16px;
     color: var(--tt-fade);
     display: flex;
     align-items: center;
     gap: 6px;
 }

 .book-header__center li a {
     color: var(--accent);
     text-decoration: none;
     transition: color 0.2s;
     font-weight: var(--ui-fw-normal);
 }

 .book-header__center li a:hover {
     color: var(--tt-fade);
 }

 .book-header__bottom {
     position: relative;
     padding: 20px 0 0 0;
     display: flex;
     flex-direction: column;
     gap: 15px;
     width: 100%;
 }


 .book-header__tags {
     display: flex;
     gap: 10px;
     flex-wrap: wrap;
 }

 .book-header__tag {
     display: inline-flex;
     align-items: center;
     padding: 6px 12px;
     border-radius: 20px;
     font-size: 13px;
     font-weight: var(--ui-fw-medium);
     color: #fff;
     transition: opacity 0.2s;
 }

 .book-header__tag:hover {
     opacity: 0.9;
 }

 .book-header__tag--new {
     background: var(--green);
 }

 .book-header__tag--hit {
     background: var(--accent);
 }

 .book-header__rating {
     display: flex;
     align-items: center;
     gap: 15px;
     flex-wrap: wrap;
 }

 .book-header__rating-stars {
     display: flex;
     align-items: center;
     gap: 5px;
     color: var(--tt);
     font-size: 14px;
     font-weight: var(--ui-fw-medium);
 }


 .book-header__info-row {
     display: flex;
     align-items: center;
     justify-content: space-between;
     flex-wrap: wrap;
     gap: 20px;
     margin-bottom: 20px;
 }

 .book-header__meta {
     display: flex;
     align-items: center;
     flex-wrap: wrap;
     gap: 20px;
     font-size: 13px;
     color: var(--tt-fade);
 }

 .book-header__meta-item {
     display: flex;
     align-items: center;
     gap: 6px;
     font-weight: var(--ui-fw-normal);
     color: var(--tt-fade);
 }

 .book-header__meta-item .fas,
 .book-header__meta-item .fal {
     font-size: 14px;
     color: var(--tt-fade);
 }


 /* Полный текст */
 .full-text {
     text-align: left;
     font-size: 16px;
     line-height: 1.7;
     color: var(--tt);
 }

 .full-text p {
     margin: 0 0 15px 0;
 }

 .full-text p:last-child {
     margin-bottom: 0;
 }

 .full-text img {
     max-width: 100%;
     height: auto;
     border-radius: 8px;
     margin: 20px 0;
 }

 .full-text a {
     color: var(--accent);
     text-decoration: none;
     transition: color 0.2s;
 }

 .full-text a:hover {
     color: var(--accent-2);
     text-decoration: underline;
 }

 /* Теги */
 .tags {
     font-size: 0;
 }

 .tags a {
     display: inline-flex;
     align-items: center;
     padding: 6px 12px;
     border-radius: 20px;
     background: var(--bg-darker);
     border: 1px solid var(--bdc);
     color: var(--tt);
     text-decoration: none;
     font-size: 13px;
     transition: all 0.2s;
     margin: 5px 0;
     margin-right: 5px;
 }

 .tags a:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
 }

 /* Связанные новости */
 .gtr__related {
     margin-top: 40px;
 }

 .grid-items {
     display: grid;
     grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
     gap: 20px;
 }

 /* Комментарии */
 .page__comments {
     margin-top: 40px;
     padding-top: 40px;
     border-top: 1px solid var(--bdc);
 }

 .page__comments-info {
     margin-top: 15px;
     padding: 12px 15px;
     background: var(--bg-darker);
     border-left: 3px solid var(--accent);
     border-radius: 4px;
     font-size: 13px;
     color: var(--tt-fade);
     display: flex;
     align-items: center;
     gap: 10px;
 }

 .page__comments-info .fal {
     font-size: 16px;
     color: var(--accent);
 }

 .page__ac {
     margin-top: 20px;
 }

 .page__comments-list {
     margin-top: 30px;
 }

 .page__comments-list--not-comments {
     padding: 20px;
     text-align: center;
 }

 /* TITLE STYLES */
 h1.title,
 .h2.title {
     color: var(--tt);
 }

 /* AUTHORS PAGE */
 .a-area {
     margin-top: 20px;
 }

 .a-search {
     width: 100%;
     height: 40px;
     padding: 0 15px;
     margin: 0 0 20px 0;
     border: 1px solid var(--bdc);
     border-radius: 20px;
     background-color: var(--bg-darker);
     color: var(--tt);
     font-size: 14px;
     font-family: inherit;
     transition: all 0.2s;
     box-sizing: border-box;
 }

 .a-search:focus {
     outline: none;
     border-color: var(--accent);
     background-color: var(--bg);
 }

 .a-search::placeholder {
     color: var(--tt-fade);
 }

 .alfabet {
     list-style: none;
     display: flex;
     flex-wrap: wrap;
     padding: 0;
     margin: 0 0 15px 0;
     gap: 5px;
 }

 .alfabet li {
     margin: 0;
 }

 .alfabet li a {
     display: flex;
     align-items: center;
     justify-content: center;
     min-width: 20px;
     height: 25px;
     padding: 0 5px;
     color: var(--accent);
     text-decoration: none;
     font-size: 13px;
     font-weight: var(--ui-fw-medium);
     transition: all 0.2s;
 }

 .alfabet li a:hover,
 .alfabet li a.active {
     background: var(--accent);
     color: #fff;
     text-decoration: none;
 }


 .a-nav {
     list-style: none;
     padding: 0;
     margin: 40px 0;
     display: flex;
     align-items: center;
     gap: 8px;
     flex-wrap: wrap;
     justify-content: center;
 }

 .a-nav li {
     margin: 0;
 }

 .a-nav li a,
 .a-nav li span {
     display: flex;
     align-items: center;
     justify-content: center;
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: var(--bg);
     border: 1px solid var(--bdc);
     color: var(--tt);
     text-decoration: none;
     font-size: 14px;
     font-weight: var(--ui-fw-medium);
     transition: all 0.2s;
 }

 .a-nav li.active span {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
     cursor: default;
 }

 .a-nav li a:hover {
     background: var(--accent);
     border-color: var(--accent);
     color: #fff;
     transform: scale(1.05);
 }
 
 .dap-sub-btn {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.dap-sub-btn:hover {
    background: #eaf6ff;
    border-color: #3498db;
    transform: scale(1.05);
}

.dap-sub-btn.active {
    background: #3498db;
    color: #fff;
    border-color: #2980b9;
}

.dap-sub-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* =====================================================================
   AUTHOR PROFILE HEADER (XFSEARCH) - ОПТИМИЗИРОВАНО
   ===================================================================== */
.author-header {
    background: var(--bg);
    border: 1px solid var(--bdc);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

/* Верхняя часть: Аватар и Инфо */
.ah-top {
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.ah-avatar {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 4px;
    border: 2px solid var(--bdc);
    background: var(--bg-darker);
    position: relative;
}

.ah-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: var(--bg);
}

.ah-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ah-name {
    margin: 0;
    font-size: 32px;
    font-weight: var(--ui-fw-bolder);
    color: var(--tt);
    line-height: 1.2;
}

.ah-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 15px;
    color: var(--tt-fade);
}

.ah-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(37, 177, 255, 0.1); /* Прозрачный акцентный фон */
    color: var(--accent);
    font-size: 12px;
    font-weight: var(--ui-fw-bolder);
    text-transform: uppercase;
}

/* Кнопка подписки */
.ah-sub-btn {
    background: var(--bg-darker);
    border: 1px solid var(--bdc);
    color: var(--tt);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: var(--ui-fw-medium);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ah-sub-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 177, 255, 0.2);
}

/* Нижняя часть: Табы сортировки */
.ah-bottom {
    background: var(--bg-darker);
    border-top: 1px solid var(--bdc);
    padding: 0 30px;
}

.ah-tabs {
    display: flex;
    gap: 30px;
}

.ah-tab {
    padding: 18px 0;
    font-size: 15px;
    font-weight: var(--ui-fw-medium);
    color: var(--tt-fade);
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.ah-tab:hover {
    color: var(--accent);
}

.ah-tab.active {
    color: var(--accent);
    font-weight: var(--ui-fw-bolder);
    border-bottom-color: var(--accent);
}

/* Адаптивность под мобильные */
@media screen and (max-width: 760px) {
    .ah-top {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }

    .ah-avatar {
        width: 100px;
        height: 100px;
    }

    .ah-name {
        font-size: 26px;
    }

    .ah-meta {
        justify-content: center;
    }

    .ah-bottom {
        padding: 0 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Скрываем скроллбар в Firefox */
    }
    
    .ah-bottom::-webkit-scrollbar {
        display: none; /* Скрываем скроллбар в Chrome/Safari */
    }
    
    .ah-tabs {
        gap: 20px;
    }
    
    .ah-tab {
        white-space: nowrap;
        padding: 15px 0;
        font-size: 14px;
    }
}

/* Контейнер всего блока */
.franchise-block {
    margin: 25px 0;
    padding: 20px;
    background: var(--block-bg, #fff); /* Адаптивно под твою тему */
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.block-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color, #2d3748);
}

/* Сетка списка */
.franchise-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Элемент книги */
.fr-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.fr-item:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateX(5px);
}

/* Обложка */
.fr-img {
    width: 45px;
    height: 65px;
    flex-shrink: 0;
    margin-right: 15px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fr-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Информация */
.fr-info {
    flex-grow: 1;
    min-width: 0;
}

.fr-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #2d3748);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.fr-meta {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

/* Стили спойлера серии */
.fr-spoiler__btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    transition: 0.3s;
}
.fr-spoiler__btn:hover { background: #f1f5f9; }
.fr-arrow { transition: transform 0.3s; }

.fr-spoiler__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
}
.fr-spoiler.is-open .fr-spoiler__content {
    max-height: 3000px;
    transition: max-height 0.4s ease-in;
    margin-top: 10px;
}
.fr-spoiler.is-open .fr-arrow { transform: rotate(180deg); }

/* Скрытие вкладок контента */
.tabs-block__content-item { display: none; }
.tabs-block__content-item.is-active { display: block; }

/* --- ЛЕЧИМ ВЫПАДЕНИЕ ЦЕНТРАЛЬНОГО БЛОКА --- */
.book-header__center {
    min-width: 0; /* КРИТИЧЕСКИ ВАЖНО: не дает флекс-контейнеру растягиваться от длинного текста */
    flex: 1;      /* Чтобы блок занимал все доступное место между левой и правой колонкой */
    text-align: left; /* Жестко сбрасываем центрирование для всего центрального блока */
}

/* --- НОВЫЙ ДИЗАЙН ИНФОРМАЦИИ О КНИГЕ --- */
.book-meta-list li {
    display: flex;
    flex-direction: row; /* ВОЗВРАЩАЕМ В ОДНУ СТРОКУ */
    align-items: center; /* Выравниваем ровно по центру вертикали */
    flex-wrap: wrap; /* Если экран узкий, длинное имя перенесется аккуратно */
    font-size: 14px;
    line-height: 1.4;
}

.book-meta-list .meta-label {
    font-size: 13px; 
    color: #8b8b99;
    margin-bottom: 0; /* Убираем отступ снизу, который делал разрыв */
    margin-right: 8px; /* Добавляем отступ справа (между "Автор:" и именем) */
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Небольшая правка для жанров, чтобы текст "Жанр:" стоял ровно рядом с кнопками */
.book-meta-list li.meta-genres {
    align-items: flex-start; /* Если кнопок много и они в 2 ряда, слово "Жанр" останется сверху */
}
.meta-genres .meta-label {
    margin-top: 5px; /* Центрируем слово "Жанр" относительно первого ряда кнопок */
}

/* --- ОФОРМЛЕНИЕ ЖАНРОВ КАК ТЕГОВ (PILLS) И СКРЫТИЕ СЛЭШЕЙ --- */
.meta-genres {
    margin-top: 5px;
}

.meta-genres-links {
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос на новые строки! */
    gap: 8px;
    font-size: 0; /* МАГИЯ: Прячем текстовые слэши от DLE, делая их размер нулевым */
}

.meta-genres-links a {
    display: inline-block;
    background: rgba(37, 177, 255, 0.1); /* Легкий голубой фон */
    color: #25b1ff; /* Акцентный цвет твоего сайта */
    padding: 6px 12px;
    border-radius: 20px; /* Делаем круглые кнопочки */
    font-size: 12px; /* Возвращаем нормальный размер самим кнопкам жанров */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap; /* Сам тег не рвется на две строки */
}

.meta-genres-links a:hover {
    background: #25b1ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 177, 255, 0.3);
}

/* Адаптация под мобилки */
@media (max-width: 650px) {
    .book-meta-list {
        grid-template-columns: 1fr; /* На телефоне делаем в 1 колонку */
        gap: 15px;
    }
}

/* =====================================================================
   ПОЛНЫЙ СТИЛЬ ДЛЯ СТРАНИЦЫ КАТАЛОГА АВТОРОВ
   - Поиск, алфавитный указатель, сетка авторов, пагинация
   - Использует переменные из base.css
   - Адаптивен и поддерживает тёмную тему
   ===================================================================== */

/* ---------------------- 1. Общий контейнер каталога ---------------------- */
.xc-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    background: var(--bg, #f9f9f9);
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* ---------------------- 2. Поле поиска ---------------------- */
.xc-search {
    width: 100%;
    max-width: 400px;
    margin: 0 0 25px 0;
    padding: 14px 20px 14px 48px; /* место для иконки слева */
    border: 1px solid var(--bdc, #e0e4e8);
    border-radius: 60px;
    background: var(--bg-darker, #ffffff) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 18px center;
    background-size: 20px;
    font-size: 16px;
    color: var(--tt, #333);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.xc-search:focus {
    outline: none;
    border-color: var(--accent, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background-color: var(--bg-darker, #fff);
}

/* ---------------------- 3. Алфавитный указатель ---------------------- */
.alfabet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
}

.alfabet + .alfabet {
    margin-top: -10px; /* уменьшаем отступ между двумя алфавитами */
}

.alfabet li {
    margin: 0;
    padding: 0;
}

.alfabet li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    background: var(--bg-darker, #ffffff);
    border: 1px solid var(--bdc, #e0e4e8);
    border-radius: 40px;
    color: var(--tt, #333);
    font-size: 15px;
    font-weight: var(--ui-fw-medium, 500);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.alfabet li a:hover {
    background: var(--accent, #007bff);
    border-color: var(--accent, #007bff);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.2);
}

.alfabet li a.active {
    background: var(--accent, #007bff);
    border-color: var(--accent, #007bff);
    color: #fff;
    font-weight: var(--ui-fw-bolder, 700);
    cursor: default;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* ---------------------- 4. Контейнер списка авторов ---------------------- */
.xc-content {
    margin-top: 30px;
}

/* Сетка авторов (карточки) */
.xc-data,
.authors-list,
.readers-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    margin: 30px 0 40px !important;
    min-height: 300px;
}

/* ---------------------- 5. Карточка автора / чтеца ---------------------- */
.xc-data a,
.cat-item,
.a-flex:not(.a-nav) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--bg-darker) !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    border: 1px solid var(--bdc) !important;
    color: var(--tt) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.25s cubic-bezier(0.02, 0.01, 0.47, 1) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
}

/* Градиентный акцент при наведении (псевдоэлемент) */
.xc-data a::after,
.cat-item::after,
.a-flex:not(.a-nav)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Эффект при наведении на карточку */
.xc-data a:hover,
.cat-item:hover,
.a-flex:not(.a-nav):hover {
    background-color: var(--bg) !important;
    border-color: var(--accent) !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15), var(--bsh) !important;
}

.xc-data a:hover::after,
.cat-item:hover::after,
.a-flex:not(.a-nav):hover::after {
    opacity: 1;
}

/* Имя автора (текст слева) */
.xc-data a span:first-child,
.cat-item span:first-child,
.a-item:first-child {
    font-weight: var(--ui-fw-medium, 500) !important;
    font-size: 16px !important;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
    padding-left: 0 !important;
    letter-spacing: 0.01em;
}

/* Убираем возможные иконки FontAwesome, нарушающие выравнивание */
.a-item:first-child::before {
    display: none !important;
}

/* Счётчик книг (бейдж) */
.cat-count,
.xc-data span:last-child,
.a-count,
.xc-item:last-child {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
    font-weight: var(--ui-fw-bolder, 700) !important;
    background: linear-gradient(145deg, var(--accent), #1a8cff) !important;
    color: #fff !important;
    padding: 4px 14px !important;
    border-radius: 30px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    box-shadow: 0 2px 6px rgba(0, 122, 255, 0.3) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Эффект на бейдж при наведении на карточку */
.xc-data a:hover .cat-count,
.cat-item:hover .cat-count,
.a-flex:not(.a-nav):hover .a-count {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.4) !important;
}

/* ---------------------- 6. Пагинация ---------------------- */
.xc-nav,
.a-nav {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 50px 0 30px !important;
    list-style: none !important;
    padding: 0 !important;
    width: 100% !important;
    grid-column: 1 / -1 !important;
}

.xc-nav li,
.a-nav li {
    margin: 0 !important;
}

.xc-nav li a,
.xc-nav li span,
.a-nav li a,
.a-nav li span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background-color: var(--bg) !important;
    border: 1px solid var(--bdc) !important;
    color: var(--tt) !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: var(--ui-fw-medium, 500) !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

/* Ховер для кнопок пагинации */
.xc-nav li a:hover,
.a-nav li a:hover {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 122, 255, 0.3) !important;
}

/* Активная страница */
.xc-nav li.active a,
.xc-nav li.active span,
.a-nav li.active a,
.a-nav li.active span {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
    cursor: default;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4) !important;
}

/* Кнопки навигации (предыдущая / следующая) */
.xc-nav li:first-child a,
.xc-nav li:last-child a,
.a-nav li:first-child a,
.a-nav li:last-child a {
    font-size: 18px !important;
}

/* ---------------------- 7. Анимация появления карточек ---------------------- */
.xc-data a,
.cat-item,
.a-flex:not(.a-nav) {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержки для последовательного появления (по желанию) */
.xc-data a:nth-child(odd),
.cat-item:nth-child(odd),
.a-flex:nth-child(odd) {
    animation-delay: 0.05s;
}
.xc-data a:nth-child(even),
.cat-item:nth-child(even),
.a-flex:nth-child(even) {
    animation-delay: 0.1s;
}

/* ---------------------- 8. Тёмная тема ---------------------- */
[data-theme="dark"] .xc-area {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .xc-search {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f0f0f0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="%23aaa" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
}

[data-theme="dark"] .xc-search:focus {
    border-color: var(--accent, #3399ff);
    box-shadow: 0 0 0 3px rgba(51, 153, 255, 0.2);
}

[data-theme="dark"] .alfabet li a {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #eee;
}

[data-theme="dark"] .alfabet li a:hover,
[data-theme="dark"] .alfabet li a.active {
    background: var(--accent, #2b6eb0);
    border-color: var(--accent, #2b6eb0);
    color: #fff;
}

[data-theme="dark"] .xc-data a,
[data-theme="dark"] .cat-item,
[data-theme="dark"] .a-flex:not(.a-nav) {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .xc-data a:hover,
[data-theme="dark"] .cat-item:hover,
[data-theme="dark"] .a-flex:not(.a-nav):hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .cat-count,
[data-theme="dark"] .xc-data span:last-child,
[data-theme="dark"] .a-count,
[data-theme="dark"] .xc-item:last-child {
    background: linear-gradient(145deg, #2b6eb0, #1a4b7a) !important;
    box-shadow: 0 2px 8px rgba(0, 100, 200, 0.3) !important;
}

/* ---------------------- 9. Мобильная адаптация ---------------------- */
@media (max-width: 768px) {
    .xc-search {
        max-width: 100%;
        padding: 12px 16px 12px 44px;
        font-size: 15px;
    }

    .alfabet {
        gap: 4px;
    }

    .alfabet li a {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 0 6px;
    }

    .xc-data,
    .authors-list,
    .readers-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 12px !important;
    }

    .xc-data a,
    .cat-item,
    .a-flex:not(.a-nav) {
        padding: 12px 16px !important;
    }

    .xc-data a span:first-child,
    .cat-item span:first-child,
    .a-item:first-child {
        font-size: 14px !important;
    }

    .cat-count,
    .xc-data span:last-child,
    .a-count,
    .xc-item:last-child {
        font-size: 11px !important;
        padding: 3px 10px !important;
    }

    .xc-nav,
    .a-nav {
        gap: 6px !important;
        flex-wrap: wrap;
    }

    .xc-nav li a,
    .xc-nav li span,
    .a-nav li a,
    .a-nav li span {
        width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .alfabet {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .alfabet::-webkit-scrollbar {
        height: 3px;
    }

    .alfabet::-webkit-scrollbar-thumb {
        background: var(--bdc, #ccc);
        border-radius: 10px;
    }

    .xc-data,
    .authors-list,
    .readers-list {
        grid-template-columns: 1fr !important;
    }
}

/* Бейдж завершенной серии */
.fr-badge-completed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-radius: 12px;
    font-size: 12px;
    font-weight: var(--ui-fw-bolder, 700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .fr-badge-completed {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

/* Контейнер для вкладок */
.fav-tabs-container {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    padding: 5px 2px 15px 2px;
    overflow-x: auto; /* Включаем горизонтальный скролл */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Плавность на iOS */
}

/* Скрываем некрасивый стандартный скроллбар */
.fav-tabs-container::-webkit-scrollbar {
    height: 4px;
}
.fav-tabs-container::-webkit-scrollbar-track {
    background: transparent;
}
.fav-tabs-container::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Базовый стиль ссылки-вкладки */
.fav-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #ffffff;
    color: #718096; /* Спокойный серый */
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Состояние при наведении */
.fav-tab-link:hover {
    background: #f8fafc;
    color: #2d3748;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Стиль активной вкладки */
.fav-tab-link.is-active {
    background: #fff5f5; /* Мягкий розово-белый */
    color: #e53e3e;      /* Твой основной красный */
    border-color: #feb2b2;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.12);
}

/* Стили иконок внутри вкладок */
.fav-tab-link i {
    font-size: 16px;
    transition: transform 0.2s;
}

.fav-tab-link.is-active i {
    color: #e53e3e;
    transform: scale(1.1);
}

/* Адаптация под темную тему (если планируешь) */
@media (prefers-color-scheme: dark) {
    /* Можно добавить стили здесь, если сайт поддерживает Dark Mode */
}

/* Стили для умных закладок */
.custom-fav-box { position: relative; }
.custom-fav-trigger { background: transparent; border: none; cursor: pointer; padding: 0; outline: none; transition: 0.2s; }
.custom-fav-trigger:hover { transform: scale(1.1); }

.custom-fav-dropdown { 
    position: absolute; top: 35px; right: 0; background: #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    border-radius: 12px; width: 180px; z-index: 999; display: none; flex-direction: column; overflow: hidden;
    border: 1px solid #e2e8f0;
}
.custom-fav-dropdown.show { display: flex; animation: favFadeIn 0.2s ease; }

@keyframes favFadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.custom-fav-dropdown button { 
    padding: 12px 15px; text-align: left; border: none; background: transparent; 
    font-size: 14px; font-weight: 500; cursor: pointer; border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; gap: 10px; color: #4a5568; transition: 0.2s;
}
.custom-fav-dropdown button:hover { background: #f8fafc; color: #3182ce; padding-left: 20px; }
.custom-fav-dropdown button:last-child { border-bottom: none; }
.custom-fav-dropdown button.fav-del { color: #e53e3e; }
.custom-fav-dropdown button.fav-del:hover { background: #fff5f5; color: #c53030; }

/* Контейнер кнопки и меню */
.book-header__action--fav { 
    position: relative !important; 
    overflow: visible !important; 
    display: inline-flex;
}

/* Выпадающее меню */
.fav-dropdown-menu {
    position: absolute; 
    top: calc(100% + 8px); 
    left: 0; 
    width: 190px;
    background: #ffffff; 
    border-radius: 12px; 
    /* Более мягкая и глубокая тень */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0; 
    padding: 6px; 
    z-index: 9999;
    display: none; 
    flex-direction: column;
    /* Анимация появления */
    animation: favFadeIn 0.2s ease-out;
}

@keyframes favFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Кнопки внутри меню */
.fav-dropdown-menu button {
    width: 100%; 
    padding: 10px 12px; 
    background: none; 
    border: none; 
    text-align: left;
    font-size: 14px; 
    font-family: inherit; 
    font-weight: 500; 
    color: #4a5568;
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
    border-radius: 8px;
    outline: none;
    margin-bottom: 2px;
}

/* Иконки в меню */
.fav-dropdown-menu button i { 
    width: 18px; 
    text-align: center; 
    font-size: 15px; 
    color: #a0aec0; 
    transition: 0.2s; 
}

/* Ховер эффект */
.fav-dropdown-menu button:hover { 
    background: #f1f5f9; 
    color: #e53e3e; 
}

.fav-dropdown-menu button:hover i { 
    color: #e53e3e; 
    transform: scale(1.1);
}

/* Стили для кнопки удаления */
.fav-dropdown-menu .fav-del { 
    color: #e53e3e; 
    border-top: 1px solid #edf2f7; 
    margin-top: 4px; 
    padding-top: 12px; 
    border-radius: 0 0 8px 8px;
}

.fav-dropdown-menu .fav-del:hover { 
    background: #fff5f5; 
    color: #c53030; 
}

/* Главная кнопка-триггер (сердечко) */
.fav-trigger-btn {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 8px; 
    border-radius: 10px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer; 
    transition: all 0.2s; 
    outline: none;
}

.fav-trigger-btn:hover { 
    background: #ffffff;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.fav-trigger-btn:active {
    transform: scale(0.95);
}

/* Анимация вращения */
@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.is-loading {
    animation: fa-spin 1s infinite linear;
    display: inline-block;
}

/* Цвет спиннера во время загрузки */
.fav-trigger-btn.loading-state span {
    color: #a0aec0 !important; /* Нейтральный серый при загрузке */
    opacity: 0.6;
}

.fav-tab-count {
    font-style: normal;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 4px;
    font-weight: 700;
    color: #718096;
}

.fav-tab-link.is-active .fav-tab-count {
    background: #e53e3e; /* Твой основной красный */
    color: #fff;
}

/* Бейдж чтеца (внутри каждой книги в списке) */
.fr-badge-reader {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f0fe;
    color: #1a73e8;
    margin-top: 5px;
}

body.dark .fr-badge-reader {
    background: rgba(26, 115, 232, 0.15);
    color: #8ab4f8;
    border: 1px solid rgba(138, 180, 248, 0.2);
}

/* Бейдж завершенности серии (Ультра-минимализм) */
.fr-badge-completed {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 400;
    color: #8b8b99; /* Цвет как у остального текста в мета-блоке */
    margin-left: 6px;
    padding: 0;
    background: transparent;
    border: none;
    text-transform: none;
}

/* Только галочка остается зеленой */
.fr-badge-completed i {
    color: #48bb78; /* Спокойный зеленый */
    font-size: 12px;
}

/* Темная тема */
body.dark .fr-badge-completed,
[data-theme="dark"] .fr-badge-completed {
    color: #a0aec0; 
    background: transparent;
    border: none;
}

body.dark .fr-badge-completed i,
[data-theme="dark"] .fr-badge-completed i {
    color: #38a169; 
}

/* --- Блок "Другая озвучка" --- */
.other-voices-block {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-darker); 
    border: 1px solid var(--bdc);
    border-radius: 12px;
}

.ov-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--tt);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ov-title i {
    color: var(--accent);
}

.ov-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ov-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--bdc);
    border-radius: 8px;
    text-decoration: none;
    color: var(--tt);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.ov-item i {
    color: var(--tt-fade);
    transition: color 0.2s;
}

.ov-item:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 177, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.ov-item:hover i {
    color: var(--accent);
}

/* =========================================
   ТЕМНАЯ ТЕМА ДЛЯ БЛОКА "ДРУГАЯ ОЗВУЧКА"
   ========================================= */
body.dark .other-voices-block,
[data-theme="dark"] .other-voices-block {
    background: rgba(255, 255, 255, 0.02); 
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .ov-item,
[data-theme="dark"] .ov-item {
    background: rgba(0, 0, 0, 0.2); /* Делаем плашки чуть темнее фона */
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark .ov-item:hover,
[data-theme="dark"] .ov-item:hover {
    background: rgba(37, 177, 255, 0.15); /* Усиливаем синюю подсветку на темном */
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.genre-group {
    margin-bottom: 25px; /* Отступ между группами */
}

.genre-group__title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--accent); /* Твой основной синий цвет */
    border-bottom: 1px solid var(--bdc);
    padding-bottom: 5px;
}

.categorymenu__list {
    list-style: none;
    padding-left: 0;
}

/* Контейнер для всех групп */
.categorymenu-grid3 {
    display: block; /* Отменяем гриды, если они были */
    column-count: 3; /* Разделяем на 3 колонки */
    column-gap: 25px; /* Расстояние между колонками */
    width: 100%;
}

/* Сама группа жанров */
.genre-group {
    display: inline-block; /* Важно: чтобы блок не разрывался между колонками */
    width: 100%;
    margin-bottom: 20px; /* Отступ между блоками по вертикали */
    background: var(--bg-darker); /* Твой фон */
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--bdc);
    break-inside: avoid; /* Дополнительная защита от разрыва блока */
}

/* Заголовок группы */
.genre-group__title {
    margin-top: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
    border-bottom: 1px solid var(--bdc);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

/* Адаптивность для мобилок */
@media (max-width: 992px) {
    .categorymenu-grid3 { column-count: 2; } /* На планшетах 2 колонки */
}

@media (max-width: 600px) {
    .categorymenu-grid3 { column-count: 1; } /* На телефонах 1 колонка */
}

/* Подсветка первых трех самых популярных жанров в группе */
.categorymenu__list .categorymenu__item:nth-child(-n+3) .categorymenu__item-text {
    font-weight: 700;
    color: var(--tt);
}

.categorymenu__list .categorymenu__item:nth-child(1) i {
    color: #f1c40f; /* Золотая иконка для самого топа */
}