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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
}

/* 顶部标题样式 */
.header {
  padding: 60px 20px 30px;
  text-align: center;
}

.logo {
  width: 100px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 8px rgba(44, 92, 220, 0.2));
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 12px rgba(44, 92, 220, 0.3));
}

.title {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2c5cdc 0%, #409eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

/* 搜索框样式 */
.search-section {
  padding: 20px 20px 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-container {
  position: relative;
  max-width: 600px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 60px;
  font-size: 16px;
  border: 2px solid transparent;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(44, 92, 220, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.search-input:focus {
  border-color: #2c5cdc;
  box-shadow: 0 8px 32px rgba(44, 92, 220, 0.2);
  background: rgba(255, 255, 255, 1);
}

.search-input::placeholder {
  color: #999;
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c5cdc 0%, #409eff 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(44, 92, 220, 0.3);
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 6px 20px rgba(44, 92, 220, 0.4);
}

.search-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* 主内容区域 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* 视频网格布局 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* 视频项目样式 */
.video-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.video-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 视频容器 */
.video-container {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f0f0f0;
  overflow: hidden;
  cursor: pointer;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.video-placeholder:hover {
  transform: scale(1.05);
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 播放按钮覆盖层 */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 1;
}

.play-overlay:hover {
  background: rgba(0, 0, 0, 0.5);
}

.play-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 1);
}

.play-button svg {
  width: 32px;
  height: 32px;
  fill: #2c5cdc;
  margin-left: 4px;
}

/* 视频信息区域 */
.video-info {
  padding: 24px;
}

.video-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

.video-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

/* 无搜索结果样式 */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-results-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results p {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.no-results small {
  color: #999;
}

/* 动画关键帧 */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 淡入动画延迟 */
.video-item:nth-child(1) {
  animation-delay: 0.1s;
}
.video-item:nth-child(2) {
  animation-delay: 0.2s;
}
.video-item:nth-child(3) {
  animation-delay: 0.3s;
}
.video-item:nth-child(4) {
  animation-delay: 0.4s;
}
.video-item:nth-child(5) {
  animation-delay: 0.5s;
}
.video-item:nth-child(6) {
  animation-delay: 0.6s;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .logo {
    width: 80px;
    margin-bottom: 16px;
  }

  .title {
    font-size: 2.2rem;
  }

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

  .search-section {
    padding: 15px 20px 40px;
  }

  .header {
    padding: 40px 20px 20px;
  }

  .video-container {
    height: 180px;
  }

  .play-button {
    width: 50px;
    height: 50px;
  }

  .play-button svg {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 70px;
    margin-bottom: 14px;
  }

  .title {
    font-size: 1.8rem;
  }

  .search-input {
    font-size: 14px;
    padding: 14px 20px;
    padding-right: 55px;
  }

  .search-btn {
    width: 40px;
    height: 40px;
  }

  .video-info {
    padding: 20px;
  }

  .video-title {
    font-size: 1.1rem;
  }

  .video-description {
    font-size: 0.85rem;
  }
}

/* 加载状态 */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* 隐藏状态 */
.hidden {
  display: none !important;
}

/* 过渡动画 */
.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

/* 视频弹窗样式 */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.video-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  overflow: hidden;
  transform: scale(0.9) translateY(30px);
  transition: all 0.3s ease;
}

.video-modal.show .modal-content {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
  padding-right: 16px;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #333;
  transform: scale(1.05);
}

.modal-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.modal-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.modal-info {
  padding: 20px 24px 24px;
}

.modal-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* 移动端弹窗优化 */
@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    max-height: 85vh;
    border-radius: 16px;
  }

  .modal-header {
    padding: 20px 20px 12px;
  }

  .modal-title {
    font-size: 1.2rem;
  }

  .modal-close {
    width: 36px;
    height: 36px;
  }

  .modal-info {
    padding: 16px 20px 20px;
  }

  .modal-description {
    font-size: 0.9rem;
  }
}
