:root {
  --primary-color: #2c5282;
  --secondary-color: #4a90e2;
  --accent-color: #e67e22;
  --text-color: #2d3748;
  --bg-color: #f7fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --hover-color: #edf2f7;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --spacing: 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;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

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

header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

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

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
  white-space: nowrap;
}

nav a:hover {
  opacity: 0.8;
}

main {
  min-height: calc(100vh - 200px);
  padding: calc(var(--spacing) * 4) 0;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: calc(var(--spacing) * 3);
  color: var(--primary-color);
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--primary-color);
  line-height: 1.2;
}

h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--text-color);
}

p {
  margin-bottom: calc(var(--spacing) * 2);
  line-height: 1.8;
}

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

.intro-section {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 4);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  margin-bottom: calc(var(--spacing) * 6);
}

.intro-section p {
  font-size: 16px;
  line-height: 1.8;
}

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

.video-card {
  background: var(--card-bg);
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 3);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border-color);
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-card h3 {
  font-size: 18px;
  margin-bottom: calc(var(--spacing) * 2);
  color: var(--primary-color);
}

.video-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

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

.video-meta {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 2);
  font-size: 14px;
  color: #718096;
}

.video-meta span {
  display: inline-flex;
  align-items: center;
}

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

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

.tag {
  display: inline-block;
  padding: calc(var(--spacing) / 2) calc(var(--spacing) * 1.5);
  background: var(--hover-color);
  border-radius: calc(var(--spacing) * 2);
  font-size: 12px;
  color: var(--text-color);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.video-list-item {
  background: var(--card-bg);
  border-radius: calc(var(--spacing) * 2);
  padding: calc(var(--spacing) * 3);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.3s;
}

.video-list-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-list-item h3 {
  margin-bottom: calc(var(--spacing) * 2);
}

.video-list-item h3 a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s;
}

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

.detail-header {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 4);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  margin-bottom: calc(var(--spacing) * 4);
}

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

.info-item {
  padding: calc(var(--spacing) * 2);
  background: var(--hover-color);
  border-radius: calc(var(--spacing));
}

.info-label {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: calc(var(--spacing) / 2);
}

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

.detail-section {
  background: var(--card-bg);
  padding: calc(var(--spacing) * 4);
  border-radius: calc(var(--spacing) * 2);
  box-shadow: var(--shadow);
  margin-bottom: calc(var(--spacing) * 4);
}

.detail-section h2 {
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 3);
}

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

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

.related-item:hover {
  background: var(--border-color);
}

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

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

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

.related-item p {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 0;
}

footer {
  background: var(--primary-color);
  color: white;
  text-align: center;
  padding: calc(var(--spacing) * 4) calc(var(--spacing) * 2);
  margin-top: calc(var(--spacing) * 8);
}

.back-to-top {
  position: fixed;
  bottom: calc(var(--spacing) * 4);
  right: calc(var(--spacing) * 4);
  width: 48px;
  height: 48px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

.back-to-top:hover {
  background: var(--primary-color);
}

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

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  margin-right: calc(var(--spacing) * 2);
}

.group-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: calc(var(--spacing) * 2);
  border-radius: calc(var(--spacing));
  margin-bottom: calc(var(--spacing) * 2);
  font-weight: 600;
}

.date-badge {
  display: inline-block;
  padding: calc(var(--spacing) / 2) calc(var(--spacing) * 1.5);
  background: var(--accent-color);
  color: white;
  border-radius: calc(var(--spacing));
  font-size: 12px;
  font-weight: 600;
  margin-right: calc(var(--spacing) * 2);
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: calc(var(--spacing) * 2);
    padding: calc(var(--spacing) * 2);
  }

  nav ul {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: calc(var(--spacing));
    padding: 0;
  }

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

  nav a {
    display: block;
    font-size: 13px;
    padding: calc(var(--spacing) / 2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

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

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

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

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

  nav a {
    font-size: 12px;
    padding: calc(var(--spacing) / 4);
  }

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

  main {
    padding: calc(var(--spacing) * 2) 0;
  }
}

body.ui-style-0 {
  --primary-color: #2c5282;
  --secondary-color: #4a90e2;
}

body.ui-style-1 {
  --primary-color: #2d3748;
  --secondary-color: #4299e1;
}

body.ui-style-2 {
  --primary-color: #1a365d;
  --secondary-color: #63b3ed;
}

body.ui-style-3 {
  --primary-color: #2c7a7b;
  --secondary-color: #38b2ac;
}

body.ui-style-4 {
  --primary-color: #285e61;
  --secondary-color: #319795;
}

body.ui-style-5 {
  --primary-color: #234e52;
  --secondary-color: #2c7a7b;
}

body.ui-style-6 {
  --primary-color: #22543d;
  --secondary-color: #38a169;
}

body.ui-style-7 {
  --primary-color: #1e4620;
  --secondary-color: #48bb78;
}

body.ui-style-8 {
  --primary-color: #744210;
  --secondary-color: #dd6b20;
}

body.ui-style-9 {
  --primary-color: #7c2d12;
  --secondary-color: #f56565;
}

body.ui-style-10 {
  --primary-color: #1a202c;
  --secondary-color: #718096;
}

body.ui-style-11 {
  --primary-color: #2d3748;
  --secondary-color: #a0aec0;
}

body.ui-style-12 {
  --primary-color: #2c5282;
  --secondary-color: #667eea;
}

body.ui-style-13 {
  --primary-color: #1e3a8a;
  --secondary-color: #3b82f6;
}

body.ui-style-14 {
  --primary-color: #065f46;
  --secondary-color: #10b981;
}

body.ui-style-15 {
  --primary-color: #831843;
  --secondary-color: #ec4899;
}
