/* ===== 金句页面专属样式 ===== */

.quotes-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 头部 */
.quotes-header {
  text-align: center;
  margin-bottom: 2rem;
}

.quotes-header h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.quotes-subtitle {
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.quotes-stats {
  font-size: 0.9rem;
  color: var(--secondary);
  margin-top: 0.8rem;
}

/* 搜索框 */
.quotes-search {
  max-width: 400px;
  margin: 0 auto;
}

.quotes-search input {
  width: 100%;
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--border);
  border-radius: 25px;
  font-size: 1rem;
  background: var(--entry);
  color: var(--primary);
  outline: none;
  transition: border-color 0.3s;
}

.quotes-search input:focus {
  border-color: var(--tertiary);
}

/* 分类筛选标签 */
.quotes-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--entry);
  color: var(--primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--tertiary);
  color: var(--tertiary);
}

.filter-btn.active {
  background: var(--tertiary);
  color: #fff;
  border-color: var(--tertiary);
}

/* 分类区块 */
.quotes-section {
  margin-bottom: 2.5rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.8rem 1rem;
  background: var(--entry);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  user-select: none;
  transition: background 0.2s;
}

.section-title:hover {
  background: var(--code-bg);
}

.section-icon {
  font-size: 1.3rem;
}

.section-toggle {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--secondary);
  transition: transform 0.3s;
}

/* 折叠动画 */
.section-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  overflow: hidden;
  max-height: 5000px;
  transition: max-height 0.4s ease, opacity 0.3s;
  opacity: 1;
}

.section-body.collapsed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

/* 金句卡片 */
.quote-card {
  background: var(--entry);
  border: 1px solid var(--border);
  border-left: 4px solid var(--tertiary);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.quote-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-left-color: #667eea;
}

.dark .quote-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.quote-card blockquote {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--primary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.quote-card blockquote::before {
  content: none;
}

/* 复制成功反馈 */
.quote-card.copied {
  border-left-color: #28a745;
  background: rgba(40, 167, 69, 0.05);
}

.quote-card.copied::after {
  content: '✓ 已复制';
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  font-size: 0.75rem;
  color: #28a745;
  font-weight: 500;
  animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-5px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* 懒加载隐藏 */
.quote-card.quote-hidden {
  display: none;
}

/* 加载更多 */
.quotes-load-more {
  text-align: center;
  margin: 2rem 0;
}

.quotes-load-more button {
  padding: 0.8rem 2rem;
  border: 2px solid var(--tertiary);
  border-radius: 25px;
  background: transparent;
  color: var(--tertiary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
}

.quotes-load-more button:hover {
  background: var(--tertiary);
  color: #fff;
}

/* 页脚 */
.quotes-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.quotes-footer h3 {
  margin-bottom: 1rem;
}

.quotes-footer ul {
  padding-left: 1.5rem;
  line-height: 2;
}

.quotes-motto {
  text-align: center;
  margin-top: 2rem;
  color: var(--secondary);
}

/* 响应式 */
@media screen and (min-width: 600px) {
  .section-body {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 900px) {
  .section-body {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media screen and (max-width: 480px) {
  .quotes-filter {
    gap: 0.4rem;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .quote-card {
    padding: 1rem;
  }

  .quote-card blockquote {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
  }
}

/* 暗色模式微调 */
.dark .quote-card {
  border-left-color: #63b3ed;
}

.dark .filter-btn.active {
  background: #63b3ed;
  border-color: #63b3ed;
  color: #1a202c;
}

.dark .quotes-load-more button {
  border-color: #63b3ed;
  color: #63b3ed;
}

.dark .quotes-load-more button:hover {
  background: #63b3ed;
  color: #1a202c;
}
