html, body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #e0e0e0;
}

#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden; /* Prevent scrollbars from background */
}

.bg-image {
    position: absolute;
    top: -5%; /* Cover edges from blur */
    left: -5%; /* Cover edges from blur */
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    transition: opacity 1s ease-in-out;
    opacity: 0;
}

.bg-image.active {
    opacity: 1;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 40px 20px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.button-wrapper {
    position: relative;
    margin-bottom: 60px;
    z-index: 20;
}

.logo-container {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.google-books-logo {
    width: 32px;
    height: auto;
}

.clickable-button {
    display: inline-flex;
    align-items: center;
    background-color: #2c3e50; 
    color: white; 
    padding: 8px 25px 8px 10px; /* Padding'i yeni yapıya göre ayarladık */
    border-radius: 50px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.6); 
    text-decoration: none; 
    font-size: 1.2em;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.clickable-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.7);
    background-color: #34495e;
}

#description-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    padding-left: 120px;
    background: linear-gradient(145deg, #2a2a2a, #1e1e1e);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    margin-top: 20px;
}

.logo {
    position: absolute;
    width: 140px; /* Logoyu büyüttük */
    height: auto;
    top: 0; /* Üst kenara hizala */
    transform: translateY(-55%); /* Biraz daha yukarı aldık */
    right: 20px; 
    z-index: 10;
    opacity: 0.9;
    filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.5));
}

#book-cover-wrapper {
    position: absolute;
    width: 150px;
    height: 200px;
    top: 50%;
    left: -50px;
    transform: translateY(-50%) rotate(-8deg);
    z-index: 15;
    transition: all 0.3s ease-in-out;
}

#description-container:hover #book-cover-wrapper {
    transform: translateY(-50%) rotate(0deg) scale(1.05);
    box-shadow: -15px 15px 40px rgba(0,0,0,0.7);
}

#book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: -10px 10px 30px rgba(0,0,0,0.6);
    border: 2px solid rgba(255,255,255,0.1);
}

#book-description {
    margin: 0;
    font-size: 1em;
    line-height: 1.7;
    text-align: left;
}

#book-description p {
    margin: 0 0 1.2em 0;
}

#book-description p:last-child {
    margin-bottom: 0;
}

/* Animasyonlar */
.animatable {
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.slide-out-right {
    opacity: 0;
    transform: translateX(30px);
}

.slide-in-right {
    opacity: 1;
    transform: translateX(0);
}

.slide-out-left {
    opacity: 0;
    transform: translateX(-30px);
}

.slide-in-left {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive Tasarım */
@media (max-width: 768px) {
    .main-container {
        padding-top: 80px;
    }

    #description-container {
        padding: 20px;
        padding-top: 120px;
        text-align: center;
        max-width: 90%;
        margin-bottom: 60px; /* Sayfa altından boşluk bırakmak için */
    }

    .logo {
        width: 110px; /* Logoyu büyüttük */
        top: auto; /* Üst konumlandırmayı iptal et */
        bottom: -55px; /* Yeni boyuta göre yukarı aldık */
        left: 50%; /* Yatayda ortala */
        transform: translateX(-50%); /* Yatayda tam ortalamak için */
        right: auto; /* Sağ konumlandırmayı iptal et */
    }

    #book-description {
        text-align: justify;
    }
}

#star-rating {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 2px;
    font-size: 1.6em;
    cursor: default;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 20px;
    text-shadow: 0 0 3px black;
    z-index: 2; /* Ensure it's above the cover's hover effect */
}

.star {
    position: relative;
    display: inline-block;
    color: #444; /* Empty star color */
}

.star::before {
    content: '★';
}

.star::after {
    content: '★';
    position: absolute;
    top: 0;
    left: 0;
    color: #f39c12; /* Filled star color */
    overflow: hidden;
    width: var(--fill-percentage);
    transition: width 0.5s ease-out;
}

@media (max-width: 768px) {
    #book-cover-wrapper {
        width: 120px;
        height: 160px;
        top: -60px;
        left: 50%;
        transform: translateX(-50%) rotate(0deg);
    }

    #description-container:hover #book-cover-wrapper {
        transform: translateX(-50%) scale(1.05);
    }

    #description-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
