/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Nunito:wght@400;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-color: #FFC857;
    /* Warm Gold */
    --primary-dark: #FFB319;
    --secondary-color: #48CAE4;
    /* Soft Sky Blue */
    --accent-color: #FF6B6B;
    /* Soft Coral */
    --text-color: #2D3142;
    /* Dark Blue-Grey */
    --bg-color: #FDFBF7;
    /* Cream/Off-white */
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Fredoka', sans-serif;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    border: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 200, 87, 0.4);
}

.section {
    padding: var(--spacing-lg) 0;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: var(--spacing-md);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
    transition: opacity 0.3s;
}

.modal-content {
    margin: 15% auto;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s;
    text-align: center;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-dark);
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Book Detail Page */
.book-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 2rem;
}

.book-detail-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.book-detail-content {
    padding-top: 1rem;
}

.book-detail-content h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
}

.book-description {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 600;
}

.back-link:hover {
    color: var(--primary-dark);
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .book-detail-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .book-detail-content h1 {
        font-size: 2rem;
        text-align: center;
    }

    .book-actions {
        text-align: center;
    }
}