/* 基本樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #f9f9f9;
}

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

/* Header */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 40px 0;
  margin-bottom: 40px;
}

header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

header h1 a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

header h1 a:hover {
  opacity: 0.9;
}

header p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  font-size: 16px;
}

nav {
  margin-top: 15px;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-right: 25px;
  padding: 8px 16px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  font-weight: 500;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

nav a.contact-btn {
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.6);
  font-weight: 600;
}

nav a.contact-btn:hover {
  background: #fff;
  color: #667eea;
  border-color: #fff;
  transform: translateY(-2px);
}

/* Main Content */
main {
  background-color: #fff;
  padding: 40px 30px;
  margin-bottom: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Post List */
.post-list {
  display: grid;
  gap: 30px;
}

.post-item {
  border-bottom: 1px solid #e1e1e1;
  padding-bottom: 30px;
}

.post-item:last-child {
  border-bottom: none;
}

.post-thumbnail img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.post-info h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.post-info h3 a {
  color: #333;
  text-decoration: none;
}

.post-info h3 a:hover {
  color: #0066cc;
}

.post-meta {
  color: #999;
  font-size: 14px;
  margin-bottom: 10px;
}

.post-excerpt {
  color: #666;
  margin-bottom: 15px;
}

.read-more {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

/* Post Content */
.post {
  max-width: 800px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 40px;
  background: #fff;
  padding: 0;
  box-shadow: none;
}

.post-title {
  font-size: 36px;
  line-height: 1.3;
  margin-bottom: 15px;
}

.post-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.post-content {
  font-size: 18px;
  line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 30px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.post-content h1 { font-size: 32px; }
.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 24px; }
.post-content h4 { font-size: 20px; }

.post-content p {
  margin-bottom: 20px;
}

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
}

.post-content ul,
.post-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content code {
  background-color: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: "Monaco", "Consolas", monospace;
  font-size: 0.9em;
}

.post-content pre {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
}

.post-content blockquote {
  border-left: 4px solid #0066cc;
  padding-left: 20px;
  margin: 20px 0;
  color: #666;
  font-style: italic;
}

/* Post Footer */
.post-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid #e1e1e1;
}

.post-tags {
  margin-bottom: 20px;
}

.post-tags .tag {
  display: inline-block;
  background-color: #f0f0f0;
  padding: 5px 12px;
  border-radius: 15px;
  color: #666;
  text-decoration: none;
  margin-right: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.post-tags .tag:hover {
  background-color: #0066cc;
  color: #fff;
}

.post-share {
  margin-top: 20px;
}

.post-share p {
  margin-bottom: 10px;
  font-weight: 500;
}

.post-share a {
  display: inline-block;
  margin-right: 15px;
  color: #0066cc;
  text-decoration: none;
}

.post-share a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 14px;
}

footer a {
  color: #0066cc;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Pagination */
.pagination {
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e1e1e1;
}

.pagination a {
  color: #0066cc;
  text-decoration: none;
  margin: 0 15px;
}

.pagination a:hover {
  text-decoration: underline;
}

.pagination .page-number {
  color: #666;
  margin: 0 15px;
}

/* Homepage Sections */
.home h1 {
  font-size: 32px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.4;
}

.home h2 {
  font-size: 26px;
  color: #333;
  margin: 50px 0 25px 0;
  padding-bottom: 10px;
  border-bottom: 3px solid #667eea;
}

/* Site Intro (TL;DR) */
.site-intro {
  background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
  border-left: 4px solid #667eea;
  padding: 25px 30px;
  margin: 30px 0;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1.8;
}

.site-intro p {
  margin: 0;
}

/* Topic Clusters */
.topic-clusters {
  margin: 50px 0;
}

.clusters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.cluster-item {
  background: #fff;
  border: 2px solid #e1e1e1;
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s ease;
}

.cluster-item:hover {
  border-color: #667eea;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
  transform: translateY(-5px);
}

.cluster-item h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 12px;
  font-weight: 600;
}

.cluster-item p {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* FAQ Section */
.faq-section {
  margin: 50px 0;
  background: #f9f9f9;
  padding: 40px 30px;
  border-radius: 12px;
}

.faq-item {
  background: #fff;
  padding: 25px;
  margin-bottom: 15px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateX(5px);
}

.faq-item h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 12px;
  font-weight: 600;
}

.faq-item p {
  color: #666;
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

/* Author Section */
.author-section {
  margin: 50px 0 30px 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 40px 35px;
  border-radius: 12px;
  color: #fff;
}

.author-section h2 {
  color: #fff;
  border-bottom: 3px solid rgba(255, 255, 255, 0.3);
  margin-top: 0;
}

.author-bio p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 15px;
}

