@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Fredericka+the+Great&display=swap');

:root {
    --primary: #D14D72;
    --secondary: #FFB03B;
    --accent: #8EA604;
    --monster-purple: #9B59B6;
    --monster-green: #27AE60;
    --cream: #FFF8E8;
    --text-dark: #2C1810;
    --text-medium: #6B4226;
    --text-light: #A67C52;
    --border-ornate: #D4A574;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    color: var(--text-dark);
    line-height: 1.8;
    background: var(--cream);
}

/* Header */
header {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--secondary);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 80px;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-title {
    font-family: 'Fredericka the Great', cursive;
    font-size: 2.5rem;
    color: var(--primary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #FFE5EC 0%, #FFF8E8 50%, #E8F5E9 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--primary) 0px,
        var(--primary) 20px,
        var(--secondary) 20px,
        var(--secondary) 40px,
        var(--accent) 40px,
        var(--accent) 60px
    );
}

.hero h1 {
    font-family: 'Fredericka the Great', cursive;
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero .subtitle {
    font-size: 1.8rem;
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #B03E5D;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.btn-amazon {
    background: #FF9900;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-amazon:hover {
    background: #F08804;
    transform: translateY(-2px);
}

.btn-amazon img {
    height: 24px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* Book Cover Section */
.book-cover-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 4rem;
}

.cover-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.2);
    border: 6px solid var(--secondary);
}

.book-info h2 {
    font-family: 'Fredericka the Great', cursive;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.book-info p {
    font-size: 1.3rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

/* Synopsis Box */
.synopsis-box {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border: 4px solid var(--accent);
    margin: 3rem 0;
}

.synopsis-box h3 {
    font-family: 'Fredericka the Great', cursive;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.synopsis-box p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* PDF Reader Section */
.pdf-reader-section {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 4px solid var(--secondary);
    margin: 3rem 0;
    text-align: center;
}

.pdf-reader-section h2 {
    font-family: 'Fredericka the Great', cursive;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 2rem;
}

#pdf-canvas {
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 10px;
    margin: 2rem auto;
    display: block;
}

.pdf-controls {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.pdf-controls button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.pdf-controls button:hover:not(:disabled) {
    background: #B03E5D;
    transform: translateY(-2px);
}

.pdf-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pdf-controls span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 4px solid var(--secondary);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item img {
    width: 100%;
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 30px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.3);
    border: 6px solid var(--secondary);
    text-align: center;
    max-width: 500px;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content h2 {
    font-family: 'Fredericka the Great', cursive;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1.3rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-medium);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--cream);
    padding: 3rem 2rem 2rem;
    margin-top: 6rem;
    border-top: 6px solid var(--secondary);
    text-align: center;
}

footer p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .book-cover-section {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
