.search-box {
    display: flex;
    align-items: center;
    margin-right: 16px;
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f7f7fb;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-right: 12px;
}
.search-input-wrapper input {
    border: none;
    background: transparent;
    padding: 6px 36px 6px 14px;
    font-size: 1rem;
    border-radius: 24px;
    width: 160px;
    color: #222;
    height: 36px;
    line-height: 1.2;
}
.search-input-wrapper input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px #a88cff33;
}
.search-btn {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(0%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-btn svg {
    color: #aaa;
    transition: color 0.2s;
    width: 20px;
    height: 20px;
    display: block;
}
.search-btn:hover svg {
    color: #7a4cff;
}
.search-box input,
.filter-group input[type="text"] {
    width: 100%;
    padding: 0.65rem 2.4rem 0.65rem 0.85rem;
    font-size: 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    box-sizing: border-box;
}

.search-box input:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft);
    background: var(--bg-primary);
}

.search-box button[type="submit"] {
    background: none;
    border: none;
    padding: 0;
    margin-left: -32px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.search-box svg {
    color: var(--text-tertiary);
    transition: color 0.2s;
}
.search-box button[type="submit"]:hover svg {
    color: var(--primary-color);
}
/* Стили для жанров в sidebar */
#genresList a {
    color: #222;
    text-decoration: none;
}
#genresList a:hover {
    color: #2a7cff;
}
/* Feedback Form Styles */
.feedback-form {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    padding: 32px 24px;
}
.feedback-errors {
    color: #c00;
    background: #fff0f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 16px;
}
.feedback-errors ul {
    margin: 0;
    padding-left: 18px;
}
.feedback-field {
    margin-bottom: 22px;
}
.feedback-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}
.feedback-btn {
    width: 100%;
    font-size: 18px;
    padding: 12px 0;
    border-radius: 8px;
    background: #2a7cff;
    color: #fff;
    border: none;
    font-weight: 600;
    transition: background .2s;
}
.feedback-btn:hover {
    background: #1a5fcc;
}
/* Кнопки фильтрации */
.filter-apply-btn {
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    min-width: 120px;
}
.filter-apply-btn:hover, .filter-apply-btn:focus {
    background: #357ab8;
    outline: none;
}
/* Применить фильтры */
.filter-apply-btn {
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(100, 100, 200, 0.10);
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
}
.filter-apply-btn:hover, .filter-apply-btn:focus {
    background: linear-gradient(90deg, #fc5c7d 0%, #6a82fb 100%);
    transform: translateY(-2px) scale(1.03);
    outline: none;
}
/*PDF Reader Modal*/
.reader-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 16, 36, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.reader-modal.active {
    display: flex;
}
.reader-header {
    width: 100%;
    height: 48px;
    background: #181818;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-radius: 16px 16px 0 0;
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0 1.5rem;
}
.close-reader {
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    margin-right: 16px;
    margin-left: auto;
    transition: color 0.2s;
    z-index: 3;
}
.reader-content {
    width: 75vw;
    height: 75vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    margin: 0;
    padding: 0;
}
#pdfViewer {
    width: 100%;
    height: calc(100% - 48px);
    border: none;
    background: #fff;
    border-radius: 0 0 16px 16px;
}
/* блок рейтинга */
.book-rating {
    margin: 18px 0 12px 0;
    padding: 5px 0px;
    background: var(--bg-secondary);
    display: inline-block;
}

