/* 비밀번호 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.modal-content p {
    margin-bottom: 25px;
    color: #7f8c8d;
}

#password-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 8px;
}

#password-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: left;
    padding-left: 5px;
}

#password-submit {
    margin-top: 10px;
}

/* 기본 설정 및 폰트 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* 헤더 스타일 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1rem;
    color: #7f8c8d;
}

/* 메인 폼 스타일 */
main {
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.option-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.option {
    flex: 1;
    min-width: 200px;
}

select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 0.9rem;
}

select:focus {
    outline: none;
    border-color: #3498db;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

#submit-btn {
    width: 100%;
}

#new-question-btn {
    margin-top: 20px;
    width: 100%;
}

/* 결과 컨테이너 스타일 */
#result-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.hidden {
    display: none;
}

#answer-box, #references-box {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

h2 {
    font-size: 1.7rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

#answer-content {
    white-space: pre-line;
    line-height: 1.8;
}

/* 설교문 스타일링 */
.sermon-content {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.8;
    color: #333;
    padding: 10px 0;
}

.sermon-content p {
    margin-bottom: 1.2em;
    font-size: 1.05rem;
}

.sermon-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3em;
}

.sermon-subtitle {
    font-size: 1.4rem;
    color: #34495e;
    margin-top: 1.3em;
    margin-bottom: 0.7em;
    font-weight: 600;
}

.sermon-content strong {
    color: #2980b9;
    font-weight: 600;
}

.sermon-content em {
    font-style: italic;
    color: #16a085;
}

.sermon-content blockquote {
    border-left: 4px solid #3498db;
    padding: 0.8em 1.2em;
    margin: 1em 0;
    background-color: #ecf0f1;
    font-style: italic;
    color: #34495e;
}

/* 첫 번째 문단과 마지막 문단 스타일 */
.sermon-content p:first-child {
    font-size: 1.1rem;
    color: #34495e;
    font-weight: 500;
}

.sermon-content p:last-child {
    font-style: italic;
    margin-top: 1.5em;
    padding-top: 0.8em;
    border-top: 1px solid #eee;
}

#references-list {
    font-size: 0.9rem;
}

.reference-item {
    padding: 10px;
    margin-bottom: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

.reference-item:last-child {
    margin-bottom: 0;
}

.reference-verse {
    font-weight: 500;
    color: #2c3e50;
}

.reference-text {
    color: #7f8c8d;
    margin-top: 5px;
}

.similarity-score {
    display: inline-block;
    font-size: 0.8rem;
    color: #95a5a6;
    background-color: #e5e5e5;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* 로딩 UI 스타일 */
#loading-container {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 20px;
}

.loading-message {
    font-size: 1.1rem;
    color: #3498db;
    margin-bottom: 15px;
    font-weight: 500;
    content: "로딩 중...";
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #3498db;
    border-radius: 4px;
}

/* 푸터 스타일 */
footer {
    text-align: center;
    margin-top: 20px;
    color: #95a5a6;
    font-size: 0.8rem;
}

/* 반응형 디자인 */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .option-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .option {
        width: 100%;
        min-width: auto;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    button {
        padding: 10px 20px;
    }
}