/* 51动漫 - 主样式表 | cai179.cn */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #7C3AED;
  --secondary-color: #06B6D4;
  --accent-color: #FFB81C;
  --dark-bg: #0F172A;
  --light-bg: #F8FAFC;
  --text-dark: #1E293B;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--light-bg);
}

/* 页头样式 */
.site-header {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1f35 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.site-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-menu a:hover {
  color: var(--secondary-color);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.search-bar-container {
  display: flex;
  justify-content: center;
  padding: 0.5rem 2rem 1rem;
  gap: 0.5rem;
}

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
}

.search-btn {
  padding: 0.75rem 1.5rem;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: #0891b2;
  transform: translateY(-2px);
}

/* 主内容区 */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* 页脚样式 */
.site-footer {
  background: var(--dark-bg);
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto 2rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.footer-section p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--secondary-color);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--secondary-color);
  color: var(--dark-bg);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: var(--text-light);
}

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

  .main-nav {
    display: none;
    width: 100%;
    margin: 0;
    margin-top: 1rem;
  }

  .main-nav.active {
    display: flex;
    flex-direction: column;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
  }

  .nav-menu a {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hamburger {
    display: block;
  }

  .search-bar-container {
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
  }

  .search-input {
    max-width: 100%;
  }

  main {
    padding: 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* 视频卡片样式 */
.video-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  overflow: hidden;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10;
}

.play-button::after {
  content: '▶';
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-left: 4px;
}

.video-card:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: 1rem;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.video-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 内容网格 */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #6d28d9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
  background: var(--secondary-color);
}

.btn-secondary:hover {
  background: #0891b2;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

/* 段落和文本 */
p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

/* 加载动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

