/* index.html — page styles (redesign 2026-10).
   Framework (header/nav/hero/search/footer/chat) lives in main.css;
   this file carries only index-specific sections.
   Palette is aligned with main.css 

body {
    overflow-x: hidden;
}

/* ===== Анимации появления (общие keyframes) ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.summary-card, .book-card {
    animation: fadeInUp 0.8s ease-out;
}

/* ============================================================
   Популярные книги
   ============================================================ */
.popular-books {
    padding: 76px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header .section-title {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.65;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 26px;
    margin-bottom: 40px;
}

.book-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: rgba(43, 33, 24, 0.10) 0 8px 28px;
    border-color: var(--cream);
}

.book-card:hover::before {
    transform: scaleX(1);
}

.book-card-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 18px;
}

.book-card-cover {
    width: 78px;
    height: 116px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(139, 69, 19, 0.25);
}

.book-card-info {
    flex: 1;
    min-width: 0;
}

.book-card-title {
    font-size: 1.22rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.book-card-author {
    color: var(--primary);
    font-size: 0.98rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.book-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.book-card-meta .meta-item,
.meta-item {
    background: var(--gray-light);
    border: 1px solid var(--line);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.book-card-summary {
    color: var(--text-light);
    line-height: 1.65;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.book-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.book-card-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.book-card-btn {
    background: var(--gradient);
    color: white;
    padding: 9px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.book-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 69, 19, 0.35);
}

.books-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.books-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.books-error {
    text-align: center;
    padding: 30px;
    background: #FBF1F0;
    color: #B3423A;
    border: 1px solid #F0D4D1;
    border-left: 4px solid #B3423A;
    border-radius: var(--radius);
}

.no-books {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-books-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    background: var(--white);
    color: var(--primary-dark);
    border: 1.5px solid var(--primary);
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.load-more-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
}

/* ============================================================
   Результаты поиска (summary-карточка)
   ============================================================ */
.results-section {
    padding: 60px 0;
    background-color: var(--background);
    display: none;
}

.summary-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    margin-bottom: 40px;
    transition: box-shadow 0.3s var(--ease);
}

.summary-card:hover {
    box-shadow: var(--shadow-hover);
}

.book-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
}

.book-cover {
    width: 120px;
    height: 180px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.25);
}

.book-info {
    flex: 1;
    min-width: 0;
}

.book-title {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.2;
}

.book-author {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 20px;
}

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

.summary-content {
    margin-top: 30px;
}

.summary-section {
    margin-bottom: 35px;
}

/* Заголовок секции внутри краткого содержания */
.summary-section .section-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-content {
    line-height: 1.8;
    color: var(--text-dark);
    font-size: 1.05rem;
}

.section-content p {
    margin-bottom: 15px;
}

.ai-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--gray-light);
    border: 1px solid var(--line);
    padding: 22px 25px;
    border-radius: var(--radius);
    margin-top: 30px;
    border-left: 4px solid var(--primary);
}

.ai-indicator p {
    margin-bottom: 0;
}

.ai-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.ai-text {
    flex: 1;
}

.ai-name {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 1.05rem;
}

/* ============================================================
   Загрузка / ошибки
   ============================================================ */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
    display: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.loading-text {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text-dark);
    font-weight: 600;
}

.loading-subtext {
    color: var(--text-light);
    font-size: 1rem;
}

.error-state {
    text-align: center;
    padding: 50px 30px;
    color: #B3423A;
    background: #FBF1F0;
    border: 1px solid #F0D4D1;
    border-left: 4px solid #B3423A;
    border-radius: var(--radius);
    margin: 30px 0;
    display: none;
}

.error-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* ============================================================
   Фидбек
   ============================================================ */
.feedback-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.feedback-question {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: center;
}

.feedback-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn-feedback {
    padding: 12px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 0.95rem;
}

.btn-valid {
    background: linear-gradient(135deg, #3D7A4E 0%, #2C5530 100%);
}

.btn-valid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 85, 48, 0.3);
}