.author-bio a {
  color: #fff;
  text-decoration: underline;
  font-weight: 500;
}

.author-bio a:hover {
  opacity: 0.8;
}

/* Recent Posts Section */
.recent-posts {
  margin: 50px 0;
}

/* FAQ Quick Section (Homepage) */
.faq-quick {
  margin: 50px 0;
  padding: 40px 30px;
  background: #f9f9f9;
  border-radius: 12px;
}

.faq-quick h2 {
  margin-top: 0;
}

.faq-summary {
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.faq-quick-item {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.faq-quick-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.faq-quick-item h3 {
  font-size: 17px;
  color: #333;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.faq-quick-item p {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.faq-more {
  text-align: center;
  margin-top: 30px;
}

.btn-faq {
  display: inline-block;
  padding: 15px 35px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-faq:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* FAQ Page */
.faq-page {
  max-width: 900px;
  margin: 0 auto;
}

.faq-page h1 {
  font-size: 36px;
  margin-bottom: 20px;
}

.faq-intro {
  font-size: 17px;
  color: #666;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e1e1e1;
}

.faq-category {
  margin: 50px 0;
}

.faq-category h2 {
  font-size: 28px;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 10px;
  border-bottom: 3px solid #667eea;
}

.faq-page .faq-item {
  background: #fff;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
  border-left: 4px solid #667eea;
}

.faq-page .faq-item h3 {
  font-size: 20px;
  color: #333;
  margin: 0 0 15px 0;
  font-weight: 600;
}

.faq-page .faq-item p {
  color: #666;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 15px;
}

.faq-page .faq-item p:last-child {
  margin-bottom: 0;
}

.faq-page .faq-item ul,
.faq-page .faq-item ol {
  margin: 15px 0;
  padding-left: 25px;
}

.faq-page .faq-item li {
  color: #666;
  margin-bottom: 8px;
  line-height: 1.7;
}

.faq-page .faq-item strong {
  color: #333;
}

.faq-footer {
  text-align: center;
  margin: 50px 0;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 8px;
}

.faq-footer p {
  font-size: 16px;
  margin-bottom: 15px;
}

.faq-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.faq-footer a:hover {
  text-decoration: underline;
}

.back-home {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background: #667eea;
  color: #fff !important;
  border-radius: 5px;
  text-decoration: none !important;
}

.back-home:hover {
  background: #764ba2;
  text-decoration: none !important;
}

/* View All Posts Button */
.view-all-posts {
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e1e1e1;
}

.btn-view-all {
  display: inline-block;
  padding: 15px 35px;
  background: #fff;
  color: #667eea;
  text-decoration: none;
  border: 2px solid #667eea;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.btn-view-all:hover {
  background: #667eea;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Archive Page */
.archive-page {
  max-width: 900px;
  margin: 0 auto;
}

.archive-page h1 {
  font-size: 36px;
  margin-bottom: 10px;
}

.archive-intro {
  font-size: 16px;
  color: #999;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e1e1e1;
}

.archive-list {
  margin: 30px 0;
}

.archive-item {
  display: flex;
  gap: 25px;
  padding: 25px 0;
  border-bottom: 1px solid #e1e1e1;
  transition: all 0.3s ease;
}

.archive-item:hover {
  padding-left: 10px;
  background: #f9f9f9;
}

.archive-date {
  flex-shrink: 0;
  width: 110px;
}

.archive-date time {
  display: inline-block;
  font-size: 14px;
  color: #999;
  font-family: monospace;
}

.archive-content {
  flex: 1;
}

.archive-content h3 {
  font-size: 20px;
  margin: 0 0 10px 0;
}

.archive-content h3 a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.archive-content h3 a:hover {
  color: #667eea;
}

.archive-excerpt {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.archive-footer {
  text-align: center;
  margin: 50px 0;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 24px;
  }

  .home h1 {
    font-size: 24px;
  }

  .home h2 {
    font-size: 22px;
  }

  .post-title {
    font-size: 28px;
  }

  .post-content {
    font-size: 16px;
  }

  main {
    padding: 20px 15px;
  }

  .clusters-grid {
    grid-template-columns: 1fr;
  }

  .site-intro {
    padding: 20px;
    font-size: 15px;
  }

  .faq-section {
    padding: 25px 20px;
  }

  .author-section {
    padding: 30px 20px;
  }

  .faq-quick {
    padding: 25px 20px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-page h1 {
    font-size: 28px;
  }

  .faq-category h2 {
    font-size: 24px;
  }

  .faq-page .faq-item {
    padding: 20px;
  }

  .archive-page h1 {
    font-size: 28px;
  }

  .archive-item {
    flex-direction: column;
    gap: 10px;
  }

  .archive-date {
    width: auto;
  }
}
