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

:root {
    --primary-color: #0f172a;
    --secondary-color: #ffffff;
    --accent-color: #3b82f6;
    --accent-secondary: #8b5cf6;
    --amazon-color: #ff9500;
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --surface: #ffffff;
    --surface-elevated: #f8fafc;
    --border-color: #e2e8f0;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-color);
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    background: var(--gradient-primary);
    color: var(--secondary-color);
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::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"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="white" opacity="0.1"/><circle cx="75" cy="25" r="0.3" fill="white" opacity="0.1"/><circle cx="50" cy="50" r="0.4" fill="white" opacity="0.1"/><circle cx="25" cy="75" r="0.2" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="0.6" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

header h1 {
    font-family: 'Crimson Text', serif;
    margin: 0 0 1rem 0;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

header p {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

main {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

section {
    margin-bottom: 4rem;
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

section:hover::before {
    transform: scaleX(1);
}

h2 {
    font-family: 'Crimson Text', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 2rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

#series-intro {
    background: var(--gradient-primary);
    color: var(--secondary-color);
    text-align: center;
    border: none;
}

#series-intro h2 {
    color: var(--secondary-color);
}

#series-intro p {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
}

.book {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.book:hover {
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.book:last-child {
    margin-bottom: 0;
}

.book img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.book img:hover {
    transform: scale(1.03) rotate(1deg);
    box-shadow: var(--shadow-xl);
}

.book-info h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    line-height: 1.3;
}

.monster-theme {
    display: inline-block;
    background: var(--gradient-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.description {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.7;
}

.description p {
    margin-bottom: 1.2rem;
}

.description p:last-child {
    margin-bottom: 0;
}

.links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    background: var(--accent-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

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

.btn.amazon:hover {
    background: #e8860a;
}

.support-author {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

#author {
    background: var(--surface-elevated);
}

#author p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

#author p:last-child {
    margin-bottom: 0;
}

footer {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--primary-color);
    color: var(--secondary-color);
    margin-top: 4rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 968px) {
    main {
        padding: 3rem 1.5rem;
    }
    
    section {
        padding: 2rem;
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 3rem 1.5rem 2rem;
    }
    
    main {
        padding: 2rem 1rem;
    }

    .book {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 1.5rem;
    }

    .book img {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .links {
        justify-content: center;
    }
    
    section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 2rem 1rem;
    }
    
    main {
        padding: 1.5rem 1rem;
    }
    
    section {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Focus styles for accessibility */
.btn:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Selection styling */
::selection {
    background: var(--accent-color);
    color: var(--secondary-color);
}

/* Legal pages styling */
.contact-info, .legal-info, .privacy-section, .disclaimer-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-elevated);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
}

.contact-info h3, .legal-info h3, .privacy-section h3, .disclaimer-section h3 {
    font-family: 'Crimson Text', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
}

.contact-info h4, .legal-info h4, .privacy-section h4, .disclaimer-section h4 {
    font-weight: 600;
    color: var(--text-color);
    margin: 1rem 0 0.5rem 0;
}

.privacy-section ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.privacy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.navigation-links {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface-elevated);
    border-radius: var(--radius-lg);
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Author section with image */
.author-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.author-image-container {
    display: flex;
    justify-content: center;
    position: relative;
}

.author-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    box-shadow: 
        0 0 0 4px var(--surface),
        0 0 0 8px var(--accent-color),
        var(--shadow-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid var(--surface);
}

.author-image-container::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.author-image-container:hover::before {
    opacity: 0.2;
}

.author-image:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 0 4px var(--surface),
        0 0 0 8px var(--accent-secondary),
        0 25px 35px -5px rgb(0 0 0 / 0.2), 
        0 10px 15px -8px rgb(0 0 0 / 0.2);
}

.author-text p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.author-text p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for author section */
@media (max-width: 768px) {
    .author-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .author-image {
        width: 150px;
        height: 150px;
    }
    
    .author-text {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .author-image {
        width: 120px;
        height: 120px;
    }
}

/* Coming Soon book styling */
.book.upcoming {
    position: relative;
    background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 1%, #f8fafc 1%, #f8fafc 100%);
    border: 2px solid #f59e0b;
}

.book.upcoming::before {
    content: '✨ COMING SOON';
    position: absolute;
    top: -10px;
    right: 2rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.monster-hate {
    background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
}

.coming-soon {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.release-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid #f59e0b;
    box-shadow: var(--shadow-sm);
}

.release-info h4 {
    font-family: 'Crimson Text', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #92400e;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.release-info p {
    color: #78350f;
    margin: 0;
    font-weight: 500;
}

.preview-note {
    background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 100%);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
    text-align: center;
}

.preview-note p {
    color: #1e40af;
    margin: 0;
    font-weight: 500;
    font-style: italic;
}

/* Upcoming book image effect */
.book.upcoming img {
    filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.3));
}

.book.upcoming img:hover {
    filter: drop-shadow(0 0 25px rgba(245, 158, 11, 0.5));
    transform: scale(1.03) rotate(0deg);
}

/* Responsive adjustments for upcoming book */
@media (max-width: 768px) {
    .book.upcoming::before {
        top: -8px;
        right: 1rem;
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
} 

/* Toggle button for descriptions */
.toggle-desc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
    background: var(--accent-secondary);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.toggle-desc:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.toggle-desc:active {
    transform: translateY(0);
}