/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcf7f, #4ecdc4);
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
    padding: 2rem 0;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

header h1 {
    font-family: 'Amatic SC', cursive;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.tagline {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-weight: 600;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.cover-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: rotate(2deg);
    transition: transform 0.3s ease;
}

.cover-image:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Books Section */
.books {
    padding: 4rem 0;
    background: #f8f9fa;
}

.books h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #2d3436;
}

.books-grid {
    display: grid;
    gap: 3rem;
}

.book {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.book:nth-child(even) {
    grid-template-columns: 1fr 200px;
}

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

.book-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-purchase {
    margin-top: 1rem
}

.book h3 {
    font-family: 'Amatic SC', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    color: #e17055;
    margin-bottom: 0.5rem;
}

.book-format {
    background: #74b9ff;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.book p {
    margin-bottom: 1rem;
    color: #636e72;
}

/* Gallery Section */
.gallery {
    padding: 4rem 0;
    background: linear-gradient(135deg, #a29bfe, #fd79a8);
    color: white;
}

.gallery h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.gallery-item p {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Purchasing Section */
.purchasing {
    padding: 4rem 0;
    background: #00b894;
    color: white;
}

.purchasing h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.purchase-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.purchase-card {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
}

.purchase-card h3 {
    font-family: 'Amatic SC', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.format {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.purchase-btn {
    display: inline-block;
    background: #fd79a8;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.purchase-btn:hover {
    background: #e84393;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.coming-soon {
    margin-top: 1rem;
    font-style: italic;
    opacity: 0.8;
}

/* Author Section */
.author {
    padding: 4rem 0;
    background: #ffeaa7;
}

.author h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #2d3436;
}

.author-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.author-text p {
    margin-bottom: 1.5rem;
    color: #636e72;
    font-size: 1.1rem;
    line-height: 1.8;
}

.author-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Newsletter Section */
.newsletter {
    padding: 4rem 0;
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    color: white;
}

.newsletter h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.newsletter-text h3 {
    font-family: 'Amatic SC', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.newsletter-promise {
    font-size: 0.9rem !important;
    opacity: 0.8;
    font-style: italic;
}

.newsletter-form {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 1rem;
}

.form-group input[type="email"] {
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
    color: #333;
    transition: all 0.3s ease;
}

.form-group input[type="email"]:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.signup-btn {
    background: #e17055;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.signup-btn:hover {
    background: #d63031;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.form-message {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background: rgba(0, 255, 0, 0.2);
    color: #155724;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.form-message.error {
    background: rgba(255, 0, 0, 0.2);
    color: #721c24;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Bulk Purchasing Section */
.bulk-purchasing {
    padding: 4rem 0;
    background: #6c5ce7;
    color: white;
}

.bulk-purchasing h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.bulk-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.bulk-info h3 {
    font-family: 'Amatic SC', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.bulk-info ul {
    list-style: none;
    margin: 1.5rem 0;
}

.bulk-info li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
}

.bulk-info li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #ffeaa7;
    font-weight: bold;
    font-size: 1.2rem;
}

.bulk-contact {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.bulk-contact h3 {
    font-family: 'Amatic SC', cursive;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-btn {
    display: inline-block;
    background: #fd79a8;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-top: 1rem;
}

.contact-btn:hover {
    background: #e84393;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Footer */
footer {
    background: #2d3436;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-info h3,
.footer-contact h3,
.footer-social h3 {
    font-family: 'Amatic SC', cursive;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffeaa7;
}

.footer-contact a {
    color: #74b9ff;
    text-decoration: none;
}

.footer-contact a:hover {
    color: #0984e3;
}

/* Social Links Styling */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #74b9ff;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.social-link:hover {
    color: #0984e3;
    background: rgba(116, 185, 255, 0.1);
    transform: translateX(5px);
}

.social-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.social-link span {
    font-weight: 600;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #636e72;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .book {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .book:nth-child(even) {
        grid-template-columns: 1fr;
    }
    
    .book:nth-child(even) .book-image {
        order: 0;
    }
    
    .author-content {
        grid-template-columns: 1fr;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .bulk-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .main-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .social-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 1.5rem 0;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .social-link {
        padding: 0.4rem;
        gap: 0.5rem;
    }
    
    .social-link span {
        font-size: 0.9rem;
    }
}

/* Interactive Book Viewer */
.book-preview {
    background: linear-gradient(135deg, #ddd6fe, #e0e7ff);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.book-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(99,102,241,0.1)"/></svg>') repeat;
    opacity: 0.3;
}

.book-preview .container {
    position: relative;
    z-index: 1;
}

.book-preview h2 {
    font-family: 'Amatic SC', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #4c1d95;
}

.book-preview .subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
}

.book-viewer {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 2rem;
    position: relative;
}

.book-spread {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    min-height: 400px;
    position: relative;
}

.book-page {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.book-page:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.book-page img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 300px;
}

.book-page.single {
    max-width: 300px;
}

.book-page.double {
    max-width: 300px;
}

.book-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.nav-button {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 8px rgba(99,102,241,0.3);
}

.nav-button:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99,102,241,0.4);
}

.nav-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-indicator {
    background: rgba(99,102,241,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    color: #4c1d95;
}

.book-spread.single-page {
    justify-content: center;
}

.book-spread.double-page {
    justify-content: center;
    gap: 0;
}

/* Loading state */
.book-page.loading {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.book-page.loading::after {
    content: 'Loading...';
    color: #6b7280;
    font-size: 1rem;
}

/* Mobile responsiveness for book viewer */
@media (max-width: 768px) {
    .book-preview {
        padding: 2rem 0;
    }
    
    .book-preview h2 {
        font-size: 2rem;
    }
    
    .book-viewer {
        margin: 0 1rem;
        padding: 1rem;
    }
    
    .book-spread {
        gap: 0.5rem;
        min-height: auto;
    }
    
    .book-page img {
        max-width: 250px;
    }
    
    .book-controls {
        margin-top: 1.5rem;
        padding: 0;
    }
    
    .nav-button {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .book-page img {
        max-width: 140px;
    }
    
    .book-viewer {
        margin: 0 0.5rem;
        padding: 0.75rem;
    }
}

@media (max-width: 360px) {
    .book-page img {
        max-width: 120px;
    }
    
    .book-spread {
        gap: 0.25rem;
    }
}