* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto Slab', serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('fondo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: sepia(0.2) brightness(0.4) contrast(1.1) saturate(1.3) hue-rotate(10deg);
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(139, 69, 19, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at bottom, rgba(44, 24, 16, 0.2) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding-top: 80px;
}

header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.profile-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.profile-image {
    width: 160px;
    height: 160px;
    border-radius: 30px;
    object-fit: cover;
    border: 3px solid rgba(212, 165, 116, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(212, 165, 116, 0.3);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.3), rgba(139, 69, 19, 0.3));
}

h1 {
    font-size: 4em;
    background: linear-gradient(135deg, #d4a574 0%, #f5deb3 50%, #d4a574 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 0 4px 20px rgba(212, 165, 116, 0.3);
    filter: drop-shadow(0 0 30px rgba(212, 165, 116, 0.2));
}

.subtitle {
    font-size: 1.9em;
    color: #c9b38c;
    font-style: italic;
    opacity: 0.9;
    letter-spacing: 1px;
}

.filter-section {
    margin-bottom: 50px;
}

.authors-section {
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.select-wrapper {
    position: relative;
    min-width: 320px;
}

.authors-select {
    width: 100%;
    padding: 18px 50px 18px 24px;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(30, 22, 15, 0.7));
    border: 2px solid rgba(212, 165, 116, 0.25);
    border-radius: 18px;
    color: #d4a574;
    font-size: 1em;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.authors-select:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.3);
    transform: translateY(-3px);
}

.authors-select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.authors-select option {
    background: #1a1510;
    color: #d4a574;
    padding: 12px;
    font-weight: 500;
}

.select-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #d4a574;
    font-size: 0.9em;
    pointer-events: none;
    transition: transform 0.3s;
}

.authors-select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.clear-filters-btn {
    padding: 18px 30px;
    background: linear-gradient(145deg, rgba(139, 69, 19, 0.4), rgba(212, 165, 116, 0.3));
    border: 2px solid rgba(212, 165, 116, 0.4);
    border-radius: 18px;
    color: #d4a574;
    font-size: 1em;
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.clear-filters-btn:hover {
    background: linear-gradient(145deg, rgba(212, 165, 116, 0.5), rgba(139, 69, 19, 0.5));
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.3);
    transform: translateY(-3px);
    color: #f5deb3;
}

.clear-filters-btn:active {
    transform: translateY(-1px);
}

.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 18px 22px;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(30, 22, 15, 0.7));
    border: 2px solid rgba(212, 165, 116, 0.25);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Roboto Slab', serif;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    min-width: 115px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, transparent 65%);
    opacity: 0;
    transition: all 0.6s;
    transform: scale(0);
}

.filter-btn:hover::before {
    opacity: 1;
    transform: scale(1);
}

.filter-btn:hover {
    transform: translateY(-7px) scale(1.04);
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow: 0 14px 35px rgba(255, 215, 0, 0.35),
                0 6px 20px rgba(0, 0, 0, 0.5);
}

.filter-btn.active {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.28), rgba(212, 165, 116, 0.35));
    border-color: #ffd700;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5),
                0 0 60px rgba(255, 215, 0, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.06);
}

.filter-icon {
    font-size: 1.5em;
    margin-bottom: 0.6em;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6));
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0.75;
}

.filter-btn:hover .filter-icon {
    filter: drop-shadow(0 5px 10px rgba(255, 215, 0, 0.5));
    transform: scale(1.25) rotate(3deg);
    opacity: 1;
}

.filter-btn.active .filter-icon {
    filter: drop-shadow(0 5px 12px rgba(255, 215, 0, 0.7));
    transform: scale(1.2);
    opacity: 1;
}

.filter-text {
    font-size: 1.2em;
    color: #b89968;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.filter-btn:hover .filter-text {
    color: #f5deb3;
    text-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.filter-btn.active .filter-text {
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.6);
    font-weight: 700;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 35px;
    padding: 20px 0;
}

.year-section {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.year-title {
    font-size: 2.5em;
    background: linear-gradient(135deg, #d4a574 0%, #f5deb3 50%, #d4a574 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: left;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    filter: drop-shadow(0 0 20px rgba(212, 165, 116, 0.2));
}

.book-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.7), rgba(20, 15, 10, 0.8));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.book-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 50%);
    transition: all 0.8s;
    opacity: 0;
}

.book-card:hover::before {
    top: -50%;
    left: -50%;
    opacity: 1;
}

.book-card:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.3),
                0 0 60px rgba(212, 165, 116, 0.2);
}

.book-cover-container {
    width: 100%;
    aspect-ratio: 5 / 8;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    position: relative;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(139, 69, 19, 0.2));
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.book-card:hover .book-cover {
    transform: scale(1.1);
}

.book-info {
    position: relative;
    z-index: 1;
}

.book-title {
    font-size: 1.15em;
    color: #f5deb3;
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.book-author {
    font-size: 0.9em;
    color: #c9b38c;
    margin-bottom: 12px;
    font-style: italic;
}

.rating {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.star {
    font-size: 1.2em;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    transition: transform 0.2s;
}

.star.empty {
    color: #3a3a3a;
    text-shadow: none;
}

.book-card:hover .star {
    transform: scale(1.15);
}

.read-date {
    font-size: 0.85em;
    color: #b89968;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #c9b38c;
    font-size: 1.2em;
    font-style: italic;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    .subtitle {
        font-size: 1em;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 25px;
    }

    .filter-btn {
        min-width: 90px;
        padding: 14px 16px;
    }

    .filter-icon {
        font-size: 1.2em;
    }

    .filter-text {
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2em;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Estilos del Menú de Navegación */
.navbar {
    background: rgba(15, 10, 5, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    padding: 15px 0;
    position: fixed; /* Mantiene la barra en su lugar */
    top: 0;          /* Pegada al borde superior */
    left: 0;         /* Pegada al borde izquierdo */
    width: 100%;     /* Que ocupe todo el ancho */
    z-index: 1000;   /* Asegura que esté por encima de los libros */
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #d4a574;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'Roboto Slab', serif;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #c9b38c;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.nav-link:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Botón Hamburguesa */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 30px;
    height: 3px;
    background-color: #d4a574;
    border-radius: 2px;
    transition: 0.3s;
}


/* Responsive Menú */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 10, 5, 0.98);
        flex-direction: column;
        text-align: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }

    .nav-menu.active {
        max-height: 300px;
        border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    }

    .nav-link {
        display: block;
        padding: 20px;
        border-bottom: 1px solid rgba(212, 165, 116, 0.1);
    }
}