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

/* 桔子影视2025专用样式 */

/* 果园动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes orangePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
  }
}

/* 桔子主题动画类 */
.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

.animate-bounceIn {
  animation: bounceIn 0.8s ease-out;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-orangePulse {
  animation: orangePulse 2s infinite;
}

/* 果皮卡片特效 */
.content-card {
  position: relative;
  overflow: hidden;
}

.content-card::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;
  z-index: 1;
}

.content-card:hover::before {
  left: 100%;
}

/* 桔瓣导航特效 */
.nav-link {
  position: relative;
  overflow: hidden;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #FF8C00, #FFA500);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* 移动端优化 */
@media (max-width: 768px) {
  /* 导航栏移动端优化 */
  .nav-link {
    padding: 12px 16px;
    font-size: 16px;
  }
  
  /* 轮播图移动端优化 */
  .carousel-item h2 {
    font-size: 1.5rem !important;
    line-height: 1.3;
  }
  
  .carousel-item p {
    font-size: 0.875rem !important;
    line-height: 1.5;
  }
  
  /* 卡片网格移动端优化 */
  .content-card {
    margin-bottom: 1rem;
  }
  
  .content-card .aspect-[3/4] {
    aspect-ratio: 4/3;
  }
  
  /* 分类按钮移动端优化 */
  .category-btn {
    padding: 8px 16px;
    font-size: 14px;
    margin: 4px;
  }
  
  /* 搜索框移动端优化 */
  .search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  /* 超小屏幕优化 */
  .content-card .text-4xl {
    font-size: 2rem;
  }
  
  .content-card .text-sm {
    font-size: 0.75rem;
  }
  
  /* 轮播图箭头移动端隐藏 */
  #prevSlide,
  #nextSlide {
    display: none;
  }
  
  /* 轮播控制点放大 */
  .carousel-dot {
    width: 12px !important;
    height: 12px !important;
  }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1920px) {
  .container {
    max-width: 1800px;
  }
  
  .content-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .content-card:hover {
    transform: translateY(-8px) scale(1.02);
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .content-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }
  
  .nav-link {
    color: #FFA500;
  }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-pulse,
  .animate-bounce {
    animation: none;
  }
}

/* 打印样式 */
@media print {
  .fixed,
  .carousel-dot,
  #prevSlide,
  #nextSlide,
  .category-btn {
    display: none !important;
  }
  
  .content-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* 自定义平滑过渡 */
.smooth-transition {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 桔子渐变背景 */
.orange-gradient {
  background: linear-gradient(135deg, #FF8C00 0%, #FFA500 50%, #FFB84D 100%);
}

.green-gradient {
  background: linear-gradient(135deg, #77DD77 0%, #90EE90 50%, #98FB98 100%);
}

.purple-gradient {
  background: linear-gradient(135deg, #DDA0DD 0%, #E6E6FA 50%, #F0E6FF 100%);
}

/* 果园布局网格增强 */
.orchard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

@media (max-width: 768px) {
  .orchard-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
  }
}

/* 加载状态样式 */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* 桔子主题配色变量 */
:root {
  --orange-primary: #FF8C00;
  --orange-secondary: #FFA500;
  --green-primary: #77DD77;
  --cream-white: #FFF8F0;
  --brown-text: #5C4033;
  --cream-bg: #FFF5E6;
  --orange-gradient: linear-gradient(135deg, #FF8C00 0%, #FFA500 100%);
  --green-gradient: linear-gradient(135deg, #77DD77 0%, #90EE90 100%);
}