/* Estilos principales de la Biblioteca Digital */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset y base */
* {
    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-color: #f8f9fa;
}

/* Hero Section Modern */
.hero-section-modern {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
    background-image: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    color: #ffffff !important;
    width: 100%;
    max-width: 100%;
}

/* Forzar el gradiente sobre cualquier otro estilo */
section.hero-section-modern {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
    background-image: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
}

/* Sobrescribir cualquier estilo de Bootstrap que pueda interferir */
.hero-section-modern.bg-light,
.hero-section-modern.bg-white {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
    background-image: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
}

/* Asegurar que el texto sea visible */
.hero-section-modern .text-white {
    color: #ffffff !important;
}

.hero-section-modern .display-3 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.hero-section-modern::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 1000 100" fill="rgba(255,255,255,0.05)"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
    background-position: bottom;
    z-index: 1;
}

.hero-section-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    z-index: 1;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-section-modern .container {
    position: relative;
    z-index: 2;
}

.hero-section-modern h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    z-index: 2;
    font-weight: 700 !important;
}

.hero-section-modern p {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    position: relative;
    z-index: 2;
    font-weight: 400 !important;
}

.hero-section-modern .lead {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

.hero-icon-modern {
    position: relative;
    z-index: 2;
}

/* Carrusel de libros en el hero */
.hero-books-carousel {
    position: relative;
    z-index: 2;
    height: 400px;
    overflow: hidden;
}

.books-carousel-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
    height: 100%;
    animation: carouselFloat 8s ease-in-out infinite;
}

.book-carousel-item {
    position: relative;
    width: 120px;
    height: 160px;
    transform-style: preserve-3d;
    animation: bookFloat 6s ease-in-out infinite;
}

.book-carousel-item:nth-child(1) { animation-delay: 0s; }
.book-carousel-item:nth-child(2) { animation-delay: 1s; }
.book-carousel-item:nth-child(3) { animation-delay: 2s; }
.book-carousel-item:nth-child(4) { animation-delay: 3s; }
.book-carousel-item:nth-child(5) { animation-delay: 4s; }
.book-carousel-item:nth-child(6) { animation-delay: 5s; }
.book-carousel-item:nth-child(7) { animation-delay: 6s; }

.book-carousel-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.book-carousel-item:hover .book-carousel-cover {
    transform: scale(1.05) rotateY(5deg);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
}

@keyframes carouselFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes bookFloat {
    0%, 100% { 
        transform: translateY(0px) rotateY(0deg); 
    }
    25% { 
        transform: translateY(-15px) rotateY(5deg); 
    }
    50% { 
        transform: translateY(-20px) rotateY(0deg); 
    }
    75% { 
        transform: translateY(-15px) rotateY(-5deg); 
    }
}

