/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent-color: #1a365d;
    --text-color: #2d3748;
    --text-light: #4a5568;
    --border-color: #e2e8f0;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.7;
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--accent-color);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

/* Header and Navigation */
header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

nav a:hover,
nav a.active {
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

/* Main Content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0 4rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.identity {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.description {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 700px;
    margin: 0 auto;
}

/* Intro Section */
.intro {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.book-card {
    border: 1px solid var(--border-color);
    padding: 2rem;
    background-color: var(--bg-color);
    transition: box-shadow 0.2s ease;
}

.book-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.book-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.book-description {
    margin-bottom: 1.25rem;
    color: var(--text-color);
    line-height: 1.6;
}

.book-level,
.book-status {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.book-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 2px;
    font-size: 0.95rem;
}

.book-link:hover {
    border-bottom-width: 2px;
}

.book-card.placeholder {
    opacity: 0.7;
}

.book-card.placeholder h2::before {
    content: "[Placeholder] ";
    font-size: 0.8em;
    color: var(--text-light);
}

/* Content Sections */
.content {
    max-width: 700px;
    margin: 0 auto;
}

.content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content h2:first-of-type {
    margin-top: 0;
}

/* Contact */
.contact-email {
    font-size: 1.1rem;
    margin: 1.5rem 0;
}

.contact-email a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 2px;
}

.contact-email a:hover {
    border-bottom-width: 2px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

    .hero h1 {
        font-size: 2.25rem;
    }

    .identity {
        font-size: 1.1rem;
    }

    .description {
        font-size: 1rem;
    }

    main {
        padding: 0 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .book-card {
        padding: 1.5rem;
    }

    .hero {
        padding: 2rem 0 3rem;
    }
}

/* Book Page Styles */
.breadcrumb {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.book-page {
    max-width: 900px;
    margin: 0 auto;
}

.book-meta {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.book-meta p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.book-page .book-description {
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.table-of-contents {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-left: 3px solid var(--accent-color);
}

.table-of-contents h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.placeholder-note {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.95rem;
}

/* PDF Section */
.pdf-section {
    margin-bottom: 3rem;
}

.pdf-section h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.pdf-container {
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    padding: 1rem;
    margin-bottom: 2rem;
}

.pdf-container iframe {
    border: none;
    width: 100%;
    min-height: 600px;
    display: block;
}

.fullscreen-button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fullscreen-button:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Download Section */
.download-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: var(--bg-light);
    border-top: 2px solid var(--accent-color);
}

.download-info {
    text-align: center;
}

.availability-note {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.download-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border: none;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.download-button:hover {
    background-color: #2c5282;
}

.download-count {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.download-count span {
    font-weight: 600;
    color: var(--text-color);
}

/* Support Section */
.support-section {
    margin-top: 4rem;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.support-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.support-section p {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.support-options {
    margin-top: 1.5rem;
}

.support-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background-color: transparent;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.support-button:hover {
    background-color: var(--accent-color);
    color: white;
}

.support-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    main {
        padding: 0 1rem;
    }

    .pdf-container {
        padding: 0.5rem;
    }

    .pdf-container iframe {
        min-height: 400px;
    }

    .download-section,
    .support-section {
        padding: 1.5rem;
    }
}

/* Mailing List Section */
.mailing-list-section {
    margin-top: 4rem;
    padding: 2.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.mailing-list-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.mailing-list-section > p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mailing-list-form {
    margin-top: 1.5rem;
}

.form-group {
    display: flex;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.form-group input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group button[type="submit"] {
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.form-group button[type="submit"]:hover:not(:disabled) {
    background-color: #2c5282;
}

.form-group button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.form-message.success {
    color: #22543d;
}

.form-message.error {
    color: #742a2a;
}

/* Download button disabled state */
.download-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .mailing-list-section {
        padding: 1.5rem;
    }

    .form-group {
        flex-direction: column;
    }

    .form-group input[type="email"],
    .form-group button[type="submit"] {
        width: 100%;
    }
}

