:root {
  --primary-color: #8B7355;
  --secondary-color: #D4A574;
  --accent-color: #C19A6B;
  --bg-color: #FAF7F2;
  --text-color: #3E2723;
  --card-bg: #FFFFFF;
  --border-color: #E0D5C7;
  --hover-color: #A0826D;
  --shadow: 0 2px 8px rgba(139, 115, 85, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  font-size: 16px;
}

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

header {
  background: var(--card-bg);
  border-bottom: 2px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: 1px;
  font-family: Georgia, serif;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: nowrap;
}

nav a {
  display: block;
  padding: 8px 16px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 15px;
}

nav a:hover {
  background: var(--secondary-color);
  color: var(--card-bg);
}

main {
  padding: 40px 0;
  min-height: 60vh;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--primary-color);
  line-height: 1.3;
  font-family: Georgia, serif;
}

h2 {
  font-size: 26px;
  font-weight: 600;
  margin: 32px 0 20px;
  color: var(--primary-color);
  border-left: 4px solid var(--accent-color);
  padding-left: 16px;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 20px 0 12px;
  color: var(--primary-color);
}

p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.intro-section {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.intro-section p {
  font-size: 17px;
  line-height: 1.9;
  color: var(--text-color);
}

section {
  margin-bottom: 48px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.2);
  border-color: var(--accent-color);
}

.video-card h3 {
  margin: 0 0 12px 0;
}

.video-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 19px;
  font-weight: 600;
}

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

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.video-meta span {
  padding: 4px 10px;
  background: var(--bg-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.video-desc {
  color: #555;
  font-size: 15px;
  line-height: 1.7;
  margin-top: 12px;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.video-list-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.video-list-item:hover {
  box-shadow: 0 4px 16px rgba(139, 115, 85, 0.2);
  border-color: var(--accent-color);
}

.video-detail {
  background: var(--card-bg);
  padding: 32px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.detail-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 14px;
}

.meta-value {
  color: var(--text-color);
  font-size: 15px;
}

.detail-section {
  margin: 32px 0;
}

.detail-section h2 {
  margin-top: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  padding: 6px 14px;
  background: var(--secondary-color);
  color: var(--card-bg);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.related-videos {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border-color);
}

footer {
  background: var(--primary-color);
  color: var(--bg-color);
  text-align: center;
  padding: 32px 0;
  margin-top: 64px;
}

footer p {
  margin: 8px 0;
  opacity: 0.9;
}

.rank-badge {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background: var(--accent-color);
  color: var(--card-bg);
  border-radius: 50%;
  font-weight: 700;
  margin-right: 12px;
  font-size: 16px;
}

.topic-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-color);
  color: var(--bg-color);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  margin-right: 12px;
}

.date-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .logo {
    font-size: 24px;
  }

  nav ul {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 4px;
  }

  nav a {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 22px;
  }

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

  .detail-meta {
    grid-template-columns: 1fr;
  }

  main {
    padding: 24px 0;
  }

  .intro-section {
    padding: 20px;
  }

  .video-detail {
    padding: 20px;
  }
}