.btn-invalid {
    background: linear-gradient(135deg, #C05B4D 0%, #A34237 100%);
}

.btn-invalid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(163, 66, 55, 0.3);
}

.feedback-note {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    text-align: center;
}

/* Развёрнутая форма отзыва */
.detailed-feedback {
    margin-top: 30px;
    padding: 25px;
    background: var(--gray-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    display: none;
}

.feedback-header h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.feedback-header p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.feedback-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.feedback-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feedback-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.feedback-option label {
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.95rem;
}

.feedback-comment {
    margin-bottom: 20px;
}

.feedback-comment textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    min-height: 100px;
    background: var(--white);
    color: var(--text-dark);
}

.feedback-comment textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.12);
}

.feedback-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    padding: 12px 26px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    padding: 12px 26px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-light);
    border-color: var(--primary);
}

.feedback-success {
    background: linear-gradient(135deg, #3D7A4E 0%, #2C5530 100%);
    color: white;
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

.feedback-success h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* ============================================================
   Кнопка и модальное окно доната
   ============================================================ */
.donate-floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.donate-floating-btn {
    background: var(--donate-gradient);
    color: white;
    border: none;
    padding: 17px 25px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.4);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    animation: donateFloat 3s ease-in-out infinite;
}

@keyframes donateFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 30px rgba(139, 69, 19, 0.4);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 15px 40px rgba(139, 69, 19, 0.55);
    }
}

.donate-floating-btn:hover {
    animation: none;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 20px 50px rgba(139, 69, 19, 0.55);
}

.donate-btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
    position: relative;
}

.donate-heart {
    font-size: 1.4rem;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.donate-text {
    white-space: nowrap;
    font-weight: 700;
}

/* Пульсирующее кольцо позади кнопки доната */
.donate-pulse {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid rgba(139, 69, 19, 0.45);
    animation: donatePulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes donatePulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.donate-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 33, 24, 0.55);
    z-index: 2000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.donate-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.donate-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(43, 33, 24, 0.35);
    animation: modalSlideIn 0.4s var(--ease);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.donate-modal .modal-header {
    background: var(--donate-gradient);
    color: white;
    padding: 28px 30px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.donate-modal .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.65;
}

.donate-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 25px;
}

.amount-option {
    background: var(--gray-light);
    border: 2px solid var(--line);
    padding: 18px 14px;
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.amount-option:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.amount-option.active {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(139, 69, 19, 0.3);
}

.amount-option .amount {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.amount-option .hint,
.hint {
    font-size: 0.85rem;
    color: var(--text-light);
}

.amount-option.active .hint {
    color: rgba(255, 255, 255, 0.85);
}

.custom-amount {
    margin-bottom: 25px;
}

.custom-amount label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-weight: 600;
}

.custom-amount-input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
    color: var(--text-dark);
}

.custom-amount-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.12);
}

.donate-action-btn {
    display: block;
    background: var(--donate-gradient);
    color: white;
    text-align: center;
    padding: 17px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.35);
}

.donate-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.45);
}

.donate-note {
    text-align: center;
}

.donate-note small {
    color: var(--text-light);
}

/* ============================================================
   Адаптивность
   ============================================================ */
@media (max-width: 968px) {
    .book-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .book-cover {
        align-self: center;
    }

    .book-meta,
    .book-card-meta {
        justify-content: center;
    }

    .books-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    .summary-card {
        padding: 30px 24px;
    }
}

@media (max-width: 768px) {
    .popular-books {
        padding: 56px 0;
    }

    .results-section {
        padding: 44px 0;
    }

    .book-card-header {
        flex-direction: column;
        text-align: center;
    }

    .book-card-cover {
        align-self: center;
    }

    .book-card-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .book-card-btn {
        width: 100%;
        text-align: center;
    }

    .book-title {
        font-size: 1.7rem;
    }

    .section-header .section-title {
        font-size: 1.7rem;
    }

    .donate-floating-container {
        bottom: 20px;
        right: 20px;
    }

    .donate-floating-btn {
        padding: 15px 20px;
        font-size: 0.98rem;
    }

    .donate-text {
        font-size: 0.9rem;
    }

    .donate-amounts {
        grid-template-columns: 1fr;
    }

    .donate-modal .modal-header {
        padding: 22px 20px;
    }

    .donate-modal .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .summary-card {
        padding: 24px 18px;
    }

    .donate-floating-btn {
        padding: 14px 18px;
    }

    .donate-text {
        display: none;
    }

    .donate-modal {
        width: 95%;
    }
}

