/* 全局样式 */
:root {
  --primary-color: #1a73e8;
  --secondary-color: #34a853;
  --accent-color: #ea4335;
  --text-color: #202124;
  --text-secondary: #5f6368;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --border-color: #dadce0;
  --hover-bg: #f1f3f4;
}

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

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

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

/* 导航栏 */
nav {
  background: var(--card-bg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

nav a {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 1rem 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  background: var(--hover-bg);
}

@media (max-width: 768px) {
  nav a {
    padding: 0.8rem 0.3rem;
    font-size: 0.85rem;
  }
}

/* 页面头部 */
.page-header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-header h1 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.page-header .intro {
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

/* 简介区域 */
.intro-section {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.intro-section h2 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.intro-section p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.quick-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  background: #1557b0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 视频区域 */
.video-section {
  margin-bottom: 3rem;
}

.video-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  padding-left: 0.5rem;
  border-left: 4px solid var(--primary-color);
}

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

.video-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

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

.video-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

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

.meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.meta span {
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;
  background: var(--hover-bg);
  border-radius: 4px;
  color: var(--text-secondary);
}

.oneline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  background: #e8f0fe;
  color: var(--primary-color);
  border-radius: 3px;
}

/* CTA 区域 */
.cta-section {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  margin-bottom: 2rem;
}

.cta-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.cta-section > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cta-card {
  background: var(--hover-bg);
  padding: 2rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.cta-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cta-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.cta-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 列表页 */
.video-list {
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.video-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

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

.video-item:hover {
  background: var(--hover-bg);
}

.video-item .rank {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  min-width: 3rem;
  text-align: center;
}

.video-item .item-content {
  flex: 1;
}

.video-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

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

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

.video-item .summary {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.video-item .date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* 详情页 */
.detail-page {
  max-width: 900px;
}

.video-detail {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.video-detail header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.video-detail header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.video-detail .subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.video-detail section {
  margin-bottom: 2rem;
}

.video-detail h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  padding-left: 0.75rem;
  border-left: 4px solid var(--primary-color);
}

.basic-info dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.basic-info dt {
  font-weight: 600;
  color: var(--text-secondary);
}

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

.highlight {
  background: #e8f0fe;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.highlight .oneline {
  font-size: 1.1rem;
  color: var(--text-color);
  margin: 0;
  line-height: 1.6;
}

.summary p,
.review p {
  color: var(--text-color);
  line-height: 1.8;
  text-align: justify;
}

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

.related-card {
  background: var(--hover-bg);
  padding: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

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

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

.related-card .meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.related-card .desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 页脚 */
footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 0.75rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

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

  .video-detail {
    padding: 1.5rem;
  }

  .video-detail header h1 {
    font-size: 1.5rem;
  }

  .basic-info dl {
    grid-template-columns: 80px 1fr;
    gap: 0.5rem;
  }

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

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

/* UI Style 8 特殊样式 */
body.ui-style-8 {
  --primary-color: #0066cc;
  --secondary-color: #00aa66;
}

body.ui-style-8 .page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

body.ui-style-8 .page-header h1,
body.ui-style-8 .page-header .intro {
  color: white;
}
