/* UI Style: 雅致棕 */
:root {
  --primary-color: #8B6F47;
  --secondary-color: #A0826D;
  --accent-color: #C9A882;
  --text-color: #333;
  --text-light: #666;
  --bg-color: #f5f5f5;
  --white: #fff;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
}

body {
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 20px 0;
}

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

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-color);
  margin-bottom: 15px;
}

h1 { font-size: 2em; line-height: 1.2; }
h2 { font-size: 1.5em; line-height: 1.3; }
h3 { font-size: 1.25em; line-height: 1.4; }

a {
  color: var(--primary-color);
  transition: color 0.3s;
}

a:hover {
  color: var(--secondary-color);
}

/* Page title */
.page-title {
  text-align: center;
  margin: 30px 0;
  color: var(--primary-color);
  font-size: 2.2em;
}

/* Intro section */
.intro-section, .intro {
  background: var(--white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  line-height: 1.8;
}

.intro a {
  text-decoration: underline;
}

.topic-intro-long p {
  margin-bottom: 15px;
}

/* Section titles */
.section-title {
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent-color);
  color: var(--primary-color);
}

/* Video grid (home page hot section) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.video-card {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.video-card h3 {
  margin-bottom: 10px;
}

.video-card h3 a {
  text-decoration: none;
  color: var(--text-color);
}

.video-card h3 a:hover {
  color: var(--primary-color);
}

.meta {
  color: var(--text-light);
  font-size: 0.9em;
  margin: 8px 0;
}

.desc, .brief {
  color: var(--text-color);
  line-height: 1.6;
  margin-top: 10px;
}

/* Link cards */
.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.link-card {
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
  padding: 30px;
  border-radius: 8px;
  color: var(--white);
  transition: transform 0.3s;
}

.link-card:hover {
  transform: scale(1.05);
}

.link-card h3 a {
  color: var(--white);
  text-decoration: none;
  font-size: 1.3em;
}

.link-card p {
  margin-top: 10px;
  opacity: 0.95;
}

/* Video list (simple list) */
.video-list {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.video-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.video-item h4 a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1em;
}

.video-item h4 a:hover {
  color: var(--primary-color);
}

.more-link {
  text-align: center;
  margin-top: 20px;
}

.more-link a {
  font-size: 1.1em;
  text-decoration: none;
}

/* List pages */
.list-item {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.list-item h3 {
  margin-bottom: 10px;
}

.list-item h3 a {
  text-decoration: none;
  color: var(--text-color);
}

.list-item h3 a:hover {
  color: var(--primary-color);
}

/* Year groups */
.year-group {
  margin-bottom: 50px;
}

.year-title {
  background: var(--primary-color);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.year-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Top list */
.top-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top-item {
  display: flex;
  gap: 20px;
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.rank-num {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  border-radius: 8px;
}

.top-content {
  flex: 1;
}

.top-content h3 {
  margin-bottom: 8px;
}

.top-content h3 a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.2em;
}

.top-content h3 a:hover {
  color: var(--primary-color);
}

.tags {
  color: var(--text-light);
  font-size: 0.85em;
  margin: 5px 0;
}

.recommend {
  margin-top: 10px;
  line-height: 1.7;
  color: var(--text-color);
}

/* Topic list */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.topic-item {
  background: var(--white);
  padding: 25px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.topic-item h3 {
  margin-bottom: 10px;
}

.topic-item h3 a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.2em;
}

.topic-item h3 a:hover {
  color: var(--primary-color);
}

.topic-intro {
  line-height: 1.8;
  margin-top: 12px;
}

/* Latest list */
.latest-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.latest-item {
  display: flex;
  gap: 20px;
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  align-items: flex-start;
}

.date-badge {
  flex-shrink: 0;
  background: var(--accent-color);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: bold;
  white-space: nowrap;
}

.latest-content {
  flex: 1;
}

.latest-content h3 {
  margin-bottom: 8px;
}

.latest-content h3 a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 1.1em;
}

.latest-content h3 a:hover {
  color: var(--primary-color);
}

/* Detail page */
.detail-article {
  background: var(--white);
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.detail-title {
  color: var(--primary-color);
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--accent-color);
}

.info-section, .oneline-section, .summary-section, .related-section {
  margin-bottom: 35px;
}

.info-section h2, .oneline-section h2, .summary-section h2, .related-section h2 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.info-list {
  list-style: none;
  line-height: 2;
}

.info-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-list li:last-child {
  border-bottom: none;
}

.oneline {
  font-size: 1.1em;
  color: var(--primary-color);
  font-weight: 500;
  line-height: 1.8;
  padding: 15px;
  background: #faf8f5;
  border-left: 4px solid var(--accent-color);
  border-radius: 4px;
}

.summary {
  line-height: 2;
  text-align: justify;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.related-item {
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.related-item:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow);
}

.related-item h4 a {
  text-decoration: none;
  color: var(--text-color);
}

.related-item h4 a:hover {
  color: var(--primary-color);
}

.related-item .desc {
  font-size: 0.9em;
  color: var(--text-light);
  margin-top: 8px;
}

/* Footer */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent-color);
}

.copyright {
  color: #aaa;
  font-size: 0.9em;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  transition: background 0.3s, transform 0.3s;
  z-index: 99;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.back-to-top.show {
  display: flex;
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 1.6em;
  }

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

  .link-cards {
    grid-template-columns: 1fr;
  }

  .top-item {
    flex-direction: row;
  }

  .rank-num {
    width: 40px;
    height: 40px;
    font-size: 1.2em;
  }

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

  .date-badge {
    align-self: flex-start;
  }

  .detail-article {
    padding: 20px;
  }

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

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5em; }
  h2 { font-size: 1.3em; }

  .section-title {
    font-size: 1.3em;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}