.rating-label {
    font-size: 15px;
    color: #888;
    margin-bottom: 6px;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-icon {
    font-size: 2rem;
    color: #FFD700;
    margin-right: 4px;
    filter: drop-shadow(0 1px 2px #e0c20080);
}

.rating-value {
    font-size: 1.7rem;
    font-weight: bold;
    color: #222;
    margin-right: 2px;
}

.rating-max {
    font-size: 1.1rem;
    color: #aaa;
}
    background: var(--bg-secondary);
    border-color: #bfa92e;
    color: #ffe066;
}
[data-theme="dark"] .star-badge,
[data-theme="dark"] .star-badge-value {
    color: #ffe066;
}
/*Book Page */
.book-page {
    padding: 3.5rem 0 2.5rem;
}
.book-details {
    display: flex;
    gap: 3rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.book-cover-section {
    flex: 0 0 260px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.book-cover-wrapper {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-large {
    width: 180px;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 32px rgba(91,33,182,0.10);
    background: var(--bg-tertiary);
}

.book-info-section {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.book-badge {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.3em 0.9em;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(91,33,182,0.10);
}

.book-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

/* Catalog Card Rating Badge */
.book-card {
    position: relative;
}
/* Стили для бэйджа статуса книги */
.book-status-badge {
    position: absolute;
    top: 0.7em;
    right: 0.7em;
    background: linear-gradient(90deg, #f0f4ff 0%, #e0e7ff 100%);
    border: 2px solid #3b82f6;
    border-radius: 1.2em;
    padding: 0.08em 0.5em 0.08em 0.3em;
    display: flex;
    align-items: center;
    gap: 0.4em;
    box-shadow: 0 2px 12px rgba(59,130,246,0.12);
    z-index: 2;
}

.status-badge {
    font-size: 0.92em;
    font-weight: 600;
    color: #2563eb;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.3em;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px #b3c6ff80;
}
.status-new {
    color: #10b981;
    border-radius: 1em;
    padding: 0.05em 0.3em;
}
.status-recommended {
    color: #f59e42;
    border-radius: 1em;
    padding: 0.05em 0.3em;
}
.status-best {
    color: #ef4444;
    border-radius: 1em;
    padding: 0.05em 0.3em;
}
.status-badge .status-icon {
    font-size: 1em;
    margin-right: 0.2em;
    filter: drop-shadow(0 1px 2px #b3c6ff80);
}
}
.status-badge {
    font-size: 1em;
    font-weight: 500;
    color: #2563eb;
    background: transparent;
    border: none;
    padding: 0;
}
.status-new { color: #10b981; }
.status-recommended { color: #f59e42; }
.status-best { color: #ef4444; }
.star-badge {
    color: #fbbf24;
    font-size: 1.1em;
    font-weight: bold;
    margin-right: 0.1em;
}
.star-badge-value {
    color: #fbbf24;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.book-genre {
    color: var(--text-tertiary);
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
}

.book-author {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
}

    .book-rating .stars {
        font-size: 1.25rem;
        color: #fbbf24;
    }

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

    .book-meta .meta-item {
        color: var(--text-tertiary);
        font-size: 0.98rem;
    }

.book-description {
    margin: 1.2rem 0 0.7rem;
}

    .book-description h3 {
        font-size: 1.1rem;
        color: var(--primary-color);
        margin-bottom: 0.3rem;
    }

    .book-description p {
        color: var(--text-primary);
        font-size: 1.05rem;
        line-height: 1.7;
    }

.book-formats {
    margin-bottom: 0.7rem;
}

.format-badges {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

    .format-badges .format-badge {
        background: var(--primary-soft);
        color: var(--primary-color);
        font-size: 0.95rem;
        font-weight: 600;
        border-radius: 6px;
        padding: 0.25em 0.8em;
        box-shadow: 0 1px 4px rgba(91,33,182,0.07);
    }

.book-actions {
    display: flex;
    gap: 1.2rem;
    margin: 1.2rem 0 0.7rem;
}

.primary-btn, .secondary-btn {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.7em 1.5em;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.primary-btn {
    background: var(--primary-color);
    color: #fff;
}

    .primary-btn:hover {
        background: var(--primary-hover);
    }

.secondary-btn {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

    .secondary-btn:hover {
        background: var(--primary-soft);
    }

.book-stats {
    display: flex;
    gap: 2.2rem;
    margin-top: 0.7rem;
    color: var(--text-tertiary);
    font-size: 0.98rem;
}

    .book-stats .stat-item {
        display: flex;
        align-items: center;
        gap: 0.5em;
    }
/* ===== Global Styles ===== */

@font-face {
    font-family: 'ALS Sirius';
    src: url("/static/main/fonts/ALS_Sirius_Regular_0.95.otf") format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ALS Sirius';
    src: url("/static/main/fonts/ALS_Sirius_Bold_0.95.otf") format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #5b21b6;
    --primary-hover: #4c1d95;
    --primary-soft: rgba(91, 33, 182, 0.08);
    --accent-color: #7c3aed;
    --accent-hover: #6d28d9;
    --secondary-color: #6d28d9;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f7fc;
    --bg-tertiary: #f0eef7;
    --text-primary: #1a1033;
    --text-secondary: #5c586e;
    --text-tertiary: #9490a6;
    --border-color: #e8e5f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.10);
    --shadow-glow: 0 0 20px rgba(91, 33, 182, 0.10);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0e0b18;
    --bg-secondary: #171328;
    --bg-tertiary: #231e3a;
    --text-primary: #f4f2fa;
    --text-secondary: #b5b0c8;
    --text-tertiary: #7a7590;
    --border-color: #2a2545;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(91, 33, 182, 0.25);
}

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

body {
    font-family: 'ALS Sirius', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(180%);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(91, 33, 182, 0.08);
    box-shadow: 0 1px 12px rgba(91, 33, 182, 0.06);
}

[data-theme="dark"] .header {
    background: rgba(14, 11, 24, 0.82);
    border-bottom: 1px solid rgba(91, 33, 182, 0.15);
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'ALS Sirius', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    transition: var(--transition);
}

    .logo:hover {
        transform: translateY(-2px);
        filter: brightness(1.1);
    }

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
}

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--primary-color);
        border-radius: 1px;
        transition: width 0.3s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--primary-color);
    }

.nav-catalog-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(91, 33, 182, 0.3);
}

    .nav-catalog-btn svg {
        flex-shrink: 0;
    }

    .nav-catalog-btn:hover {
        background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
        transform: translateY(-1px);
        box-shadow: 0 4px 20px rgba(91, 33, 182, 0.4);
    }

    .nav-catalog-btn:active {
        transform: translateY(0);
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

    .search-box input {
        padding: 0.75rem 2.5rem 0.75rem 1rem;
        border: 1.5px solid var(--border-color);
        border-radius: var(--radius-md);
        background: var(--bg-secondary);
        color: var(--text-primary);
        width: 300px;
        transition: var(--transition);
    }

        .search-box input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px var(--primary-soft);
            background: var(--bg-primary);
        }

    .search-box svg {
        position: absolute;
        right: 1rem;
        color: var(--text-tertiary);
    }

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

    .icon-btn:hover {
        background: var(--primary-soft);
        color: var(--primary-color);
        transform: scale(1.08);
    }

    .icon-btn svg {
        overflow: visible;
    }

/* ===== Theme Button Animation ===== */
.theme-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.icon-btn:hover .theme-icon {
    transform: rotate(20deg) scale(1.1);
}

[data-theme="dark"] .icon-btn .theme-icon {
    filter: brightness(1.3) drop-shadow(0 0 4px rgba(124, 58, 237, 0.3));
}

[data-theme="dark"] .icon-btn:hover .theme-icon {
    filter: brightness(1.5) drop-shadow(0 0 8px rgba(124, 58, 237, 0.5));
}

[data-theme="dark"] .icon-btn {
    background: var(--bg-tertiary);
}

    [data-theme="dark"] .icon-btn:hover {
        background: rgba(91, 33, 182, 0.3);
        color: #f4f2fa;
    }

/* ===== Catalog Sidebar ===== */
.catalog-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    transition: left 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

    .catalog-sidebar.active {
        left: 0;
    }

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

    .close-btn:hover {
        background: var(--primary-soft);
        color: var(--primary-color);
    }

.catalog-content {
    padding: 1.5rem;
}

.catalog-category h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.catalog-category ul {
    list-style: none;
}

.catalog-category li {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

    .catalog-category li:hover {
        background: var(--primary-soft);
        color: var(--primary-color);
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 11, 24, 0.6);
    backdrop-filter: blur(4px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
}

    .modal-content h3 {
        margin-bottom: 1.5rem;
        text-align: center;
    }

/* ===== Language Button ===== */
.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

    .lang-btn #langFlagImg {
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .lang-btn:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(91, 33, 182, 0.3);
    }

    .lang-btn:active {
        transform: translateY(0);
    }

.lang-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

    .lang-option .lang-flag {
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }

    .lang-option:hover {
        border-color: var(--primary-color);
        background: var(--primary-soft);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .lang-option:active {
        transform: translateY(0);
    }

[data-theme="dark"] .lang-btn {
    border-color: var(--border-color);
}

[data-theme="dark"] .lang-option {
    border-color: var(--border-color);
}

/* ===== Hero Section ===== */
.hero {
    padding: 6rem 0;
    background: radial-gradient(ellipse 70% 50% at 75% 30%, rgba(91, 33, 182, 0.06) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 15% 70%, rgba(109, 40, 217, 0.05) 0%, transparent 70%), linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

    .hero::before {
        content: '';
        position: absolute;
        top: -120px;
        right: -80px;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(91, 33, 182, 0.05) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .hero::after {
        content: '';
        position: absolute;
        bottom: -100px;
        left: -60px;
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

 .cta-btn {
    padding: 1rem 2.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.25);
    letter-spacing: 0.01em;
    text-decoration: none;
}

    .cta-btn:hover {
        background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(91, 33, 182, 0.35);
    }

[data-theme="dark"] .cta-btn {
    color: #ffffff;
}

/* ===== Hero Image ===== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 60%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.15));
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

    .hero-image:hover {
        transform: scale(1.03) translateY(-4px);
    }

.book-stack {
    position: relative;
    width: 340px;
    height: 300px;
}

.book-3d {
    position: absolute;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.45s ease;
}

/* Bottom layer (flat books) */
.book-1 {
    width: 180px;
    height: 28px;
    background: linear-gradient(90deg, #2d6a4f, #40916c);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    border-radius: 3px 6px 6px 3px;
    z-index: 1;
}

.book-2 {
    width: 170px;
    height: 26px;
    background: linear-gradient(90deg, #b5651d, #cd853f);
    bottom: 26px;
    left: 50%;
    transform: translateX(-46%) rotate(1deg);
    border-radius: 3px 6px 6px 3px;
    z-index: 2;
}

.book-3 {
    width: 175px;
    height: 30px;
    background: linear-gradient(90deg, #c2185b, #e91e63);
    bottom: 50px;
    left: 50%;
    transform: translateX(-52%) rotate(-1.5deg);
    border-radius: 3px 6px 6px 3px;
    z-index: 3;
}

.book-4 {
    width: 165px;
    height: 24px;
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    bottom: 78px;
    left: 50%;
    transform: translateX(-48%) rotate(2.5deg);
    border-radius: 3px 6px 6px 3px;
    z-index: 4;
}

/* Top layer */
.book-5 {
    width: 110px;
    height: 150px;
    background: linear-gradient(160deg, #f4845f, #f76707);
    bottom: 100px;
    left: 28%;
    transform: rotate(-8deg);
    border-radius: 4px 8px 8px 4px;
    z-index: 6;
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.22);
}

    .book-5::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 8px;
        height: 100%;
        background: rgba(0, 0, 0, 0.12);
        border-radius: 4px 0 0 4px;
    }

.book-6 {
    width: 105px;
    height: 140px;
    background: linear-gradient(160deg, #7c3aed, #5b21b6);
    bottom: 100px;
    left: 48%;
    transform: rotate(5deg);
    border-radius: 4px 8px 8px 4px;
    z-index: 5;
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.22);
}

    .book-6::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 8px;
        height: 100%;
        background: rgba(0, 0, 0, 0.12);
        border-radius: 4px 0 0 4px;
    }

.book-7 {
    width: 100px;
    height: 135px;
    background: linear-gradient(160deg, #0ea5e9, #0284c7);
    bottom: 105px;
    left: 60%;
    transform: rotate(12deg);
    border-radius: 4px 8px 8px 4px;
    z-index: 7;
    box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.22);
}

    .book-7::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 8px;
        height: 100%;
        background: rgba(0, 0, 0, 0.12);
        border-radius: 4px 0 0 4px;
    }

/* Hover: books slightly shift */
.book-stack:hover .book-5 {
    transform: rotate(-12deg) translateY(-6px);
    box-shadow: 3px 8px 20px rgba(0, 0, 0, 0.28);
}

.book-stack:hover .book-6 {
    transform: rotate(2deg) translateY(-8px);
    box-shadow: 3px 8px 20px rgba(0, 0, 0, 0.28);
}

.book-stack:hover .book-7 {
    transform: rotate(16deg) translateY(-10px);
    box-shadow: 3px 8px 20px rgba(0, 0, 0, 0.28);
}

/* Shadow under the pile  */
.book-stack::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 15%;
    width: 70%;
    height: 16px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/*Books Section*/
.books-section {
    padding: 1rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

    .section-header h2 {
        font-size: 2rem;
        font-weight: 700;
        color: var(--text-primary);
    }

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

    .view-all::after {
        content: ' →';
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .view-all:hover {
        color: var(--primary-hover);
    }

        .view-all:hover::after {
            transform: translateX(4px);
        }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
}

/* ===== Book Card ===== */
.book-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

    .book-card:hover {
        transform: scale(1.035) translateY(-6px);
        box-shadow: 0 8px 32px rgba(91,33,182,0.13), var(--shadow-glow);
        border-color: var(--primary-color);
        z-index: 2;
    }

.book-more-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(91,33,182,0.10);
    transition: var(--transition);
    letter-spacing: 0.01em;
    align-self: flex-start;
}

    .book-more-btn:hover, .book-card:focus .book-more-btn {
        background: linear-gradient(135deg, var(--primary-hover), var(--primary-color));
        color: #fff;
        transform: scale(1.07);
        box-shadow: 0 6px 24px rgba(91,33,182,0.18);
    }
}

@media (max-width: 600px) {
    .books-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }

    .book-card {
        border-radius: 10px;
        font-size: 0.93rem;
    }

    .book-info {
        padding: 0.6rem;
    }

    .book-more-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.97rem;
        border-radius: 8px;
    }
}

.book-card:hover .about-card-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.3);
}

.book-cover {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
}

    .book-cover img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.book-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.badge-new {
    background: rgba(16, 185, 129, 0.9);
}

.badge-recommended {
    background: rgba(91, 33, 182, 0.9);
}

.badge-best {
    background: rgba(76, 29, 149, 0.9);
}

.book-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    color: var(--primary-color);
    font-size: 1rem;
}

    .star.empty {
        color: var(--text-tertiary);
    }

.rating-value {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/*Footer*/
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 0;
    margin-top: 2rem;
}

[data-theme="dark"] .footer {
    border-top: 1px solid rgba(91, 33, 182, 0.12);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2.5rem;
}

.footer-brand .logo {
    margin-bottom: 0.75rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.footer-socials {
    display: flex;
    gap: 0.625rem;
}

.social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    transition: var(--transition);
}

    .social-link:hover {
        background: var(--primary-color);
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(91, 33, 182, 0.3);
    }

.footer-section h4 {
    margin-bottom: 1.125rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

    .footer-links a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        transition: var(--transition);
        position: relative;
        padding-left: 0;
    }

        .footer-links a::before {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 0;
            height: 1.5px;
            background: var(--primary-color);
            border-radius: 1px;
            transition: width 0.3s ease;
        }

        .footer-links a:hover {
            color: var(--primary-color);
        }

            .footer-links a:hover::before {
                width: 100%;
            }

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 1.25rem 0;
    text-align: center;
}

    .footer-bottom p {
        color: var(--text-tertiary);
        font-size: 0.825rem;
    }

[data-theme="dark"] .footer-bottom {
    border-top-color: rgba(91, 33, 182, 0.1);
}

/* Catalog Page Layout */
.catalog-page {
    padding: 3rem 0;
}

.catalog-page-header {
    margin-bottom: 2.5rem;
}

    .catalog-page-header h1 {
        font-size: 2.25rem;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary-hover) 0%, var(--accent-color) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
    }

.catalog-page-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Filters Sidebar */
.filters {
    position: sticky;
    top: 90px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    margin-bottom: 1.5rem;
}

    .filter-group:last-of-type {
        margin-bottom: 1.25rem;
    }

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .filter-checkbox:hover {
        background: var(--primary-soft);
        color: var(--primary-color);
    }

    .filter-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        accent-color: var(--primary-color);
        cursor: pointer;
    }

.filter-reset-btn {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

    .filter-reset-btn:hover {
        background: var(--primary-soft);
        color: var(--primary-color);
        border-color: var(--primary-color);
    }

.catalog-main {
    min-height: 400px;
}

.no-results {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    padding: 4rem 0;
}

html {
    scroll-behavior: smooth;
}

/* ===== Prevent language flash ===== */
body:not(.lang-ready) [data-key],
body:not(.lang-ready) [data-key-placeholder] {
    opacity: 0;
}

body.lang-ready [data-key],
body.lang-ready [data-key-placeholder] {
    opacity: 1;
    transition: opacity 0.15s ease;
}

[data-theme="dark"] .fav-btn {
    background: rgba(35, 30, 58, 0.85);
}

    [data-theme="dark"] .fav-btn:hover {
        background: rgba(35, 30, 58, 0.95);
    }

    [data-theme="dark"] .fav-btn.active {
        background: rgba(35, 30, 58, 0.95);
    }

/* About Page */

/* Hero */
.about-hero {
    position: relative;
    padding: 7rem 0 5rem;
    overflow: hidden;
    background: radial-gradient(ellipse 70% 50% at 75% 30%, rgba(91, 33, 182, 0.06) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 15% 70%, rgba(109, 40, 217, 0.05) 0%, transparent 70%), linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.about-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.about-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.about-orb--1 {
    width: 420px;
    height: 420px;
    background: rgba(91, 33, 182, 0.08);
    top: -120px;
    right: -60px;
    animation: aboutOrbFloat 12s ease-in-out infinite;
}

.about-orb--2 {
    width: 300px;
    height: 300px;
    background: rgba(124, 58, 237, 0.06);
    bottom: -80px;
    left: -40px;
    animation: aboutOrbFloat 15s ease-in-out infinite reverse;
}

.about-orb--3 {
    width: 200px;
    height: 200px;
    background: rgba(109, 40, 217, 0.05);
    top: 40%;
    left: 50%;
    animation: aboutOrbFloat 10s ease-in-out infinite 2s;
}

@keyframes aboutOrbFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

[data-theme="dark"] .about-orb--1 {
    background: rgba(91, 33, 182, 0.15);
}

[data-theme="dark"] .about-orb--2 {
    background: rgba(124, 58, 237, 0.12);
}

[data-theme="dark"] .about-orb--3 {
    background: rgba(109, 40, 217, 0.1);
}

.about-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.about-hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.18;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* — Sections — */
.about-section {
    padding: 5rem 0;
}

.about-section--alt {
    background: var(--bg-secondary);
}

.about-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    text-align: center;
}

.about-section-text {
    max-width: 640px;
    margin: 0 auto 3rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Mission */
.about-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.about-point {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.about-section--alt .about-point {
    background: var(--bg-primary);
}

.about-point:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(91, 33, 182, 0.18);
}

.about-point-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-color);
    transition: var(--transition);
}

.about-point:hover .about-point-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.3);
}

