/* 三生影视 - 全站样式表 */

/* 基础重置与通用样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: #004499;
  text-decoration: underline;
}

.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;
}

.logo a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo a:hover {
  opacity: 0.9;
  text-decoration: none;
}

/* 导航栏样式 - 移动端单行约束 */
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

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

nav a {
  color: white;
  padding: 8px 12px;
  display: block;
  border-radius: 4px;
  transition: background 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

nav a:hover {
  background: rgba(255,255,255,0.2);
  text-decoration: none;
}

/* 主内容区 */
main {
  min-height: 60vh;
  padding: 30px 0;
}

/* 卡片样式 */
.video-card, .list-item {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card h3, .list-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

/* 网格布局 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 10px 30px;
  background: #667eea;
  color: white;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.btn:hover {
  background: #5568d3;
  text-decoration: none;
}

/* 页脚 */
footer {
  background: #333;
  color: #ccc;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
}

footer p {
  font-size: 14px;
}

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

  header {
    padding: 15px 0;
  }

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

  nav ul {
    gap: 5px;
  }

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

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

  main {
    padding: 20px 0;
  }

  h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }
}

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

  nav a {
    padding: 5px 6px;
    font-size: 12px;
  }

  .video-card, .list-item {
    padding: 15px;
  }
}

/* UI风格变体 */
.ui-style-0 { --primary-color: #667eea; --secondary-color: #764ba2; }
.ui-style-1 { --primary-color: #f093fb; --secondary-color: #f5576c; }
.ui-style-2 { --primary-color: #4facfe; --secondary-color: #00f2fe; }
.ui-style-3 { --primary-color: #43e97b; --secondary-color: #38f9d7; }
.ui-style-4 { --primary-color: #fa709a; --secondary-color: #fee140; }
.ui-style-5 { --primary-color: #30cfd0; --secondary-color: #330867; }
.ui-style-6 { --primary-color: #a8edea; --secondary-color: #fed6e3; }
.ui-style-7 { --primary-color: #ff9a9e; --secondary-color: #fecfef; }
.ui-style-8 { --primary-color: #ffecd2; --secondary-color: #fcb69f; }
.ui-style-9 { --primary-color: #ff6e7f; --secondary-color: #bfe9ff; }
.ui-style-10 { --primary-color: #e0c3fc; --secondary-color: #8ec5fc; }
.ui-style-11 { --primary-color: #f7971e; --secondary-color: #ffd200; }
.ui-style-12 { --primary-color: #00c6ff; --secondary-color: #0072ff; }
.ui-style-13 { --primary-color: #f83600; --secondary-color: #fe8c00; }
.ui-style-14 { --primary-color: #52c234; --secondary-color: #061700; }
.ui-style-15 { --primary-color: #eb3349; --secondary-color: #f45c43; }

/* 返回顶部按钮 */
#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #667eea;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.3s;
  z-index: 999;
  font-size: 24px;
  border: none;
}

#backToTop:hover {
  background: #5568d3;
  transform: translateY(-5px);
}

#backToTop.show {
  display: flex;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-card, .list-item {
  animation: fadeIn 0.5s ease-out;
}

/* 打印样式 */
@media print {
  header, footer, nav, #backToTop {
    display: none;
  }

  body {
    background: white;
  }

  .video-card, .list-item {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