/* Icono de libro (mantener para compatibilidad) */
.hero-book-icon {
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Responsive para el carrusel */
@media (max-width: 768px) {
    .hero-books-carousel {
        height: 300px;
    }
    
    .book-carousel-item {
        width: 80px;
        height: 110px;
    }
    
    .books-carousel-container {
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .hero-books-carousel {
        height: 250px;
    }
    
    .book-carousel-item {
        width: 60px;
        height: 80px;
    }
    
    .books-carousel-container {
        gap: 10px;
    }
}

.search-box-modern {
    position: relative;
    z-index: 2;
}

.search-input-modern {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px 0 0 15px;
    padding: 15px 20px;
    font-size: 1.1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-input-modern:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: #8B5CF6;
}

.search-btn-modern {
    background: #8B5CF6;
    border: none;
    border-radius: 0 15px 15px 0;
    padding: 15px 25px;
    font-size: 1.1rem;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.search-btn-modern:hover {
    background: #7C3AED;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

/* Navbar Logo */
.navbar-brand img {
    height: 40px !important;
    width: auto !important;
    max-height: 40px !important;
    object-fit: contain;
}

.navbar-brand span {
    color: #ffffff !important;
    font-weight: 700;
}

/* Footer Modern */
.footer-modern {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.footer-modern::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 1000 100" fill="rgba(255,255,255,0.02)"><polygon points="0,100 1000,0 1000,100"/></svg>');
    background-size: cover;
    background-position: top;
}

.footer-brand {
    position: relative;
    z-index: 2;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #8B5CF6, #7C3AED);
    border-radius: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: #b8c5d1;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.footer-link:hover {
    color: #8B5CF6;
    transform: translateX(5px);
}

.footer-link::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: #8B5CF6;
    transition: width 0.3s ease;
}

.footer-link:hover::before {
    width: 10px;
}

.social-links-modern {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link:hover {
    background: #8B5CF6;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 2rem 0;
}

.footer-copyright,
.footer-love {
    color: #8a9ba8;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
}

.footer-love .fa-heart {
    animation: heartbeat 2s ease-in-out infinite;
}

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

/* Hero Section Legacy (mantener para compatibilidad) */
.hero-section {
    background: var(--gradient-primary);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::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 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,100 1000,0"/></svg>');
    background-size: cover;
}

.hero-image {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Search Box */
.search-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 1.1rem;
}

.search-box .btn {
    border-radius: 8px;
    padding: 15px 25px;
    font-weight: 600;
}

/* Cards */
.book-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.book-cover {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Icono de audiolibro */
.audiobook-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    z-index: 10;
    animation: pulse-audio 2s ease-in-out infinite;
}

.book-cover-container {
    position: relative;
}

.book-cover-container .audiobook-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.book-cover-large {
    position: relative;
}

.book-cover-large .audiobook-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.audiobook-badge i {
    font-size: 14px;
}

@keyframes pulse-audio {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.6);
    }
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-info {
    padding: 20px;
}

.book-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.book-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.book-actions i {
    margin-right: 5px;
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: inherit;
}

.category-icon {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.category-card h5 {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Alphabet Navigation */
.alphabet-nav {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.alphabet-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: var(--transition);
    margin: 5px;
}

.alphabet-btn:hover {
    transform: scale(1.1);
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    padding: 10px 20px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

/* Navigation */
.navbar {
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    padding: 10px 15px !important;
    border-radius: 8px;
    margin: 0 5px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-success {
    border-left-color: var(--success-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--secondary-color);
}

/* Footer */
footer {
    background: var(--dark-color) !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--secondary-color) !important;
}

.social-links a {
    display: inline-block;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--secondary-color);
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Badges */
.badge {
    border-radius: 20px;
    font-weight: 500;
    padding: 6px 12px;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .book-cover {
        height: 250px;
    }
    
    .alphabet-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .category-card {
        padding: 20px 15px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .search-box {
        padding: 15px;
    }
    
    .book-cover {
        height: 200px;
    }
    
    .alphabet-btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utilidades */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg);
}

/* Estilos para reacciones */
.reactions-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.reaction-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px;
    border-radius: 50%;
}

.reaction-btn:hover {
    transform: scale(1.2);
}

.reaction-btn.active {
    transform: scale(1.3);
}

/* Estilos para favoritos */
.favorite-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    color: #ccc;
}

.favorite-btn.active {
    color: var(--accent-color);
}

.favorite-btn:hover {
    transform: scale(1.1);
}

/* Estilos para el sistema 404 */
.error-404 {
    text-align: center;
    padding: 100px 0;
}

.error-404 h1 {
    font-size: 8rem;
    font-weight: 900;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.error-404 h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-404 p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Estilos para las secciones de libros */
.book-section {
    margin-bottom: 4rem;
}

.book-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.book-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.book-section .text-muted {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Estilos para las tarjetas de libros en secciones */
.book-section .book-card {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.book-section .book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.book-section .book-cover {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    height: 250px;
}

.book-section .book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-section .book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-section .book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-section .book-card:hover .book-overlay {
    opacity: 1;
}

.book-section .book-info {
    padding: 12px 15px 15px;
    background: white;
}

.book-section .book-category {
    margin-bottom: 8px;
}

.book-section .book-category .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}

.book-section .book-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
}

.book-section .book-author {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-section .book-stats {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #f8f9fa;
}

.book-section .book-stats small {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
    background: #f8f9fa;
}

/* Colores temáticos para cada sección */
.book-section h2.text-primary {
    color: var(--primary-color) !important;
}

.book-section h2.text-success {
    color: #28a745 !important;
}

.book-section h2.text-danger {
    color: #dc3545 !important;
}

.book-section h2.text-info {
    color: #17a2b8 !important;
}

.book-section h2.text-warning {
    color: #ffc107 !important;
}

/* Responsive para las secciones */
@media (max-width: 768px) {
    .book-section h2 {
        font-size: 1.5rem;
    }
    
    .book-section .book-cover {
        height: 200px;
    }
    
    .book-section .book-cover img {
        height: 100%;
    }
    
    .book-section .book-title {
        font-size: 0.85rem;
    }
    
    .book-section .book-author {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .book-section {
        margin-bottom: 3rem;
    }
    
    .book-section h2 {
        font-size: 1.3rem;
    }
    
    .book-section .book-cover {
        height: 180px;
    }
    
    .book-section .book-cover img {
        height: 100%;
    }
    
    .book-section .book-title {
        font-size: 0.8rem;
        height: 2.4em;
    }
    
    .book-section .book-author {
        font-size: 0.75rem;
    }
    
    .book-section .book-info {
        padding: 12px;
    }
}

/* Estilos para sugerencias de búsqueda */
.search-suggestions {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
    transition: all 0.3s ease;
}

.search-suggestions:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.3);
}

.suggestion-tag {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    margin: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.suggestion-tag:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

.suggestion-tag:active {
    transform: translateY(0);
}

.no-results-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-results-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.alternative-books {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
}

.alternative-books .card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alternative-books .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-suggestions {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

.category-suggestions .btn {
    border-radius: 25px;
    padding: 10px 20px;
    margin: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-suggestions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.search-tips {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 5px solid #28a745;
    border-radius: 0 15px 15px 0;
    padding: 1.5rem;
    margin: 1rem 0;
}

.search-tips h6 {
    color: #155724;
    font-weight: 600;
    margin-bottom: 1rem;
}

.search-tips ul li {
    color: #155724;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.search-tips ul li i {
    color: #28a745;
    font-size: 1.1rem;
}

/* Responsive para sugerencias */
@media (max-width: 768px) {
    .search-suggestions {
        padding: 1.5rem 1rem;
    }
    
    .suggestion-tag {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin: 2px;
    }
    
    .no-results-section {
        padding: 2rem 1rem;
    }
    
    .alternative-books {
        padding: 1.5rem 1rem;
    }
    
    .category-suggestions {
        padding: 1.5rem 1rem;
    }
    
    .category-suggestions .btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}

/* Estilos para emojis de reacciones */
.reaction-btn {
    font-size: 1.5rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border: 2px solid !important;
}

.reaction-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

.reaction-btn:active {
    transform: scale(0.95) !important;
}

/* Colores específicos para cada emoji */
.reaction-btn[value="like"] {
    border-color: #007bff !important;
    color: #007bff !important;
}

.reaction-btn[value="like"]:hover {
    background-color: #007bff !important;
    color: white !important;
}

.reaction-btn[value="love"] {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

.reaction-btn[value="love"]:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

.reaction-btn[value="wow"] {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

.reaction-btn[value="wow"]:hover {
    background-color: #ffc107 !important;
    color: white !important;
}

.reaction-btn[value="angry"] {
    border-color: #343a40 !important;
    color: #343a40 !important;
}

.reaction-btn[value="angry"]:hover {
    background-color: #343a40 !important;
    color: white !important;
}

.reaction-btn[value="sad"] {
    border-color: #6c757d !important;
    color: #6c757d !important;
}

.reaction-btn[value="sad"]:hover {
    background-color: #6c757d !important;
    color: white !important;
}

/* Contenedor de reacciones */
.reactions-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.reaction-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reaction-counts .badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* Responsive para reacciones */
@media (max-width: 768px) {
    .reaction-btn {
        font-size: 1.2rem !important;
        width: 40px !important;
        height: 40px !important;
        padding: 0.4rem !important;
    }
    
    .reactions-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .reaction-counts {
        margin-top: 0.5rem;
    }
}

/* Estilos para etiquetas de palabras clave */
.keyword-tag {
    transition: all 0.3s ease !important;
    border: 1px solid #dee2e6 !important;
    background-color: #f8f9fa !important;
    color: #495057 !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

.keyword-tag:hover {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3) !important;
    text-decoration: none !important;
}

/* Estilos para el botón de reporte */
.btn-report {
    transition: all 0.3s ease;
    border: 1px solid #ffc107;
    background-color: transparent;
    color: #ffc107;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.btn-report:hover {
    background-color: #ffc107;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.btn-report:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
    border-color: #ffc107;
}

.btn-report i {
    font-size: 0.875rem;
}

.keyword-tag:hover i {
    color: white !important;
}

.keyword-tag:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3) !important;
}

.keyword-tag i {
    font-size: 0.75rem !important;
    color: #6c757d !important;
    transition: color 0.3s ease !important;
}

/* Responsive para etiquetas de palabras clave */
@media (max-width: 768px) {
    .keyword-tag {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
    }
}