.about-point h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.about-point p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* — Audience Cards — */
.about-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.about-card {
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

    .about-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg), var(--shadow-glow);
        border-color: rgba(91, 33, 182, 0.18);
    }

.about-card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    color: var(--primary-color);
    transition: var(--transition);
}

.about-card:hover .about-card-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.3);
}

.about-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
}

.about-card p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* — Advantages — */
.about-advantages {
    max-width: 640px;
    margin: 2rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-advantage {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: var(--transition);
}

    .about-advantage:hover {
        border-color: rgba(91, 33, 182, 0.2);
        box-shadow: var(--shadow-md);
        transform: translateX(4px);
    }

.about-advantage-marker {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 0 8px rgba(91, 33, 182, 0.3);
}

.about-advantage h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.about-advantage p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Steps Timeline */
.about-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    margin-top: 2rem;
}

.about-step {
    text-align: center;
    position: relative;
    padding-top: 3.5rem;
}

.about-step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(91, 33, 182, 0.3);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.about-step-line {
    position: absolute;
    top: 24px;
    left: calc(50% + 28px);
    width: calc(100% - 8px);
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.about-step:last-child .about-step-line {
    display: none;
}

.about-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.about-step p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Principles */
.about-principles {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.about-principle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

    .about-principle:hover {
        border-color: rgba(91, 33, 182, 0.2);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.about-principle-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-color);
    flex-shrink: 0;
}

/* Formа  */
.about-contact-wrapper {
    max-width: 560px;
    margin: 2rem auto 0;
}

.about-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.about-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

    .about-form-group label {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
    }

    .about-form-group input,
    .about-form-group textarea {
        padding: 0.8rem 1rem;
        border: 1.5px solid var(--border-color);
        border-radius: var(--radius-md);
        background: var(--bg-secondary);
        color: var(--text-primary);
        font-family: inherit;
        font-size: 0.95rem;
        transition: var(--transition);
        resize: vertical;
    }

        .about-form-group input:focus,
        .about-form-group textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px var(--primary-soft);
            background: var(--bg-primary);
        }

