:root {
  /* 浅色主题 */
  --color-text: #2d3748;
  --color-bg: #ffffff;
  --color-primary: #4a5568;
  --color-border: #e2e8f0;
  --color-hover: #f7fafc;
}

[data-theme="dark"] {
  /* 深色主题 */
  --color-text: #e2e8f0;
  --color-bg: #1a202c;
  --color-primary: #cbd5e0;
  --color-border: #4a5568;
  --color-hover: #2d3748;
}

/* 基础排版 */
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  transition: background 0.3s ease;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 头部样式 */
.app-header {
  background: var(--color-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.breadcrumb {
  padding: 1rem 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.breadcrumb a {
  text-decoration: none;
  color: var(--color-primary);
  font-weight: bold;
}
.theme-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.icon {
  width: 24px;
  height: 24px;
  fill: var(--color-primary);
}

/* 章节内容 */
.chapter-title {
  font-size: 2rem;
  margin: 2rem 0;
  font-weight: 600;
  text-align: center;
}

.verse {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.verse:hover {
  background: var(--color-hover);
}

.verse-num {
  font-size: 0.875rem;
  color: var(--color-primary);
  text-align: right;
  padding-top: 0.25rem;
}

.verse-text {
  margin: 0;
  font-size: 1.125rem;
}

/* 导航按钮 */
.chapter-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 3rem 0;
}

.nav-btn {
  padding: 1rem;
  text-align: center;
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-primary);
  transition: all 0.2s ease;
}

.nav-btn:hover:not([disabled]) {
  background: var(--color-primary);
  color: var(--color-bg);
}

[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 640px) {
  .chapter-title {
    font-size: 1.5rem;
  }

  .verse {
    grid-template-columns: 30px 1fr;
    gap: 0.5rem;
  }

  .verse-text {
    font-size: 1rem;
  }

  .chapter-nav {
    grid-template-columns: 1fr;
  }
}

/* 打印优化 */
@media print {
  .app-header,
  .chapter-nav,
  .app-footer {
    display: none;
  }

  .verse {
    page-break-inside: avoid;
  }
}

/* 书单页面特定样式 */
.book-list-container {
  padding: 2rem 0;
}

.page-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--color-primary);
}

.books-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.book-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.book-card:hover {
  transform: translateY(-3px);
}

.book-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.chapters-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
}

.chapter-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 4px;
  background: var(--color-hover);
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.chapter-link:hover {
  background: var(--color-primary);
  color: var(--color-bg);
}
.copyright {
  text-align: center;
}

@media (max-width: 768px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .book-card {
    padding: 1rem;
  }
}

.verse-card {
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 90%;
  text-align: center;
  transition: transform 0.3s ease;
  margin: 0 auto 2rem;
  display: none;
}

.verse-card:hover {
  transform: translateY(-5px);
}

.verse-text {
  font-size: 1.5rem;
  line-height: 1.6;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  quotes: "“" "”" "‘" "’";
}

.verse-text::before {
  content: open-quote;
  font-size: 2.5rem;
  color: var(--color-primary);
  vertical-align: -0.4em;
}

.verse-text::after {
  content: close-quote;
  font-size: 2.5rem;
  color: var(--color-primary);
  vertical-align: -0.4em;
}

.verse-reference {
  font-style: italic;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.loading {
  font-size: 1.2rem;
  color: var(--color-primary);
  animation: pulse 1.5s infinite;
}

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