
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 1.2rem 0;
            box-shadow: 0 4px 25px rgba(0,0,0,0.15);
            position: sticky;
            top: 0;
            z-index: 1000;
            backdrop-filter: blur(10px);
        }

        .header-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem;
        }

        .header-controls {
            display: flex;
            align-items: center;
            gap: 2rem;
        }

        .nav-buttons {
            display: flex;
            gap: 0.5rem;
            background: rgba(255,255,255,0.1);
            padding: 0.3rem;
            border-radius: 30px;
            backdrop-filter: blur(10px);
        }

        .nav-btn {
            text-decoration: none;
            color: rgba(255,255,255,0.9);
            font-weight: 600;
            padding: 0.7rem 1.5rem;
            border-radius: 25px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 0.95rem;
            position: relative;
            overflow: hidden;
        }

        .nav-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
            transition: left 0.5s ease;
        }

        .nav-btn:hover::before {
            left: 100%;
        }

        .nav-btn:hover {
            color: white;
            background: rgba(255,255,255,0.15);
            transform: translateY(-1px);
        }

        .nav-btn.active {
            background: rgba(255,255,255,0.2);
            color: white;
            box-shadow: 0 2px 10px rgba(255,255,255,0.2);
        }

        .peru-educa-link {
            background: rgba(255,255,255,0.15);
            border: 2px solid rgba(255,255,255,0.3);
            color: white;
            padding: 0.8rem 1.5rem;
            border-radius: 25px;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.3s ease;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .peru-educa-link:hover {
            background: rgba(255,255,255,0.25);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(255,255,255,0.2);
        }

        .peru-educa-icon {
            font-size: 1.2rem;
        }

        .peru-educa-text {
            font-weight: 600;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo-icon {
            width: 80px;
            height: 80px;
            border-radius: 30%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8rem;
            color: #1e3c72;
            overflow: hidden;
        }

        .logo-icon img {
            width: 80%;
            height: 80%;
            object-fit: cover;
        }

        .logo-text h1 {
            font-size: 1.6rem;
            margin-bottom: 0.2rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .logo-text p {
            font-size: 0.9rem;
            opacity: 0.9;
        }

        .language-selector {
            background: rgba(255,255,255,0.1);
            border: 2px solid rgba(255,255,255,0.2);
            color: white;
            padding: 0.7rem 2.5rem 0.7rem 1rem;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 0.95rem;
            min-width: 160px;
            appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 0.7rem center;
            background-size: 14px;
            font-weight: 500;
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .language-selector:hover {
            background: rgba(255,255,255,0.15);
            border-color: rgba(255,255,255,0.3);
            transform: translateY(-1px);
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        }

        .language-selector:focus {
            outline: none;
            background: rgba(255,255,255,0.15);
            border-color: rgba(255,255,255,0.4);
            box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
        }

        .language-selector option {
            background: #1e3c72;
            color: white;
            padding: 0.7rem;
            font-weight: 500;
        }

        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #3d5aa1 100%);
            color: white;
            padding: 4rem 0;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 50%, rgba(255,255,255,0.05) 100%);
            animation: subtleGlow 6s ease-in-out infinite;
        }

        @keyframes subtleGlow {
            0%, 100% { opacity: 0.3; }
            50% { opacity: 0.7; }
        }

        .hero-content {
            position: relative;
            z-index: 2;
        }

        .hero h2 {
            font-size: 2.8rem;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            animation: titleBounce 1s ease-out;
        }

        @keyframes titleBounce {
            0% { 
                opacity: 0; 
                transform: translateY(-30px); 
            }
            60% { 
                opacity: 1; 
                transform: translateY(5px); 
            }
            100% { 
                opacity: 1; 
                transform: translateY(0); 
            }
        }

        .hero p {
            font-size: 1.3rem;
            margin-bottom: 2rem;
            opacity: 0.95;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
            animation: subtitleFade 1.2s ease-out 0.3s both;
        }

        @keyframes subtitleFade {
            from { 
                opacity: 0; 
                transform: translateY(20px); 
            }
            to { 
                opacity: 0.95; 
                transform: translateY(0); 
            }
        }

        .search-container {
            display: flex;
            max-width: 600px;
            margin: 0 auto;
            background: white;
            border-radius: 50px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0,0,0,0.15);
            animation: searchAppear 1.5s ease-out 0.6s both;
            position: relative;
        }

        @keyframes searchAppear {
            from { 
                opacity: 0; 
                transform: translateY(30px) scale(0.9); 
            }
            to { 
                opacity: 1; 
                transform: translateY(0) scale(1); 
            }
        }

        .search-input {
            flex: 1;
            padding: 1.2rem 1.5rem;
            border: none;
            font-size: 1rem;
            outline: none;
            color: #333;
            background: transparent;
        }

        .search-input::placeholder {
            color: #888;
        }

        .search-input:focus::placeholder {
            color: #bbb;
        }

        .search-btn {
            background: linear-gradient(135deg, #ffd700, #ffed4e);
            color: #1e3c72;
            border: none;
            padding: 1.2rem 2.5rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1rem;
        }

        .search-btn:hover {
            background: linear-gradient(135deg, #ffed4e, #ffd700);
            transform: scale(1.05);
        }

        /* Main Content */
        .main-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
            display: grid;
            grid-template-columns: 320px 1fr;
            gap: 2.5rem;
        }

        .sidebar {
            background: white;
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            height: fit-content;
            position: sticky;
            top: 2rem;
            animation: slideInLeft 0.8s ease-out;
        }

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .sidebar h3 {
            color: #1e3c72;
            margin-bottom: 1.5rem;
            font-size: 1.4rem;
            position: relative;
            padding-bottom: 0.5rem;
        }

        .sidebar h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 50px;
            height: 3px;
            background: linear-gradient(135deg, #ffd700, #ffed4e);
            border-radius: 2px;
            animation: underlineGrow 1s ease-out 0.5s both;
        }

        @keyframes underlineGrow {
            from { width: 0; }
            to { width: 50px; }
        }

        .category-list {
            list-style: none;
        }

        .category-item {
            margin-bottom: 0.8rem;
            animation: fadeInUp 0.6s ease-out both;
        }

        .category-item:nth-child(1) { animation-delay: 0.1s; }
        .category-item:nth-child(2) { animation-delay: 0.2s; }
        .category-item:nth-child(3) { animation-delay: 0.3s; }
        .category-item:nth-child(4) { animation-delay: 0.4s; }
        .category-item:nth-child(5) { animation-delay: 0.5s; }
        .category-item:nth-child(6) { animation-delay: 0.6s; }
        .category-item:nth-child(7) { animation-delay: 0.7s; }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .checkbox-container {
            display: flex;
            align-items: center;
            padding: 1rem;
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .checkbox-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #e3f2fd, #bbdefb);
            transition: left 0.3s ease;
            z-index: 0;
        }

        .checkbox-container:hover::before {
            left: 0;
        }

        .checkbox-container:hover {
            transform: translateX(8px);
            box-shadow: 0 4px 12px rgba(30, 60, 114, 0.1);
        }

        .checkbox-container input[type="checkbox"],
        .checkbox-container label {
            position: relative;
            z-index: 1;
        }

        .checkbox-container input[type="checkbox"] {
            width: 20px;
            height: 20px;
            margin-right: 1rem;
            cursor: pointer;
            accent-color: #1e3c72;
        }

        .checkbox-container label {
            cursor: pointer;
            font-weight: 500;
            color: #555;
        }

        .checkbox-container.active {
            background: linear-gradient(135deg, #1e3c72, #2a5298);
            color: white;
        }

        .checkbox-container.active label {
            color: white;
        }

        /* Content Area */
        .content-area {
            background: white;
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            animation: slideInRight 0.8s ease-out;
        }

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* Gamification Bar */
        .gamification-bar {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
            animation: gamificationSlide 1s ease-out 0.3s both;
        }

        @keyframes gamificationSlide {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .achievement-counter {
            display: flex;
            gap: 2rem;
        }

        .achievement-item {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            background: rgba(255, 255, 255, 0.1);
            padding: 0.8rem 1.2rem;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .achievement-item:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        .achievement-icon {
            font-size: 1.5rem;
            animation: iconBounce 2s ease-in-out infinite;
        }

        @keyframes iconBounce {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        .achievement-info {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .achievement-number {
            font-size: 1.2rem;
            font-weight: bold;
            line-height: 1;
        }

        .achievement-label {
            font-size: 0.8rem;
            opacity: 0.9;
        }

        .user-badges {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .badge {
            background: rgba(255, 215, 0, 0.2);
            border: 2px solid #ffd700;
            color: #ffd700;
            padding: 0.3rem 0.8rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            animation: badgeAppear 0.5s ease-out;
        }

        @keyframes badgeAppear {
            from {
                opacity: 0;
                transform: scale(0.5);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Level Up Notification */
        .level-up-notification {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: linear-gradient(135deg, #ffd700, #ffed4e);
            color: #1e3c72;
            padding: 2rem 3rem;
            border-radius: 20px;
            font-size: 1.5rem;
            font-weight: bold;
            z-index: 2000;
            animation: levelUpAnimation 3s ease-out;
            box-shadow: 0 20px 60px rgba(255, 215, 0, 0.4);
        }

        @keyframes levelUpAnimation {
            0% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.5);
            }
            20% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1.2);
            }
            80% {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.8);
            }
        }

        .level-up-content {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .level-up-icon {
            font-size: 2rem;
            animation: celebrate 0.5s ease-in-out infinite alternate;
        }

        @keyframes celebrate {
            from { transform: rotate(-10deg) scale(1); }
            to { transform: rotate(10deg) scale(1.1); }
        }

        .content-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .content-title {
            color: #1e3c72;
            font-size: 2rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .book-count {
            background: linear-gradient(135deg, #ffd700, #ffed4e);
            color: #1e3c72;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: bold;
        }

        .view-toggle {
            display: flex;
            gap: 0.5rem;
        }

        .view-btn {
            padding: 0.8rem 1.5rem;
            border: 2px solid #1e3c72;
            background: white;
            color: #1e3c72;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .view-btn.active, .view-btn:hover {
            background: #1e3c72;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(30,60,114,0.3);
        }

        /* Books Grid */
        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 2rem;
        }

        .book-card {
            background: white;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
            position: relative;
            transform: translateY(0);
            opacity: 0;
            animation: bookFadeIn 0.6s ease forwards;
        }

        @keyframes bookFadeIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .book-card:nth-child(1) { animation-delay: 0.1s; }
        .book-card:nth-child(2) { animation-delay: 0.2s; }
        .book-card:nth-child(3) { animation-delay: 0.3s; }
        .book-card:nth-child(4) { animation-delay: 0.4s; }
        .book-card:nth-child(5) { animation-delay: 0.5s; }
        .book-card:nth-child(6) { animation-delay: 0.6s; }

        .book-card:hover {
            transform: translateY(-20px) scale(1.03);
            box-shadow: 0 25px 60px rgba(0,0,0,0.25);
            z-index: 10;
        }

        .book-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,107,107,0.1));
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: 20px;
            z-index: 1;
        }

        .book-card:hover::before {
            opacity: 1;
        }

        .book-cover {
            width: 100%;
            height: 280px;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        }

        .book-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .book-cover:hover img {
            transform: scale(1.1) rotate(2deg);
        }

        .book-cover .fallback-icon {
            font-size: 4rem;
            color: white;
            animation: pulse 2s infinite;
            text-shadow: 0 0 20px rgba(255,255,255,0.5);
        }

        @keyframes pulse {
            0%, 100% { 
                transform: scale(1); 
                opacity: 1; 
            }
            50% { 
                transform: scale(1.1); 
                opacity: 0.8; 
            }
        }

        .book-cover::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
            animation: shine 4s infinite;
            z-index: 1;
        }

        .book-cover::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 2;
        }

        .book-card:hover .book-cover::after {
            opacity: 1;
        }

        @keyframes shine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .book-info {
            padding: 1.8rem;
            position: relative;
            z-index: 3;
        }

        .book-title {
            font-size: 1.3rem;
            font-weight: bold;
            color: #1e3c72;
            margin-bottom: 0.5rem;
            line-height: 1.4;
            transition: color 0.3s ease;
        }

        .book-card:hover .book-title {
            color: #2d5aa0;
            text-shadow: 0 2px 4px rgba(30, 60, 114, 0.1);
        }

        .book-author {
            color: #666;
            font-size: 1rem;
            margin-bottom: 0.5rem;
            font-style: italic;
            transition: color 0.3s ease;
        }

        .book-card:hover .book-author {
            color: #555;
        }

        .book-category {
            display: inline-block;
            background: linear-gradient(135deg, #e3f2fd, #bbdefb);
            color: #1e3c72;
            padding: 0.3rem 0.8rem;
            border-radius: 15px;
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 1rem;
            text-transform: capitalize;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .book-category::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            /* background: linear-gradient(135deg, #ffd700, #ffed4e); */
            transition: left 0.3s ease;
            z-index: -1;
        }

        .book-card:hover .book-category::before {
            left: 0;
        }

        .book-card:hover .book-category {
            color: #1e3c72;
            transform: scale(1.05);
        }

        .book-actions {
            display: flex;
            gap: 0.8rem;
            flex-direction: column-reverse;
            opacity: 1;
            transform: translateY(0);
            transition: all 0.3s ease;
        }

        .btn {
            padding: 0.8rem 1.5rem;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-decoration: none;
            display: inline-block;
            text-align: center;
            font-weight: 600;
            flex: 1;
            position: relative;
            overflow: hidden;
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }

        .btn:hover::before {
            left: 100%;
        }

        .btn-primary {
            background: linear-gradient(135deg, #1e3c72, #2a5298, #3d5aa1);
            color: white;
            box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #2a5298, #3d5aa1, #4d6bb2);
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(30, 60, 114, 0.4);
        }

        .btn-secondary {
            background: linear-gradient(135deg, #ffd700, #ffed4e, #fff066);
            color: #1e3c72;
            box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
        }

        .btn-secondary:hover {
            background: linear-gradient(135deg, #ffed4e, #fff066, #fff380);
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
        }

        /* Pagination */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 2rem;
            flex-wrap: wrap;
        }

        .page-btn {
            padding: 1rem 1.5rem;
            border: 2px solid #1e3c72;
            background: white;
            color: #1e3c72;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
        }

        .page-btn:hover, .page-btn.active {
            background: #1e3c72;
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(30,60,114,0.3);
        }

        /* No Results */
        .no-results {
            text-align: center;
            padding: 4rem 2rem;
            color: #666;
        }

        .no-results h3 {
            color: #1e3c72;
            font-size: 1.8rem;
            margin-bottom: 1rem;
        }

        .no-results p {
            font-size: 1.1rem;
            margin-bottom: 2rem;
        }

        .book-gif {
            width: 150px;
            height: 150px;
            margin: 2rem auto;
            background: linear-gradient(45deg, #667eea, #764ba2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            animation: bookPulse 2s ease-in-out infinite;
        }

        @keyframes bookPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            backdrop-filter: blur(8px);
        }

        .modal-content {
            background: white;
            margin: 2% auto;
            padding: 0;
            border-radius: 20px;
            width: 95%;
            max-width: 1000px;
            max-height: 95vh;
            overflow: hidden;
            position: relative;
            animation: modalAppear 0.4s ease;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }

        @keyframes modalAppear {
            from { opacity: 0; transform: translateY(-50px) scale(0.9); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .modal-header {
            background: linear-gradient(135deg, #1e3c72, #2a5298);
            color: white;
            padding: 2rem;
            position: relative;
        }

        .close {
            position: absolute;
            right: 1.5rem;
            top: 1.5rem;
            font-size: 2rem;
            cursor: pointer;
            color: white;
            transition: all 0.3s ease;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }

        .close:hover {
            background: rgba(255,255,255,0.2);
            transform: scale(1.1);
        }

        .modal-body {
            padding: 2rem;
            max-height: 70vh;
            overflow-y: auto;
        }

        .preview-content {
            text-align: center;
        }

        .preview-cover {
            width: 200px;
            height: 280px;
            margin: 0 auto 1.5rem;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            animation: float 3s ease-in-out infinite;
        }

        .preview-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .preview-cover .fallback {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            color: white;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

        .preview-title {
            font-size: 2rem;
            color: #1e3c72;
            margin-bottom: 0.5rem;
        }

        .preview-author {
            color: #666;
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

        .preview-category {
            display: inline-block;
            background: linear-gradient(135deg, #f5eab0, #e6e6e6);
            color: #1e3c72;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            text-transform: capitalize;
        }

        .preview-description {
            font-size: 1rem;
            line-height: 1.8;
            color: #555;
            margin-bottom: 2rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .pdf-viewer {
            width: 100%;
            height: 400px;
            border: none;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            margin-bottom: 2rem;
            transition: height 0.3s ease;
        }

        .pdf-viewer.fullscreen {
            height: 70vh;
            margin-bottom: 1rem;
        }

        .modal-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        /* Utility classes for smooth transitions */
        .fade-out {
            opacity: 0;
            transform: translateY(-10px);
            transition: all 0.3s ease;
        }

        .fade-in {
            opacity: 1;
            transform: translateY(0);
            transition: all 0.3s ease;
        }

        /* About Section */
        .about-section {
            display: none;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            padding: 0;
            margin: 0;
            min-height: 100vh;
        }

        .about-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 3rem 2rem;
        }

        .about-hero {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 3rem;
            align-items: center;
            margin-bottom: 4rem;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 3rem;
            border-radius: 20px;
            box-shadow: 0 15px 40px rgba(0,0,0,0.1);
        }

        .about-hero h2 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
            line-height: 1.2;
        }

        .about-subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            font-style: italic;
        }

        .about-hero-image {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 300px;
        }

        .school-image {
            width: 100%;
            height: 300px;
            object-fit: cover;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            transition: all 0.3s ease;
        }

        .school-image:hover {
            transform: scale(1.02);
            box-shadow: 0 15px 40px rgba(0,0,0,0.4);
        }

        .school-image-placeholder {
            width: 200px;
            height: 150px;
            background: rgba(255,255,255,0.1);
            border-radius: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            text-align: center;
            backdrop-filter: blur(10px);
            border: 2px solid rgba(255,255,255,0.2);
        }

        .location-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
            margin-bottom: 4rem;
            background: white;
            padding: 2.5rem;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        .location-info h3 {
            color: #1e3c72;
            font-size: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .location-details p {
            margin-bottom: 0.8rem;
            font-size: 1.1rem;
            color: #555;
        }

        .location-details strong {
            color: #1e3c72;
        }

        .location-map {
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .map-placeholder {
            width: 100%;
            height: 200px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 15px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: white;
            text-align: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid rgba(255,255,255,0.1);
        }

        .map-link {
            text-decoration: none;
            color: inherit;
            display: block;
            width: 100%;
            height: 100%;
        }

        .map-placeholder:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.25);
            border-color: rgba(255,255,255,0.3);
        }

        .map-overlay {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.2);
            opacity: 0;
            transition: all 0.3s ease;
            pointer-events: none;
        }

        .map-placeholder:hover .map-overlay {
            opacity: 1;
            transform: translateX(-50%) translateY(-5px);
        }

        .map-placeholder::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="30" r="2" fill="rgba(255,255,255,0.3)"/><circle cx="80" cy="20" r="1.5" fill="rgba(255,255,255,0.2)"/><circle cx="60" cy="70" r="1" fill="rgba(255,255,255,0.4)"/><circle cx="30" cy="80" r="1.2" fill="rgba(255,255,255,0.3)"/></svg>');
            opacity: 0.6;
        }

        .map-icon {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
            animation: mapFloat 3s ease-in-out infinite;
        }

        @keyframes mapFloat {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-5px); }
        }

        .map-text {
            margin: 0.5rem 0;
        }

        .map-text p {
            margin: 0.2rem 0;
            line-height: 1.3;
        }

        .map-text strong {
            font-weight: 700;
            font-size: 1.1rem;
        }

        .map-coordinates {
            margin-top: 0.3rem;
            opacity: 0.9;
            font-size: 0.85rem;
            line-height: 1.2;
        }

        .innovation-story {
            background: white;
            padding: 2.5rem;
            border-radius: 20px;
            margin-bottom: 3rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }

        .innovation-story h3 {
            color: #1e3c72;
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }

        .innovation-story p {
            font-size: 1.1rem;
            line-height: 1.8;
            color: #555;
            margin-bottom: 1.5rem;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-bottom: 3rem;
        }

        .feature-card {
            background: white;
            padding: 2.5rem;
            border-radius: 20px;
            text-align: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }

        .feature-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        }

        .innovation-card {
            border-top: 4px solid #ffd700;
        }

        .community-card {
            border-top: 4px solid #28a745;
        }

        .future-card {
            border-top: 4px solid #007bff;
        }

        .feature-icon {
            font-size: 3rem;
            margin-bottom: 1.5rem;
            animation: float 3s ease-in-out infinite;
        }

        .feature-title {
            color: #1e3c72;
            font-size: 1.4rem;
            margin-bottom: 1rem;
        }

        .feature-card p {
            color: #666;
            line-height: 1.6;
        }

        .impact-section {
            background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
            color: white;
            padding: 2.5rem;
            border-radius: 20px;
            margin-bottom: 3rem;
            text-align: center;
        }

        .impact-section h3 {
            font-size: 1.8rem;
            margin-bottom: 2rem;
        }

        .impact-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 2rem;
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-size: 2.5rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
            color: #ffd700;
        }

        .stat-label {
            font-size: 1rem;
            opacity: 0.9;
        }

        .commitment-section {
            background: white;
            padding: 2.5rem;
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            text-align: center;
        }

        .commitment-section h3 {
            color: #1e3c72;
            font-size: 1.8rem;
            margin-bottom: 1.5rem;
        }

        .commitment-section p {
            font-size: 1.1rem;
            line-height: 1.8;
            color: #555;
            max-width: 800px;
            margin: 0 auto;
        }

        /* Footer */
        .footer {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 0.5rem 0 1rem;
            margin-top: 4rem;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 2rem;
        }

        .footer-section h3 {
            margin-bottom: 1rem;
            color: #ffd700;
        }

        .footer-section p, .footer-section li {
            margin-bottom: 0.5rem;
            opacity: 0.9;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section a {
            color: white;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-section a:hover {
            color: #ffd700;
        }

        .footer-bottom {
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid rgba(255,255,255,0.2);
            margin-top: 2rem;
            opacity: 0.8;
        }

        /* List View */
        .list-view {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .list-view .book-card {
            display: flex;
            flex-direction: row;
            max-width: none;
        }

        .list-view .book-cover {
            width: 200px;
            /*height: 140px;*/
            flex-shrink: 0;
        }

        .list-view .book-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        /* Responsive Design */
        @media (max-width: 1024px) {
            .main-container {
                grid-template-columns: 280px 1fr;
                gap: 2rem;
                padding: 1.5rem;
            }
            
            .hero h2 {
                font-size: 2.2rem;
            }

            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            }
        }

        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 1.5rem;
                text-align: center;
            }

            .header-controls {
                flex-direction: column;
                gap: 1rem;
                width: 100%;
                align-items: center;
            }

            .nav-buttons {
                order: 1;
            }

            .language-selector {
                order: 2;
                min-width: 180px;
            }

            .logo-text h1 {
                font-size: 1.3rem;
            }

            .logo-text p {
                font-size: 0.8rem;
            }

            .gamification-bar {
                flex-direction: column;
                gap: 1rem;
                text-align: center;
            }

            .achievement-counter {
                flex-direction: column;
                gap: 1rem;
            }

            .achievement-item {
                justify-content: center;
            }

            .main-container {
                grid-template-columns: 1fr;
                padding: 1rem;
                gap: 1.5rem;
            }

            .hero h2 {
                font-size: 1.8rem;
            }

            .hero p {
                font-size: 1.1rem;
            }

            .search-container {
                flex-direction: column;
                border-radius: 15px;
            }

            .search-btn {
                border-radius: 0 0 15px 15px;
            }

            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
                gap: 1.5rem;
            }

            .content-header {
                flex-direction: column;
                align-items: stretch;
                text-align: center;
            }

            .sidebar {
                position: static;
            }

            .list-view .book-card {
                flex-direction: column;
            }

            .list-view .book-cover {
                width: 100%;
                height: 200px;
            }

            .modal-content {
                width: 98%;
                margin: 1% auto;
                max-height: 98vh;
            }

            .footer-content {
                grid-template-columns: 1fr;
                text-align: center;
            }

            .about-hero {
                grid-template-columns: 1fr;
                text-align: center;
                gap: 2rem;
            }

            .about-hero h2 {
                font-size: 1.8rem;
            }

            .location-section {
                grid-template-columns: 1fr;
                gap: 2rem;
            }

            .impact-stats {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 480px) {
            .nav-buttons {
                flex-direction: column;
                width: 100%;
                gap: 0.3rem;
                padding: 0.5rem;
            }

            .nav-btn {
                width: 100%;
                text-align: center;
                padding: 0.8rem;
            }

            .language-selector {
                width: 100%;
                min-width: auto;
            }

            .logo-icon {
                width: 60px;
                height: 60px;
            }

            .logo-text h1 {
                font-size: 1.1rem;
            }

            .logo-text p {
                font-size: 0.75rem;
            }

            .books-grid {
                grid-template-columns: 1fr;
            }

            .hero {
                padding: 2rem 0;
            }

            .hero h2 {
                font-size: 1.5rem;
            }

            .content-area, .sidebar {
                padding: 1.5rem;
            }

            .book-actions {
                flex-direction: column;
            }

            .view-toggle {
                flex-direction: column;
            }

            .about-content {
                padding: 2rem 1rem;
            }

            .about-hero {
                padding: 2rem;
                margin-bottom: 2rem;
            }

            .about-hero h2 {
                font-size: 1.5rem;
            }

            .location-section,
            .innovation-story,
            .impact-section,
            .commitment-section {
                padding: 1.5rem;
                margin-bottom: 2rem;
            }

            .features-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .impact-stats {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .stat-number {
                font-size: 2rem;
            }
        }

        /* ========================================
           ESTILOS DEL CHATBOT
        ======================================== */

        .chatbot {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            z-index: 1000;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
        }

        .chatbot:hover {
            transform: scale(1.05);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
        }

        #chatbotIcon {
            order: 0;
            z-index: 10;
        }

        .chatbot.open {
            width: 300px;
            height: auto;
            max-width: calc(100vw - 40px);
            background: white;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: 1px solid #e1e5e9;
            overflow: hidden;
            font-size: inherit;
            color: inherit;
            pointer-events: auto;
            display: flex;
            flex-direction: column;
        }

        .chatbot.open #chatbotIcon {
            display: none !important;
            position: absolute;
            visibility: hidden;
            z-index: -1;
        }

        /* Evitar click en el container cuando está abierto */
        .chatbot.open > * {
            pointer-events: auto;
        }

        .chatbot-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 12px 16px;
            cursor: pointer;
            display: none;
            align-items: center;
            gap: 10px;
            user-select: none;
            width: 100%;
            position: relative;
            z-index: 1;
        }

        .chatbot.open .chatbot-header {
            display: flex;
            order: 1;
        }

        .chatbot-header:hover {
            background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
        }

        .chatbot-avatar {
            font-size: 20px;
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .chatbot-info {
            flex: 1;
        }

        .chatbot-name {
            font-weight: 600;
            font-size: 14px;
        }

        .chatbot-status {
            font-size: 11px;
            opacity: 0.9;
        }

        .chatbot-toggle {
            font-size: 16px;
            transition: transform 0.3s ease;
        }

        .chatbot.open .chatbot-toggle {
            transform: rotate(180deg);
        }

        .chatbot-body {
            max-height: 320px;
            display: none;
            flex-direction: column;
        }

        .chatbot.open .chatbot-body {
            display: flex;
            order: 2;
        }

        .chat-messages {
            flex: 1;
            padding: 12px;
            max-height: 200px;
            overflow-y: auto;
            background: #f8f9fa;
        }

        .message {
            display: flex;
            gap: 6px;
            margin-bottom: 12px;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .message-avatar {
            font-size: 16px;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .bot-message .message-avatar {
            background: #667eea;
        }

        .user-message .message-avatar {
            background: #48bb78;
        }

        .user-message {
            flex-direction: row-reverse;
        }

        .message-content {
            background: white;
            padding: 8px 10px;
            border-radius: 10px;
            max-width: 80%;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            font-size: 13px;
        }

        .user-message .message-content {
            background: #667eea;
            color: white;
        }

        .message-content p {
            margin: 0 0 6px 0;
        }

        .message-content p:last-child {
            margin-bottom: 0;
        }

        .message-content ul {
            margin: 6px 0 0 14px;
        }

        .message-content li {
            margin-bottom: 3px;
            color: #666;
            font-size: 12px;
        }

        .user-message .message-content li {
            color: rgba(255, 255, 255, 0.9);
        }

        .chat-input-container {
            display: flex;
            padding: 10px;
            border-top: 1px solid #e1e5e9;
            background: white;
            gap: 6px;
        }

        #chatInput {
            flex: 1;
            padding: 6px 10px;
            border: 1px solid #e1e5e9;
            border-radius: 16px;
            outline: none;
            font-size: 13px;
        }

        #chatInput:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .chat-send-btn {
            background: #667eea;
            color: white;
            border: none;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s ease;
            font-size: 14px;
        }

        .chat-send-btn:hover {
            background: #5a67d8;
        }

        .chat-suggestions {
            display: flex;
            gap: 6px;
            padding: 6px 10px 10px;
            flex-wrap: wrap;
            background: white;
        }

        .suggestion-btn {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            color: #4a5568;
            padding: 4px 8px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 11px;
            transition: all 0.2s ease;
        }

        .suggestion-btn:hover {
            background: #667eea;
            color: white;
            border-color: #667eea;
        }

        .book-result {
            background: #f7fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 8px;
            margin: 6px 0;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .book-result:hover {
            background: #edf2f7;
            border-color: #667eea;
        }

        .book-result-title {
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 2px;
            font-size: 12px;
        }

        .book-result-info {
            font-size: 10px;
            color: #718096;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .chatbot.open {
                width: calc(100vw - 20px);
                right: 10px;
                bottom: 10px;
            }

            .chatbot.open .chatbot-body {
                max-height: 300px;
            }

            .chatbot.open .chat-messages {
                max-height: 200px;
            }
        }
