/* 全站统一样式 */

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

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
  line-height: 1.6;
  background: #f5f5f5;
  color: #333;
  font-size: 16px;
}

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

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 15px;
  text-align: center;
}

nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.3s ease;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
}

.main-content {
  padding: 40px 0;
  min-height: calc(100vh - 200px);
}

section {
  background: white;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

h1 {
  font-size: 32px;
  color: #667eea;
  margin-bottom: 20px;
  border-left: 5px solid #764ba2;
  padding-left: 15px;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
  color: #667eea;
  margin-bottom: 20px;
  margin-top: 30px;
}

.intro-text {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
  text-align: justify;
}

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

.video-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  background: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

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

.video-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.4;
}

.video-meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
}

.video-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
}

.video-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.video-link:hover {
  text-decoration: underline;
  color: #764ba2;
}

.list-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.list-link {
  display: inline-block;
  padding: 10px 20px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
  font-weight: 500;
}

.list-link:hover {
  background: #764ba2;
}

footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
}

footer p {
  margin: 5px 0;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 50px;
  height: 50px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 999;
}

.back-to-top:hover {
  background: #764ba2;
  transform: translateY(-3px);
}

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

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

  .video-grid, .video-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 768px) {
  nav {
    font-size: 14px;
    gap: 3px;
  }

  nav a {
    padding: 6px 8px;
    font-size: 13px;
  }

  .logo {
    font-size: 24px;
    margin-bottom: 12px;
  }

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

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  section {
    padding: 20px;
  }

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

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

@media (max-width: 480px) {
  nav a {
    padding: 5px 5px;
    font-size: 12px;
  }

  .logo {
    font-size: 20px;
  }

  h1 {
    font-size: 20px;
  }

  section {
    padding: 15px;
  }
}

body.ui-style-5 {
  background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
}

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

body.ui-style-5 .video-card:hover {
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
}
