/* ---
// ===============================================
//   AI BOOK GENERATOR STYLES
// ===============================================
// --- */

/* NEW: Reset default fieldset styles */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.ai-hero-section {
    min-height: 40vh; /* Shorter hero for this page */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-color); /* No background image */
}

.ai-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.ai-hero-content p {
    font-size: 1.25rem;
    color: var(--text-color-secondary);
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.ai-generator-form {
    max-width: 700px;
    margin: -5rem auto 4rem auto; /* Pulls up over the hero edge */
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.form-step {
    margin-bottom: 2rem;
}

.form-step h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color-secondary);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-color); /* Darker input */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-main);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.genre-tag {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.genre-tag:hover {
    background: #333;
}

.genre-tag.selected {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 600;
}

/* --- Loading / Reveal Styles --- */

.loading-container {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 3rem 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    font-size: 1.1rem;
    color: var(--text-color-secondary);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}


.reveal-section {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 2rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.reveal-section h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.reveal-section p {
    font-size: 1.1rem;
    color: var(--text-color-secondary);
    margin-bottom: 1.5rem;
}

.reveal-book-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.reveal-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #333;
}