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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.info-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.search-container {
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.chapters-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .chapters-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.chapter-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.chapter-card:hover {
    border-color: #e53e3e
}

.chapter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.sections-count {
    color: #718096;
    font-size: 0.9rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.sections-list {
    padding: 16px;
}

.section-item {
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fafc;
    border-left: 4px solid #667eea;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.section-number {
    background: #667eea;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.section-text {
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 15px;
    text-align: justify;
}

.references {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.references-title {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.reference-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reference-item {
    background: #edf2f7;
    color: #4a5568;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.reference-item:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.loading {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 50px 20px;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    color: white;
    padding: 50px 20px;
    font-size: 1.1rem;
}

.highlight {
    background: #fef08a;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 聖經引用樣式 */
.bible-ref {
    color: #e53e3e;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.3s ease;
}

.bible-ref:hover {
    color: #c53030;
    background: rgba(229, 62, 62, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

/* 聖經經文彈窗 */
.bible-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    padding: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
}

.bible-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.bible-modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.bible-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bible-modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.bible-content {
    line-height: 1.8;
    color: #2d3748;
    font-size: 1rem;
}

.bible-loading {
    text-align: center;
    color: #718096;
    padding: 20px;
}

.bible-error {
    color: #e53e3e;
    text-align: center;
    padding: 20px;
}

/* Intro Modal 樣式 */
.intro-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
}

.intro-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.intro-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.intro-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.intro-modal-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

.intro-content {
    padding: 30px;
    line-height: 1.8;
    color: #2d3748;
}

.intro-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.intro-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.intro-content li {
    margin-bottom: 10px;
    text-align: justify;
}