/* UI Style: 现代金调 (Index 13) - Layout Variant: E */

:root {
  --color-primary: #d4af37;
  --color-primary-dark: #b8941f;
  --color-secondary: #2c2416;
  --color-bg: #faf8f3;
  --color-text: #2c2416;
  --color-text-light: #6b5d47;
  --color-border: #e8dfc8;
  --color-card-bg: #ffffff;
  --color-hover: #f5efd9;
  --spacing-unit: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 2);
}

/* Header & Navigation */
header {
  background-color: var(--color-card-bg);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 2);
  flex-wrap: wrap;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  gap: calc(var(--spacing-unit) * 2);
  flex-wrap: nowrap;
}

nav ul li {
  white-space: nowrap;
}

nav ul li a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 15px;
  padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav ul li a:hover {
  background-color: var(--color-hover);
  color: var(--color-primary-dark);
}

/* Main Content */
main {
  min-height: 60vh;
  padding: calc(var(--spacing-unit) * 4) 0;
}

h1 {
  font-size: 28px;
  color: var(--color-secondary);
  margin-bottom: calc(var(--spacing-unit) * 3);
  line-height: 1.3;
  font-weight: 700;
}

h2 {
  font-size: 22px;
  color: var(--color-secondary);
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-weight: 600;
  border-left: 4px solid var(--color-primary);
  padding-left: calc(var(--spacing-unit) * 2);
}

section {
  margin-bottom: calc(var(--spacing-unit) * 6);
}

.intro-text {
  background-color: var(--color-card-bg);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-bottom: calc(var(--spacing-unit) * 4);
  line-height: 1.8;
  color: var(--color-text);
}

/* Video Cards */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: calc(var(--spacing-unit) * 3);
}

.video-card {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: calc(var(--spacing-unit) * 3);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.15);
  border-color: var(--color-primary);
}

.video-card h3 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: var(--color-secondary);
  font-weight: 600;
}

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

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

.video-meta {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 2);
  font-size: 13px;
  color: var(--color-text-light);
  flex-wrap: wrap;
}

.video-meta span {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--spacing-unit) * 0.5);
}

.video-desc {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.video-tags {
  display: flex;
  gap: calc(var(--spacing-unit) * 1);
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  background-color: var(--color-hover);
  color: var(--color-primary-dark);
  padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.5);
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid var(--color-border);
}

/* List Pages */
.video-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 2);
}

.video-list-item {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: calc(var(--spacing-unit) * 3);
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.video-list-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.list-rank {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  background-color: var(--color-primary);
  color: white;
  border-radius: 4px;
  font-weight: 700;
  margin-right: calc(var(--spacing-unit) * 2);
  font-size: 14px;
}

.group-title {
  font-size: 18px;
  color: var(--color-primary-dark);
  margin-bottom: calc(var(--spacing-unit) * 1);
  font-weight: 600;
  padding: calc(var(--spacing-unit) * 1) 0;
  border-bottom: 2px solid var(--color-border);
}

/* Detail Page */
.detail-header {
  background: linear-gradient(135deg, var(--color-card-bg) 0%, var(--color-hover) 100%);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 4);
  border: 1px solid var(--color-border);
}

.detail-title {
  font-size: 32px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--color-secondary);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.meta-item {
  display: flex;
  gap: calc(var(--spacing-unit) * 1);
}

.meta-label {
  font-weight: 600;
  color: var(--color-primary-dark);
  min-width: 60px;
}

.meta-value {
  color: var(--color-text);
}

.detail-section {
  background-color: var(--color-card-bg);
  padding: calc(var(--spacing-unit) * 3);
  border-radius: 8px;
  margin-bottom: calc(var(--spacing-unit) * 3);
  border: 1px solid var(--color-border);
}

.detail-section h2 {
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.detail-section p {
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
}

.related-item {
  padding: calc(var(--spacing-unit) * 2);
  background-color: var(--color-hover);
  border-radius: 6px;
  border: 1px solid var(--color-border);
  transition: all 0.3s;
}

.related-item:hover {
  background-color: var(--color-card-bg);
  border-color: var(--color-primary);
  transform: translateX(4px);
}

.related-item h4 {
  font-size: 16px;
  margin-bottom: calc(var(--spacing-unit) * 1);
  color: var(--color-secondary);
}

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

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

.related-item p {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0;
}

/* Footer */
footer {
  background-color: var(--color-secondary);
  color: var(--color-hover);
  padding: calc(var(--spacing-unit) * 4) 0;
  margin-top: calc(var(--spacing-unit) * 8);
  text-align: center;
}

footer p {
  font-size: 14px;
  line-height: 1.8;
}

/* Responsive - Mobile Single Row Navigation */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: calc(var(--spacing-unit) * 2);
    padding: calc(var(--spacing-unit) * 2);
  }

  .logo {
    font-size: 20px;
  }

  nav {
    width: 100%;
  }

  nav ul {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    overflow: visible;
  }

  nav ul li {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  nav ul li a {
    display: block;
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 0.5);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }

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

  .detail-title {
    font-size: 24px;
  }

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

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

@media (max-width: 480px) {
  nav ul li a {
    font-size: 12px;
    padding: calc(var(--spacing-unit) * 0.75) calc(var(--spacing-unit) * 0.25);
  }

  .container {
    padding: 0 calc(var(--spacing-unit) * 1.5);
  }
}
