/* 全局样式 */
:root {
  --primary: #165dff;
}

body {
  font-family: "Inter", sans-serif;
}

a {
  text-decoration: none;
}

/* 导航栏滚动效果 */
#navbar.scroll {
  background-color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* 轮播图 */
.carousel-item.active {
  opacity: 1;
  z-index: 1;
}

/* 移动端菜单 */
#mobileMenu.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* 漫画卡片悬停效果 */
.comic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* 分类卡片悬停效果 */
.category-card:hover .category-image {
  transform: scale(1.05);
}

/* 平滑滚动 */
html {
  scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Line clamp 样式 */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* 自定义动画 */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.animate-shimmer {
  animation: shimmer 2s linear infinite;
}

/* 响应式阴影 */
.shadow-3xl {
  box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.25);
}

/* 自定义圆角 */
.rounded-4xl {
  border-radius: 2rem;
}

.rounded-5xl {
  border-radius: 2.5rem;
}

/* 自定义边框 */
.border-3 {
  border-width: 3px;
}

/* 97影视 - 自定义样式 */
/* 全局样式优化 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: #111827;
  overflow-x: hidden;
}

/* 导航栏增强 */
nav {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

/* 渐变背景动画 */
.hero-gradient {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 卡片悬停效果增强 */
.card-hover {
  transition: all 0.3s ease;
  transform: translateY(0);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* 文字渐变效果 */
.text-gradient {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f9ca24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textGradient 3s ease infinite;
}

@keyframes textGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 按钮增强效果 */
.btn-primary {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

/* 搜索框增强 */
.search-box {
  position: relative;
}

.search-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 0.5rem;
  padding: 1px;
  z-index: -1;
}

.search-box input {
  background: #1f2937;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.search-box input:focus {
  background: #111827;
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

/* 响应式改进 */
@media (max-width: 768px) {
  .hero-section {
    height: 60vh;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .grid-responsive {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .card-mobile {
    padding: 1rem;
  }
  
  .text-mobile {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 50vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .grid-responsive {
    grid-template-columns: 1fr;
  }
  
  .nav-mobile {
    padding: 0.5rem;
  }
  
  .btn-mobile {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
}

/* 加载动画 */
.loading {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* 评分星星效果 */
.rating-stars {
  display: inline-flex;
  gap: 2px;
}

.rating-star {
  color: #fbbf24;
  font-size: 0.875rem;
}

/* 标签样式 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tag-hot {
  background: linear-gradient(45deg, #ff6b6b, #ee5a52);
  color: white;
}

.tag-new {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  color: white;
}

.tag-vip {
  background: linear-gradient(45deg, #f9ca24, #f0932b);
  color: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1f2937;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #ee5a52, #44a08d);
}

/* 图片懒加载效果 */
.lazy-image {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-image.loaded {
  opacity: 1;
}

/* 网格布局增强 */
.grid-masonry {
  column-count: 3;
  column-gap: 1rem;
}

@media (max-width: 1024px) {
  .grid-masonry {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .grid-masonry {
    column-count: 1;
  }
}

/* 播放按钮特效 */
.play-button {
  position: relative;
  overflow: hidden;
}

.play-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.play-button:hover::after {
  width: 300px;
  height: 300px;
}

/* 深色主题优化 */
.dark-mode {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent-color: #ef4444;
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 动画类 */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease forwards;
}

/* 媒体查询优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  .bg-gray-900 {
    background-color: #000000;
  }
  
  .bg-gray-800 {
    background-color: #111111;
  }
  
  .text-gray-400 {
    color: #cccccc;
  }
}

/* 打印样式 */
@media print {
  nav,
  footer,
  .no-print {
    display: none !important;
  }
  
  body {
    color: #000000;
    background: #ffffff;
  }
  
  .bg-gray-900,
  .bg-gray-800 {
    background: #ffffff !important;
  }
}