/* Hide Read Sample and Add to Wishlist buttons for now */
.book-action-btn.secondary,
.book-action-btn.tertiary {
    display: none !important;
}

/* Books Hero Section */
.books-hero {
    height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
}

.books-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/books-herobackground.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.books-hero-content {
    text-align: center;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.books-hero-title {
    font-family: 'TradeGothicInline', 'Oswald', sans-serif;
    font-weight: normal;
    font-size: 3.5rem;
    color: #FF0000;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out;
}

.books-hero-subtitle {
    font-size: 1.3rem;
    color: #D4D4D4;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Books Main Section */
.books-main-section {
    padding: 80px 0;
    background-color: #1A1A1A;
}

.books-detailed-grid {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.book-detailed-card {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
    background-color: #282828;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.book-detailed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF0000, transparent, #FF0000);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.book-detailed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(255, 0, 0, 0.2);
}

.book-detailed-card:hover::before {
    opacity: 1;
}

.book-detailed-card .book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,26,26,0.8);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

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

.book-detailed-card:nth-child(even) {
    grid-template-columns: 2fr 1fr;
}

.book-detailed-card:nth-child(even) .book-detailed-image {
    order: 2;
}

.book-detailed-card:nth-child(even) .book-detailed-info {
    order: 1;
}

/* Book Cover Container */
.book-cover-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    aspect-ratio: 2/3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.book-detailed-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

.book-cover-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #000000 0%, #1A1A1A 50%, #000000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 30px 20px;
    color: #FF0000;
    text-align: center;
}

.placeholder-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.placeholder-content p {
    font-size: 0.9rem;
    color: #D4D4D4;
    margin-bottom: 20px;
    line-height: 1.4;
}

.placeholder-content h4 {
    font-size: 1.4rem;
    color: #FF0000;
    font-weight: 700;
    letter-spacing: 2px;
}

.placeholder-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

/* Building Silhouette for Book 1 */
.building-silhouette {
    width: 80%;
    height: 120px;
    background: linear-gradient(to top, #D4D4D4 0%, #FFFFFF 50%, #D4D4D4 100%);
    clip-path: polygon(
        0% 100%, 15% 100%, 15% 60%, 20% 60%, 20% 40%, 25% 40%, 25% 20%, 
        35% 20%, 35% 0%, 45% 0%, 45% 30%, 55% 30%, 55% 10%, 65% 10%, 
        65% 50%, 75% 50%, 75% 70%, 85% 70%, 85% 100%, 100% 100%
    );
    position: relative;
}

.building-silhouette::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #FFFFFF 0%, transparent 70%);
    border-radius: 50%;
}

/* Crypt Silhouette for Book 2 */
.crypt-silhouette {
    width: 70%;
    height: 100px;
    background: linear-gradient(to top, #D4D4D4 0%, #FFFFFF 100%);
    clip-path: polygon(
        0% 100%, 0% 60%, 10% 50%, 10% 30%, 20% 20%, 30% 20%, 30% 10%, 
        40% 0%, 60% 0%, 70% 10%, 70% 20%, 80% 20%, 90% 30%, 90% 50%, 
        100% 60%, 100% 100%
    );
    position: relative;
}

.crypt-silhouette::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 25px;
    background: #000000;
    border-radius: 8px 8px 0 0;
}

/* Theater Silhouette for Book 3 */
.theater-silhouette {
    width: 85%;
    height: 80px;
    background: linear-gradient(to top, #D4D4D4 0%, #FFFFFF 100%);
    clip-path: polygon(
        0% 100%, 0% 40%, 5% 35%, 10% 30%, 15% 25%, 20% 20%, 25% 15%, 
        30% 10%, 35% 5%, 40% 0%, 60% 0%, 65% 5%, 70% 10%, 75% 15%, 
        80% 20%, 85% 25%, 90% 30%, 95% 35%, 100% 40%, 100% 100%
    );
    position: relative;
    margin-bottom: 20px;
}

.theater-sign {
    background: #000000;
    color: #FFFFFF;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid #FFFFFF;
    border-radius: 3px;
    letter-spacing: 1px;
}

/* Flying Bats Animation */
.flying-bats {
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    height: 60%;
}

.placeholder-bat {
    position: absolute;
    background-image: url('bat-frame1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
    animation: flyPlaceholderBat 8s linear infinite, flapWingsBook 0.8s infinite;
}

.placeholder-bat:nth-child(1) {
    top: 20%;
    width: 18px;
    height: 12px;
    animation-delay: 0s, 0.1s;
}

.placeholder-bat:nth-child(2) {
    top: 50%;
    width: 22px;
    height: 14px;
    animation-delay: 2s, 0.3s;
}

.placeholder-bat:nth-child(3) {
    top: 80%;
    width: 16px;
    height: 10px;
    animation-delay: 4s, 0.2s;
}

@keyframes flyPlaceholderBat {
    0% {
        left: -20px;
        transform: translateY(0px);
    }
    25% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(5px);
    }
    75% {
        transform: translateY(-8px);
    }
    100% {
        left: calc(100% + 20px);
        transform: translateY(2px);
    }
}

/* Book Detailed Info */
.book-detailed-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.book-detailed-title {
    font-size: 2.8rem;
    color: #FF0000;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.book-detailed-subtitle {
    font-size: 1.2rem;
    color: #D4D4D4;
    opacity: 0.8;
    margin-bottom: 10px;
}

.book-detailed-description {
    line-height: 1.8;
    color: #D4D4D4;
}

.book-detailed-description p {
    margin-bottom: 15px;
}

/* Book Actions */
.book-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.book-action-btn {
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.book-action-btn.primary {
    background-color: #FF0000;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.book-action-btn.primary:hover {
    background-color: #CC0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.book-action-btn.secondary {
    background-color: transparent;
    color: #FF0000;
    border: 2px solid #FF0000;
}

.book-action-btn.secondary:hover {
    background-color: #FF0000;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.book-action-btn.tertiary {
    background-color: #282828;
    color: #D4D4D4;
    border: 1px solid #D4D4D4;
}

.book-action-btn.tertiary:hover {
    background-color: #D4D4D4;
    color: #282828;
    transform: translateY(-2px);
}

/* Book Details */
.book-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #1A1A1A;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: #FFFFFF;
}

.detail-value {
    color: #D4D4D4;
}

/* Series Info Section */
.series-info-section {
    padding: 80px 0;
    background-color: #282828;
}

.series-info-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.series-description {
    margin: 40px 0 60px;
}

.series-description p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #D4D4D4;
}

.reading-order {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.reading-order h3 {
    color: #FF0000;
    margin-bottom: 20px;
    text-align: center;
}

.reading-list {
    list-style: none;
    counter-reset: book-counter;
}

.reading-list li {
    counter-increment: book-counter;
    margin-bottom: 15px;
    padding: 15px 20px;
    background-color: #1A1A1A;
    border-radius: 8px;
    border-left: 4px solid #FF0000;
    position: relative;
}

.reading-list li::before {
    content: counter(book-counter);
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #FF0000;
    color: #FFFFFF;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.reading-list strong {
    color: #FF0000;
}

/* Responsive Design for Books Page */
@media (max-width: 1024px) {
    .book-detailed-card {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .book-detailed-card:nth-child(even) {
        grid-template-columns: 1fr;
    }
    
    .book-detailed-card:nth-child(even) .book-detailed-image,
    .book-detailed-card:nth-child(even) .book-detailed-info {
        order: initial;
    }
    
    .books-hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .books-hero {
        height: 50vh;
    }
    
    .books-hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .books-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .book-detailed-card {
        padding: 30px 20px;
        gap: 30px;
    }
    
    .book-detailed-title {
        font-size: 2.2rem;
    }
    
    .book-cover-container {
        max-width: 280px;
    }
    
    .book-actions {
        flex-direction: column;
    }
    
    .book-action-btn {
        width: 100%;
    }
    
    .books-detailed-grid {
        gap: 50px;
    }
}

@media (max-width: 480px) {
    .books-hero-title {
        font-size: 2rem;
    }
    
    .book-detailed-title {
        font-size: 1.8rem;
    }
    
    .book-cover-container {
        max-width: 240px;
    }
    
    .placeholder-content h3 {
        font-size: 1.6rem;
    }
    
    .placeholder-content h4 {
        font-size: 1.1rem;
    }
}

/* Book Bat Animations */
.book-bats {
    display: flex;
    gap: 20px;
}

.book-bat {
    width: 35px;
    height: 22px;
    background-image: url('bat-frame1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) saturate(100%) invert(13%) sepia(100%) saturate(7500%) hue-rotate(0deg) brightness(100%) contrast(100%);
    animation: flutter 2s ease-in-out infinite, flapWingsBook 0.6s infinite;
}

.book-bat:nth-child(1) {
    animation: flutter 2s ease-in-out infinite, flapWingsBook 0.6s infinite;
    animation-delay: 0s, 0.1s;
}

.book-bat:nth-child(2) {
    animation: flutter 2s ease-in-out infinite, flapWingsBook 0.7s infinite;
    animation-delay: 0.3s, 0.4s;
}

.book-bat:nth-child(3) {
    animation: flutter 2s ease-in-out infinite, flapWingsBook 0.5s infinite;
    animation-delay: 0.6s, 0.2s;
}

@keyframes flutter {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

@keyframes flapWingsBook {
    0% { background-image: url('images/bat-frame1.png'); }
    25% { background-image: url('images/bat-frame2.png'); }
    50% { background-image: url('images/bat-frame3.png'); }
    75% { background-image: url('images/bat-frame2.png'); }
    100% { background-image: url('images/bat-frame1.png'); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.book-detailed-card.animate-in:nth-child(odd) {
    animation: slideInLeft 0.8s ease-out forwards;
}

.book-detailed-card.animate-in:nth-child(even) {
    animation: slideInRight 0.8s ease-out forwards;
}
