/* 基础样式 */
:root {
    --primary-color: #3a5a78;
    --secondary-color: #5d8aa8;
    --accent-color: #94b8d2;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --sidebar-width: 280px;
    --header-height: 60px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
    --font-size-base: 16px;
    --font-family-base: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* 深色主题 */
[data-theme="dark"] {
    --primary-color: #2c4761;
    --secondary-color: #4a6d8a;
    --accent-color: #6b8ba8;
    --background-color: #222;
    --text-color: #eee;
    --border-color: #444;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary-color);
    color: white;
    overflow-y: auto;
    transition: transform var(--transition-speed);
    box-shadow: var(--box-shadow);
    z-index: 100;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-content {
    padding: 1rem;
}

.search-container {
    display: flex;
    margin-bottom: 1rem;
}

.search-container input {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.search-container button {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-container button:hover {
    background-color: var(--accent-color);
}

.table-of-contents {
    margin-top: 1rem;
}

.toc-section {
    margin-bottom: 1rem;
}

.toc-section-title {
    font-weight: 600;
    padding: 0.5rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toc-section-title:hover {
    color: var(--accent-color);
}

.toc-subsection {
    padding-left: 1.5rem;
    margin: 0.25rem 0;
}

.toc-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.toc-link:hover {
    color: white;
}

.toc-link.active {
    color: white;
    font-weight: 600;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
}

.main-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-color);
    z-index: 10;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 1rem;
}

.main-header h1 {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
}

.header-actions button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

.header-actions button:hover {
    color: var(--primary-color);
}

.content-container {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* 欢迎信息 */
.welcome-message {
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
}

.welcome-message h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.welcome-message p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.scripture-quote {
    margin: 2rem 0;
    padding: 2rem;
    background-color: rgba(148, 184, 210, 0.1);
    border-radius: 8px;
}

.scripture-quote blockquote {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.scripture-quote cite {
    display: block;
    text-align: right;
    font-size: 1rem;
}

/* 笔记内容样式 */
.note-content {
    max-width: 800px;
    margin: 0 auto;
}

.note-content h2 {
    margin: 2rem 0 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.note-content h3 {
    margin: 1.5rem 0 0.8rem;
    color: var(--primary-color);
}

.note-content h4 {
    margin: 1.2rem 0 0.6rem;
    color: var(--secondary-color);
}

.note-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.note-content ul, .note-content ol {
    margin: 1rem 0 1rem 2rem;
}

.note-content li {
    margin-bottom: 0.5rem;
}

.note-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--accent-color);
    background-color: rgba(148, 184, 210, 0.1);
    font-style: italic;
}

.note-content .bible-verse {
    font-weight: 600;
    margin: 1.5rem 0;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .menu-btn {
        display: block;
    }
    
    .close-btn {
        display: block;
    }
    
    .main-header h1 {
        font-size: 1.25rem;
    }
    
    .content-container {
        padding: 1rem;
    }
    
    .note-content {
        padding: 0 0.5rem;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 30px;
    color: var(--secondary-color);
    font-style: italic;
}

/* 打印样式 */
@media print {
    .sidebar, .main-header {
        display: none;
    }
    
    .app-container {
        display: block;
        height: auto;
    }
    
    .main-content {
        overflow: visible;
    }
    
    .content-container {
        overflow: visible;
        padding: 0;
    }
    
    .note-content {
        max-width: 100%;
    }
}

/* 错误信息样式 */
.error {
    color: #e74c3c;
    text-align: center;
    padding: 10px;
    font-weight: bold;
}

.error-message {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    border-left: 4px solid #e74c3c;
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message p, .error-message ol, .error-message ul {
    margin-bottom: 15px;
    line-height: 1.6;
}

.error-message code {
    background-color: #f1f1f1;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.error-message ol {
    padding-left: 25px;
}

.error-message ul {
    padding-left: 20px;
    list-style-type: circle;
}

.error-message li {
    margin-bottom: 8px;
}

/* 文件上传样式 */
.file-upload {
    margin: 15px 0;
    padding: 15px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.file-upload label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.file-upload input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

/* 成功消息样式 */
.success-message {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: #f8f8f8;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    border-left: 4px solid #2ecc71;
}

.success-message h2 {
    color: #2ecc71;
    margin-bottom: 20px;
}

/* 动作按钮样式 */
.action-buttons {
    margin-top: 25px;
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

.action-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: var(--secondary-color);
}

.action-btn i {
    margin-right: 8px;
}

/* 深色主题下的样式调整 */
[data-theme="dark"] .error-message {
    background-color: #2a2a2a;
    border-left-color: #e74c3c;
}

[data-theme="dark"] .error-message code {
    background-color: #333;
}

[data-theme="dark"] .file-upload {
    background-color: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .file-upload input[type="file"] {
    background-color: #333;
    border-color: #555;
    color: #eee;
}

[data-theme="dark"] .success-message {
    background-color: #2a2a2a;
    border-left-color: #2ecc71;
} 