/* 全局样式 */
: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;
}

/* 伦理电影网自定义样式 */
/* 确保移动端兼容性 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 响应式网格 */
.grid {
  display: grid;
  gap: 1rem;
}

/* 轮播图样式 */
.carousel-slide {
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-indicator {
  transition: opacity 0.3s ease;
  opacity: 0.5;
}

.carousel-indicator.active {
  opacity: 1;
}

/* 卡片悬停效果 */
.group:hover {
  transform: translateY(-5px);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .grid {
    gap: 0.5rem;
  }
  
  /* 确保文字在小屏幕上可读 */
  .text-3xl {
    font-size: 1.5rem !important;
  }
  
  .text-xl {
    font-size: 1.125rem !important;
  }
  
  .text-5xl {
    font-size: 2rem !important;
  }
  
  /* 调整间距 */
  .py-16 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .py-12 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  .mb-12 {
    margin-bottom: 2rem !important;
  }
  
  .mb-8 {
    margin-bottom: 1.5rem !important;
  }
  
  /* 确保按钮在移动端可点击 */
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* 表单元素优化 */
  input[type="text"] {
    font-size: 16px; /* 防止iOS缩放 */
    padding: 0.75rem;
  }
  
  /* 导航菜单 */
  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(55, 65, 81, 0.5);
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 0.75rem;
  }
  
  /* 更小屏幕的字体调整 */
  .text-lg {
    font-size: 1rem !important;
  }
  
  .text-sm {
    font-size: 0.875rem !important;
  }
  
  /* 卡片间距调整 */
  .gap-6 {
    gap: 0.75rem !important;
  }
  
  .gap-8 {
    gap: 1rem !important;
  }
  
  /* 确保轮播图在小屏幕上正常显示 */
  .h-96 {
    height: 250px !important;
  }
  
  .aspect-\\[3\\/4\\] {
    aspect-ratio: 3/4 !important;
  }
  
  .aspect-\\[16\\/9\\] {
    aspect-ratio: 16/9 !important;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .group:hover {
    transform: none;
  }
  
  .group:active {
    transform: translateY(-2px);
  }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .text-sm {
    font-size: 0.875rem;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  /* 已经是深色主题，无需额外处理 */
}

/* 可访问性优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 焦点状态优化 */
button:focus,
input:focus,