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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.5;
    min-height: 100vh;
    padding: 20px 40px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 20px;
}

header h1 {
    font-size: 2.2em;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 12px;
    margin-top: 0;
}

.subtitle {
    font-size: 1.1em;
    color: #555;
}

.input-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#topic-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    transition: border-color 0.3s;
}

#topic-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.generate-btn:hover {
    background-color: #1976D2;
}

.generate-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.loading-section {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
    min-height: 100px;
}

.loading-section p {
    margin: 0;
    animation: fadeIn 0.5s ease-in, pulse 2s ease-in-out 0.5s infinite;
}

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

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

.output-section {
    margin-bottom: 40px;
}

.handout-content {
    background-color: #ffffff;
    padding: 0;
    margin-bottom: 30px;
}

.content-box {
    background-color: #ffffff;
    color: #1a1a1a;
    padding: 0;
    margin-bottom: 30px;
    line-height: 1.5;
}

.content-box h2 {
    font-size: 1.6em;
    margin-bottom: 15px;
    margin-top: 0;
    color: #1a1a1a;
    font-weight: bold;
    text-align: center;
}

.content-box h3 {
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-weight: bold;
}

/* First section heading should have less top margin */
.content-box h3.section-heading:first-of-type {
    margin-top: 15px;
}

.content-box p {
    margin-bottom: 12px;
    color: #1a1a1a;
    line-height: 1.5;
}

.content-box strong {
    font-weight: bold;
    color: #1a1a1a;
}

.content-box .section-heading {
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 25px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.content-box .context-note {
    font-style: normal;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
}

.content-box .scripture-text {
    margin-bottom: 18px;
    color: #1a1a1a;
    line-height: 1.5;
    font-size: 1em;
}

/* Passage Reflection with green bar */
.content-box .question {
    margin-top: 15px;
    margin-bottom: 18px;
    margin-left: 0;
    padding-left: 12px;
    border-left: 4px solid #4CAF50;
    color: #1a1a1a;
    font-style: italic;
    line-height: 1.5;
}

.content-box .question strong {
    color: #1a1a1a;
    font-weight: bold;
    font-style: normal;
}

.content-box .reflection-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.content-box .reflection-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.content-box .reflection-section .question {
    margin-left: 0;
    padding-left: 12px;
    border-left: 4px solid #4CAF50;
    font-style: italic;
}

.content-box .closing-line {
    text-align: center;
    font-style: italic;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95em;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: #e8e8e8;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.85em;
    line-height: 1.5;
}

footer p {
    margin: 0;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .input-section,
    .action-buttons,
    footer {
        display: none;
    }
    
    .content-box {
        background: white;
        color: #1a1a1a;
        padding: 0;
        box-shadow: none;
    }
    
    .content-box h2,
    .content-box h3,
    .content-box strong,
    .content-box .question {
        color: #1a1a1a;
    }
    
    .content-box p,
    .content-box .scripture-text {
        color: #1a1a1a;
    }
    
    .content-box .question {
        border-left: 4px solid #4CAF50;
    }
}