/* ============================================================
   Боковое меню (гамбургер + сайдбар) — только для index.html
   ============================================================ */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 12px;
    gap: 4px;
    z-index: 2001;
    border-radius: 12px;
    transition: background-color 0.25s ease, transform 0.25s var(--ease);
    background: rgba(139, 69, 19, 0.06);
    margin-right: 14px;
    flex-shrink: 0;
}

.hamburger-menu:hover {
    background: rgba(139, 69, 19, 0.12);
    transform: scale(1.05);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active {
    background: rgba(139, 69, 19, 0.15);
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(43, 33, 24, 0.45);
    z-index: 1999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -420px;
    width: 380px;
    height: 100vh;
    background: linear-gradient(160deg, var(--white) 0%, var(--gray-light) 55%, #F3E9D8 100%);
    box-shadow: 15px 0 50px rgba(43, 33, 24, 0.18);
    z-index: 2000;
    transition: left 0.4s var(--ease);
    padding: 0;
    overflow-y: auto;
    border-right: 1px solid var(--line);
}

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

.sidebar-menu::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary) 0%, var(--primary-light) 100%);
    opacity: 0.9;
}

.menu-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 30px 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.menu-header::before {
    content: '';
    position: absolute;
    top: -60%;
    left: -15%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.menu-title {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 2;
}

.menu-subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 5px;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

.close-menu {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 22px;
    background: var(--gray-light);
    margin: 0 25px 22px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info h4 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-size: 1rem;
}

.user-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.menu-section {
    margin-bottom: 28px;
    padding: 0 25px;
    animation: slideInLeft 0.5s ease-out;
}

.menu-section:nth-child(2) { animation-delay: 0.06s; }

.menu-section:nth-child(3) { animation-delay: 0.12s; }

.menu-section:nth-child(4) { animation-delay: 0.18s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--gradient);
    border-radius: 2px;
}

.menu-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-links li {
    margin-bottom: 6px;
}

.menu-links a {
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s var(--ease);
    font-weight: 500;
}

.menu-links a:hover {
    background: rgba(139, 69, 19, 0.07);
    color: var(--primary-dark);
    padding-left: 22px;
}

.menu-links a.active {
    background: rgba(139, 69, 19, 0.1);
    color: var(--primary-dark);
    border-left: 3px solid var(--primary);
}

.menu-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--gray-light);
    border: 1px solid var(--line);
    color: var(--primary-dark);
    font-size: 0.95rem;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
    flex-shrink: 0;
}

.menu-links a:hover .menu-icon {
    background: var(--gradient);
    color: white;
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.menu-links a.active .menu-icon {
    background: var(--gradient);
    color: white;
}

.menu-btn {
    background: var(--gradient);
    color: white;
    padding: 14px 25px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
    margin: 25px;
    text-align: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.menu-btn .menu-icon {
    background: rgba(255, 255, 255, 0.18);
    border-color: transparent;
    color: white;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.05);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

@media (max-width: 480px) {
    .sidebar-menu {
        width: 100%;
        left: -100%;
    }

    .menu-header {
        padding: 25px 20px;
    }

    .menu-section {
        padding: 0 20px;
    }

    .menu-btn {
        margin: 20px;
    }

    .user-profile {
        margin: 0 16px 20px;
    }

    .hamburger-menu {
        padding: 10px;
        margin-right: 10px;
    }

    .hamburger-line {
        width: 22px;
        height: 2.5px;
    }
}