.about-submit-btn {
    align-self: flex-start;
}

.about-form-success {
    display: none;
    color: #10b981;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

    .about-form-success.visible {
        display: block;
        animation: aboutFadeIn 0.4s ease;
    }

@keyframes aboutFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-contact-info {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-contact-email {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
}

    .about-contact-email:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

/* — Scroll Reveal — */
.about-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

    .about-reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }


/*Reader Modal*/
.reader-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    justify-content: center;
    align-items: center;
    padding: 0;
}

    .reader-modal[style*="display: block"] {
        display: flex !important;
    }

.reader-content {
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

#pdfViewer {
    width: 100vw;
    height: calc(100vh - 48px);
    border: none;
    display: block;
}

.reader-header {
    width: 100vw;
    height: 48px;
    background: #181818;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-sizing: border-box;
}
    

/* ============================================================
   MOBILE ADAPTATION  (≤ 768px)
   ============================================================ */

/* ── Burger button ─────────────────────────────────────────── */
.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s;
}
.burger-btn:hover { background: var(--primary-soft); }

.burger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Анимация → крестик */
.burger-btn.active .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.active .burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger-btn.active .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu drawer ─────────────────────────────────────── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    z-index: 1500;
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    gap: 0;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mobile-menu.active { right: 0; }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 11, 24, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1400;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-overlay.active { opacity: 1; }

