/* brief_template.html — page styles (extracted from the template) */

        body {
            background-color: var(--background);
            color: var(--text-dark);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Гамбургер меню СЛЕВА */
        .hamburger-menu {
            display: flex;
            flex-direction: column;
            cursor: pointer;
            padding: 12px;
            gap: 4px;
            z-index: 2001;
            border-radius: 8px;
            transition: all 0.3s ease;
            background: rgba(139, 69, 19, 0.05);
            margin-right: 15px;
        }

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

        .hamburger-line {
            width: 25px;
            height: 3px;
            background: var(--primary);
            border-radius: 2px;
            transition: all 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);
            background: var(--primary);
        }

        .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);
            background: var(--primary);
        }

        /* Боковое меню СЛЕВА */
        .sidebar-menu {
            position: fixed;
            top: 0;
            left: -420px;
            width: 380px;
            height: 100vh;
            background: linear-gradient(160deg, var(--white) 0%, #faf9f7 50%, #F3E9DA 100%);
            box-shadow: 15px 0 50px rgba(139, 69, 19, 0.15);
            z-index: 2000;
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            padding: 0;
            overflow-y: auto;
            border-right: 1px solid rgba(139, 69, 19, 0.08);
        }

        .sidebar-menu.active {
            left: 0;
            transform: translateX(0);
        }

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

        /* Заголовок меню */
        .menu-header {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
            padding: 30px 35px;
            color: white;
            position: relative;
            overflow: hidden;
            margin-bottom: 20px;
        }

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

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

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

        

        /* Секции меню */
        .menu-section {
            margin-bottom: 30px;
            padding: 0 25px;
        }

        .menu-section-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid rgba(139, 69, 19, 0.1);
            display: flex;
            align-items: center;
            gap: 10px;
        }

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

        .menu-links {
            list-style: none;
        }

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

        .menu-links a {
            color: var(--text-dark);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 14px 18px;
            border-radius: 12px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            font-weight: 500;
        }

        .menu-links a::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 0;
            background: linear-gradient(90deg, rgba(139, 69, 19, 0.1) 0%, transparent 100%);
            transition: width 0.3s ease;
        }

        .menu-links a:hover {
            background: rgba(139, 69, 19, 0.05);
            color: var(--primary);
            transform: translateX(8px);
        }

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

        .menu-links a:hover .menu-icon {
            transform: scale(1.2);
        }

        .menu-icon {
            font-size: 1.3rem;
            width: 24px;
            text-align: center;
            transition: transform 0.3s ease;
            flex-shrink: 0;
        }

        /* Активное состояние ссылок */
        .menu-links a.active {
            background: linear-gradient(135deg, rgba(139, 69, 19, 0.1) 0%, rgba(230, 126, 34, 0.05) 100%);
            color: var(--primary);
            border-left: 3px solid var(--primary);
        }

        /* Кнопка в меню */
        .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: all 0.3s 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);
        }

        /* Аватар пользователя в меню */
        .user-profile {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 20px 25px;
            background: rgba(139, 69, 19, 0.05);
            margin: 20px 25px;
            border-radius: 15px;
            border-left: 4px solid var(--primary);
        }

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

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

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

        /* Оверлей для закрытия */
        .menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1999;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

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

        /* Стильные иконки для меню */
        .menu-icon {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            background: linear-gradient(135deg, rgba(139, 69, 19, 0.1) 0%, rgba(230, 126, 34, 0.05) 100%);
            color: var(--primary);
            font-size: 0.9rem;
            transition: all 0.3s ease;
            flex-shrink: 0;
            position: relative;
            overflow: hidden;
        }

        .menu-icon::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

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

        .menu-links a:hover .menu-icon::before {
            opacity: 1;
        }

        .menu-links a.active .menu-icon {
            background: var(--gradient);
            color: white;
            box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
        }

        /* Конкретные иконки с кастомными стилями */
        .menu-icon[data-icon="home"] { background: linear-gradient(135deg, #B35B3F 0%, #C98A6E 100%); }

        .menu-icon[data-icon="search"] { background: linear-gradient(135deg, #8B7355 0%, #B29C7E 100%); }

        .menu-icon[data-icon="book"] { background: linear-gradient(135deg, #A0522D 0%, #C98A6E 100%); }

        .menu-icon[data-icon="info"] { background: linear-gradient(135deg, #D9956B 0%, #E3B294 100%); }

        .menu-icon[data-icon="user"] { background: linear-gradient(135deg, #8B6D4F 0%, #BFA080 100%); }

        .menu-icon[data-icon="books"] { background: linear-gradient(135deg, #D9A441 0%, #EAC98C 100%); }

        .menu-icon[data-icon="star"] { background: linear-gradient(135deg, #D9A441 0%, #EAC98C 100%); }

        .menu-icon[data-icon="chart"] { background: linear-gradient(135deg, #7A6A3A 0%, #A6915C 100%); }

        .menu-icon[data-icon="lock"] { background: linear-gradient(135deg, #B35B3F 0%, #C98A6E 100%); }

        .menu-icon[data-icon="dragon"] { background: linear-gradient(135deg, #7A5233 0%, #A68262 100%); }

        .menu-icon[data-icon="detective"] { background: linear-gradient(135deg, #A0522D 0%, #C98A6E 100%); }

        .menu-icon[data-icon="heart"] { background: linear-gradient(135deg, #C0653A 0%, #D9956B 100%); }

        .menu-icon[data-icon="science"] { background: linear-gradient(135deg, #6B5A30 0%, #9C8A52 100%); }

        /* Анимации */
        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .menu-section {
            animation: slideInLeft 0.5s ease-out;
        }

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

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

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

        /* Прокрутка */
        .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: 768px) {

            .hamburger-menu {
                display: flex;
            }
}

        @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: 15px 20px;
            }

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

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

        /* Modern Summary Card */
        .main-content {
            padding: 60px 0;
        }

        .summary-card {
            background: var(--white);
            border-radius: 20px;
            padding: 40px;
            box-shadow: var(--shadow);
            margin-bottom: 40px;
            border: 1px solid rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .summary-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: var(--gradient);
        }

        .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: 2px solid var(--gray-light);
        }

        .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.2);
            transition: all 0.3s ease;
        }

        .book-cover:hover {
            transform: rotate(5deg) scale(1.05);
        }

        .book-info {
            flex: 1;
        }

        .book-title {
            font-size: 2.2rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 10px;
            line-height: 1.2;
            background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .book-meta {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-top: 20px;
        }

        .meta-item {
            background: var(--gray-light);
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.9rem;
            color: var(--text-light);
            font-weight: 500;
        }

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

        .summary-section {
            margin-bottom: 35px;
            padding: 25px;
            background: var(--gray-light);
            border-radius: 15px;
            border-left: 4px solid var(--primary);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .summary-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, transparent 0%, rgba(139, 69, 19, 0.02) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .summary-section:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }

        .summary-section:hover::before {
            opacity: 1;
        }

        .section-title {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 20px;
            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: linear-gradient(135deg, #FAF5ED 0%, #F0E6D6 100%);
            padding: 25px;
            border-radius: 15px;
            margin-top: 30px;
            border-left: 4px solid var(--primary);
        }

        .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: 8px;
            font-size: 1.1rem;
        }

        .action-buttons {
            display: flex;
            gap: 20px;
            margin-top: 40px;
            flex-wrap: wrap;
        }

        .action-btn {
            padding: 16px 28px;
            border: 2px solid var(--primary);
            background: white;
            color: var(--primary);
            border-radius: 16px;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
            box-shadow: var(--shadow);
            font-weight: 500;
        }

        .action-btn:hover {
            background: var(--primary);
            color: var(--white);
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }

        .action-btn.primary {
            background: var(--gradient);
            color: white;
            border: none;
        }

        .action-btn.primary:hover {
            background: var(--gradient-light);
            transform: translateY(-3px);
        }

        /* Responsive Design */
        @media (max-width: 968px) {

            .book-header {
                flex-direction: column;
                text-align: center;
                gap: 25px;
            }

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

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

        @media (max-width: 768px) {

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

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

            .action-buttons {
                justify-content: center;
            }

            .action-btn {
                flex: 1;
                min-width: 150px;
                justify-content: center;
            }
}

        @media (max-width: 480px) {

            .book-cover {
                width: 100px;
                height: 150px;
                font-size: 2.5rem;
            }

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

            .section-title {
                font-size: 1.3rem;
            }

            .summary-section {
                padding: 20px;
            }

            .ai-indicator {
                flex-direction: column;
                text-align: center;
                gap: 15px;
            }
}

        /* Animation for modern feel */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

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

        .close-menu {
    position: absolute;
    top: 25px;
    right: 25px;
    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: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 2002; /* Важно: должен быть выше чем меню */
}

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

/* Убедитесь что оверлей закрывает всё */

/* Success Messages */
.feedback-success {
    background: linear-gradient(135deg, #3D7A4E 0%, #2C5530 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    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: linear-gradient(135deg, #B35B3F 0%, #C0653A 100%);
    color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
    position: relative;
    animation: donateFloat 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

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

.donate-floating-btn:hover {
    animation: none;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 20px 50px rgba(255, 107, 107, 0.6);
}

.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-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.modal-header {
    background: linear-gradient(135deg, #B35B3F 0%, #C0653A 100%);
    color: white;
    padding: 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.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.1rem;
    line-height: 1.6;
}

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

.amount-option {
    background: var(--gray-light);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.amount-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.amount {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.hint {
    font-size: 0.85rem;
    opacity: 0.8;
}

.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: 15px;
    border: 2px solid var(--gray-light);
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.donate-action-btn {
    display: block;
    background: linear-gradient(135deg, #B35B3F 0%, #C0653A 100%);
    color: white;
    text-align: center;
    padding: 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.donate-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

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

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

/* Адаптивность */
@media (max-width: 768px) {

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

    .donate-floating-btn {
        padding: 16px 20px;
        font-size: 1rem;
    }

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

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

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

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

@media (max-width: 480px) {

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

    .donate-text {
        display: none;
    }

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