/**
 * AI 模板主样式表
 * 版本：1.0
 * 作者：小龙
 */

/* ===== CSS 变量 ===== */
:root {
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --primary-light: #7c8ff5;
  --secondary-color: #f6ad55;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --text-muted: #a0aec0;
  --bg-body: #f7fafc;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ===== 基础样式 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, li {
  list-style: none;
}

/* ===== 容器 ===== */
.ai-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 头部导航 ===== */
.ai-header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.ai-header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.ai-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
}

.ai-logo img {
  height: 40px;
  width: auto;
}

.ai-logo-text {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ai-nav-list {
  display: flex;
  gap: 5px;
}

.ai-nav-item {
  position: relative;
}

.ai-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.ai-nav-link:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(90, 103, 216, 0.1));
  color: var(--primary-color);
}

.ai-nav-link.ai-active {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.ai-nav-icon {
  font-size: 18px;
}

.ai-header-actions {
  display: flex;
  gap: 10px;
}

.ai-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.ai-action-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.ai-mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.ai-mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== 搜索面板 ===== */
.ai-search-panel,
.ai-history-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.ai-search-panel.active,
.ai-history-panel.active {
  visibility: visible;
  opacity: 1;
}

.ai-search-overlay,
.ai-history-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.ai-search-box,
.ai-history-box {
  position: relative;
  background: var(--bg-white);
  max-width: 600px;
  margin: 100px auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.ai-search-panel.active .ai-search-box,
.ai-history-panel.active .ai-history-box {
  transform: translateY(0);
}

.ai-search-close,
.ai-history-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-body);
  color: var(--text-secondary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ai-search-close:hover,
.ai-history-close:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(90deg);
}

.ai-search-input-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.ai-search-input {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.ai-search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-search-submit {
  width: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ai-search-submit:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.ai-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ai-search-tag-label {
  color: var(--text-muted);
  font-size: 14px;
}

.ai-search-tag {
  padding: 6px 12px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.ai-search-tag:hover {
  background: var(--primary-color);
  color: white;
}

/* ===== 主内容区 ===== */
.ai-main {
  min-height: calc(100vh - 400px);
  padding: 30px 0;
}

/* ===== 轮播图 ===== */
.ai-swiper-section {
  position: relative;
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.ai-swiper-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.ai-swiper-wrapper::-webkit-scrollbar {
  display: none;
}

.ai-swiper-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
}

.ai-slide-link {
  display: block;
  position: relative;
}

.ai-slide-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.ai-slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
}

.ai-slide-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 10px;
}

.ai-slide-desc {
  font-size: 14px;
  opacity: 0.9;
}

.ai-swiper-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ai-swiper-prev,
.ai-swiper-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  z-index: 10;
}

.ai-swiper-prev:hover,
.ai-swiper-next:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%) scale(1.1);
}

.ai-swiper-prev {
  left: 20px;
}

.ai-swiper-next {
  right: 20px;
}

/* ===== 区块通用 ===== */
.ai-section {
  margin-bottom: 40px;
}

.ai-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.ai-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  color: var(--text-primary);
}

.ai-title-icon {
  font-size: 28px;
}

.ai-more {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

.ai-more:hover {
  color: var(--primary-dark);
  transform: translateX(5px);
}

.ai-sub-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.ai-sub-link {
  padding: 6px 14px;
  background: var(--bg-body);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.ai-sub-link:hover {
  background: var(--primary-color);
  color: white;
}

/* ===== 视频卡片网格 ===== */
.ai-vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 25px;
}

/* ===== 视频卡片 ===== */
.ai-vod-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.ai-vod-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.ai-card-link {
  display: block;
}

.ai-card-poster {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: var(--bg-body);
}

.ai-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ai-vod-card:hover .ai-card-image {
  transform: scale(1.1);
}

.ai-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-vod-card:hover .ai-card-overlay {
  opacity: 1;
}

.ai-card-play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.ai-vod-card:hover .ai-card-play {
  transform: scale(1);
}

.ai-card-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--secondary-color), #ed8936);
  color: white;
  font-size: 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.ai-card-year {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.ai-card-content {
  padding: 15px;
}

.ai-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ai-card-tag {
  padding: 3px 8px;
  background: var(--bg-body);
  color: var(--text-secondary);
  font-size: 11px;
  border-radius: var(--radius-sm);
}

/* ===== 友情链接 ===== */
.ai-links-section {
  background: var(--bg-white);
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.ai-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.ai-link-item {
  padding: 12px;
  background: var(--bg-body);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.ai-link-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ===== 页脚 ===== */
.ai-footer {
  background: linear-gradient(135deg, #1a202c, #2d3748);
  color: #cbd5e0;
  padding: 60px 0 30px;
  margin-top: 60px;
}

.ai-footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.ai-footer-title {
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin-bottom: 15px;
}

.ai-footer-desc {
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 14px;
}

.ai-footer-contact {
  font-size: 14px;
}

.ai-footer-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 20px;
}

.ai-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ai-footer-links a {
  color: #cbd5e0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.ai-footer-links a:hover {
  color: var(--primary-light);
  padding-left: 5px;
}

.ai-footer-copyright,
.ai-footer-disclaimer {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 10px;
}

.ai-footer-copyright a {
  color: var(--primary-light);
  font-weight: 600;
}

.ai-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  text-align: center;
}

/* ===== 回到顶部 ===== */
.ai-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

.ai-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ai-back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .ai-vod-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }
  
  .ai-slide-image {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .ai-header-container {
    padding: 12px 15px;
  }
  
  .ai-nav {
    display: none;
  }
  
  .ai-mobile-menu-btn {
    display: flex;
  }
  
  .ai-header-actions {
    display: none;
  }
  
  .ai-section-title {
    font-size: 20px;
  }
  
  .ai-vod-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .ai-slide-image {
    height: 250px;
  }
  
  .ai-slide-title {
    font-size: 20px;
  }
  
  .ai-swiper-prev,
  .ai-swiper-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .ai-footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .ai-vod-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .ai-card-content {
    padding: 12px;
  }
  
  .ai-card-title {
    font-size: 14px;
  }
}

/* ===== 移动端导航面板 ===== */
/* 桌面端默认隐藏 */
.ai-mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 25, 0.96);
  z-index: 9999;
  overflow-y: auto;
  padding: 70px 0 30px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-mobile-nav.active {
  transform: translateX(0);
}

.ai-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ai-mobile-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-mobile-nav-link {
  display: block;
  padding: 16px 24px;
  color: rgba(255, 255, 255, 0.85);
font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.ai-mobile-nav-link:hover,
.ai-mobile-nav-link.ai-active {
  color: #ff9f16;
  background: rgba(255, 159, 22, 0.08);
}

/* 移动端才显示 */
@media (max-width: 768px) {
  .ai-mobile-nav {
    display: block;
  }
}