/* ── Mobile nav links ───────────────────────────────────────── */
.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: background 0.2s, color 0.2s;
}
.mobile-nav-link:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* ── Mobile menu actions (catalog, lang, theme) ─────────────── */
.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.25rem;
}

.mobile-catalog-btn {
    width: 100%;
    justify-content: center;
}

.mobile-menu-row {
    display: flex;
    gap: 0.75rem;
}

/* ── Responsive breakpoint ──────────────────────────────────── */
@media (max-width: 768px) {
    /* Скрыть каталог в футере на мобильных */
    .footer-section h4[data-key="catalog"],
    .footer-section h4[data-key="catalog"] + .footer-links {
        display: none;
    }

    /* Show burger, hide desktop-only elements */
    .burger-btn       { display: flex; }
    .mobile-menu      { display: flex; }
    .mobile-overlay   { display: block; }
    .nav              { display: none; }
    .nav-catalog-btn  { display: none; }
    .lang-btn         { display: none; }
    .icon-btn#themeBtn{ display: none; }

    /* Header */
    .header-content {
        gap: 0.75rem;
        padding: 0.75rem 0;
    }

    /* Search: shrink to fill remaining space */
    .search-box { flex: 1; }
    .search-box input {
        width: 100%;
        padding: 0.65rem 2.4rem 0.65rem 0.85rem;
        font-size: 0.92rem;
    }

    /* Hero */
    .hero { padding: 3rem 0 2.5rem; }
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .hero-visual { order: -1; }
    .hero-title  { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-image { max-width: 55%; }

    /* Books grid */
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Catalog layout: stack filters above grid */
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .filters {
        position: static;
    }

    /* Book detail */
    .book-details {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }
    .book-cover-section { flex: none; }
    .book-cover-large   { width: 140px; height: 200px; }

    /* About page */
    .about-points,
    .about-cards    { grid-template-columns: 1fr; }
    .about-steps    { grid-template-columns: 1fr 1fr; }
    .about-step-line { display: none; }
    .about-hero-title { font-size: 2rem; }

    /* ── COMPACT FOOTER ──────────────────────────────────── */
    .footer { padding: 2rem 0 0; margin-top: 1.5rem; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 0;
        padding-bottom: 0;
    }

    /* Показываем бренд секцию (баннер и соцсети) на мобильных */
    .footer-brand { display: block; }

    .footer-section {
        padding: 0.5rem 0;
        border-bottom: 0px solid var(--border-color);
    }
    .footer-section:last-child { border-bottom: none; }

    .footer-section h4 {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-tertiary);
        text-transform: uppercase;
        letter-spacing: 0.06rem;
        margin-bottom: 0.6rem;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.25rem 1rem;
    }
    .footer-links a { font-size: 0.88rem; }

    .footer-bottom {
        padding: 0.85rem 0;
        border-top: 1px solid var(--border-color);
    }
    .footer-bottom p { font-size: 0.78rem; }
}

/* Small phones */
@media (max-width: 400px) {
    .hero-title { font-size: 1.85rem; }
    .books-grid { gap: 0.5rem; }
}

[data-theme="dark"] .mobile-menu {
    border-left-color: var(--border-color);
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}
[data-theme="dark"] .burger-line { background: var(--text-primary); }
