/* 优化的Tailwind CSS - 只包含实际使用的样式 */

/* 基础样式 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans SC', sans-serif;
  background-color: #f9fafb;
  color: #1f2937;
}

/* 布局 */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

/* Flexbox */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.space-x-3 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.75rem;
}

.space-x-6 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 1.5rem;
}

/* 定位 */
.sticky {
  position: sticky;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.top-0 {
  top: 0;
}

.top-16 {
  top: 4rem;
}

.bottom-0 {
  bottom: 0;
}

.left-0 {
  left: 0;
}

.right-0 {
  right: 0;
}

.left-3 {
  left: 0.75rem;
}

.top-2\.5 {
  top: 0.625rem;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* 间距 */
.m-0 {
  margin: 0;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mr-1 {
  margin-right: 0.25rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.my-4 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.pb-20 {
  padding-bottom: 5rem;
}

.pb-24 {
  padding-bottom: 6rem;
}

.pl-10 {
  padding-left: 2.5rem;
}

.pl-3 {
  padding-left: 0.75rem;
}

.pr-4 {
  padding-right: 1rem;
}

/* 尺寸 */
.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-6 {
  width: 1.5rem;
}

.w-16 {
  width: 4rem;
}

.w-full {
  width: 100%;
}

.h-4 {
  height: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.h-12 {
  height: 3rem;
}

.h-16 {
  height: 4rem;
}

.h-32 {
  height: 8rem;
}

.max-h-12 {
  max-height: 3rem;
}

.max-h-600 {
  max-height: 600px;
}

/* 网格 */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

/* 文字 */
.text-xs {
  font-size: 0.75rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.text-center {
  text-align: center;
}

.whitespace-nowrap {
  white-space: nowrap;
}

/* 颜色 */
.text-white {
  color: #ffffff;
}

.text-gray-400 {
  color: #9ca3af;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-700 {
  color: #374151;
}

.text-gray-800 {
  color: #1f2937;
}

.text-gray-900 {
  color: #111827;
}

.text-orange-500 {
  color: #f97316;
}

.text-red-500 {
  color: #ef4444;
}

.text-yellow-500 {
  color: #eab308;
}

.text-blue-500 {
  color: #3b82f6;
}

/* 背景 */
.bg-gray-50 {
  background-color: #f9fafb;
}

.bg-gray-100 {
  background-color: #f3f4f6;
}

.bg-gray-200 {
  background-color: #e5e7eb;
}

.bg-gray-300 {
  background-color: #d1d5db;
}

.bg-white {
  background-color: #ffffff;
}

.bg-orange-500 {
  background-color: #f97316;
}

.bg-orange-600 {
  background-color: #ea580c;
}

.bg-blue-500 {
  background-color: #3b82f6;
}

.bg-blue-600 {
  background-color: #2563eb;
}

.bg-red-500 {
  background-color: #ef4444;
}

/* 边框 */
.border {
  border-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-gray-200 {
  border-color: #e5e7eb;
}

.border-white\/10 {
  border-color: rgba(255, 255, 255, 0.1);
}

.border-white\/20 {
  border-color: rgba(255, 255, 255, 0.2);
}

.border-white\/30 {
  border-color: rgba(255, 255, 255, 0.3);
}

/* 圆角 */
.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-l-lg {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.rounded-r-lg {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* 阴影 */
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 过渡 */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* 溢出 */
.overflow-hidden {
  overflow: hidden;
}

.overflow-x-auto {
  overflow-x: auto;
}

/* 其他 */
.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.inline-flex {
  display: inline-flex;
}

.hidden {
  display: none;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-grow {
  flex-grow: 1;
}

/* 瀑布流布局 */
.waterfall-grid {
  column-count: 2;
  column-gap: 12px;
}

@media (min-width: 768px) {
  .waterfall-grid {
    column-count: 3;
    column-gap: 16px;
  }
}

@media (min-width: 1024px) {
  .waterfall-grid {
    column-count: 4;
    column-gap: 20px;
  }
}

.drama-card {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .drama-card {
    margin-bottom: 16px;
  }
}

@media (min-width: 1024px) {
  .drama-card {
    margin-bottom: 20px;
  }
}

.drama-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* 自定义样式 */
.gradient-bg {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:active {
  transform: scale(0.98);
}

.search-focus {
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.tab-active {
  color: #f97316;
  border-bottom: 2px solid #f97316;
}

.loading-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.cover-image {
  aspect-ratio: 16/9;
  object-fit: cover;
}

.qr-container {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.action-btn {
  transition: all 0.3s ease;
}

.action-btn:active {
  transform: scale(0.98);
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.category-tag {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.stats-item {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

/* 动画 */
.animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 表单元素 */
input[type="text"] {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* 按钮样式 */
button {
  cursor: pointer;
  border: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* 图片 */
img {
  max-width: 100%;
  height: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* 修复缺失的关键样式 */

/* 搜索框透明背景样式 */
.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-white\/20 {
  background-color: rgba(255, 255, 255, 0.2) !important;
}

.border-white\/20 {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.border-white\/30 {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.placeholder-white\/70 {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* 确保颜色优先级 */
.text-orange-500 {
  color: #f97316 !important;
}

.text-gray-400 {
  color: #9ca3af !important;
}

.text-white {
  color: #ffffff !important;
}

/* 详情页输入框样式 */
.bg-gray-50 {
  background-color: #f9fafb !important;
}

.border-gray-200 {
  border-color: #e5e7eb !important;
}

.text-gray-700 {
  color: #374151 !important;
}

/* 按钮和输入框圆角 */
.rounded-l-lg {
  border-top-left-radius: 0.5rem !important;
  border-bottom-left-radius: 0.5rem !important;
}

.rounded-r-lg {
  border-top-right-radius: 0.5rem !important;
  border-bottom-right-radius: 0.5rem !important;
}

/* 底部导航栏样式 */
.flex-col {
  flex-direction: column !important;
}

/* SVG填充色 */
.fill-currentColor {
  fill: currentColor !important;
}

/* 确保渐变背景 */
.gradient-bg {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

/* 修复flex布局 */
.justify-around {
  justify-content: space-around !important;
}

.items-center {
  align-items: center !important;
}

/* 修复间距 */
.mb-1 {
  margin-bottom: 0.25rem !important;
}

.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.px-3 {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
}

/* 修复网格布局 */
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.gap-3 {
  gap: 0.75rem !important;
}

/* 修复文字大小 */
.text-sm {
  font-size: 0.875rem !important;
}

/* 修复蓝色按钮 */
.bg-blue-500 {
  background-color: #3b82f6 !important;
}

.bg-blue-600 {
  background-color: #2563eb !important;
}

.hover\:bg-blue-600:hover {
  background-color: #2563eb !important;
}

/* 修复搜索框图标遮挡问题 */
.pl-12 {
  padding-left: 3rem !important;
}

.left-4 {
  left: 1rem !important;
}

/* 垂直居中对齐 */
.top-1\/2 {
  top: 50% !important;
}

.transform {
  transform: translateY(-50%) !important;
}

.-translate-y-1\/2 {
  transform: translateY(-50%) !important;
}

/* 防止图标点击 */
.pointer-events-none {
  pointer-events: none !important;
}

/* 修复placeholder显示 */
.placeholder-white\/70::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* 导航栏按钮样式修复 - 移除背景色和边框 */
.tab-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: #f97316 !important;
}

.tab-btn:focus {
  outline: none !important;
}

/* 底部导航栏按钮样式修复 */
.nav-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  color: #f97316 !important;
}

.nav-btn:focus {
  outline: none !important;
}

/* 激活状态样式优化 */
.tab-active {
  color: #f97316 !important;
  border-bottom: 2px solid #f97316 !important;
}

/* 确保按钮文本颜色 */
.text-orange-500 {
  color: #f97316 !important;
}

.text-gray-400 {
  color: #9ca3af !important;
}

.text-gray-600 {
  color: #4b5563 !important;
}

/* 按钮交互效果 */
.tab-btn:active, .nav-btn:active {
  transform: scale(0.98);
}

/* 移除按钮的默认样式 */
button.tab-btn, button.nav-btn {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  border: none !important;
}

/* 确保hover效果正常工作 */
.tab-btn:hover, .nav-btn:hover {
  background: transparent !important;
  color: #f97316 !important;
}

/* 激活按钮的特殊样式 */
.tab-btn.tab-active:hover, .nav-btn.text-orange-500:hover {
  background: transparent !important;
  color: #f97316 !important;
}

/* 相对定位容器 */
.relative {
  position: relative !important;
}

/* 绝对定位下划线 */
.absolute {
  position: absolute !important;
}

.bottom-0 {
  bottom: 0 !important;
}

.left-0 {
  left: 0 !important;
}

.right-0 {
  right: 0 !important;
}

/* 下划线高度 */
.h-0\.5 {
  height: 2px !important;
}

/* 橙色下划线 */
.bg-orange-500 {
  background-color: #f97316 !important;
}

/* 透明度控制 */
.opacity-0 {
  opacity: 0 !important;
}

.opacity-100 {
  opacity: 1 !important;
}

/* 悬停下划线效果 */
.hover\:opacity-100:hover {
  opacity: 1 !important;
}

/* 过渡效果 */
.transition-opacity {
  transition-property: opacity !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
  transition-duration: 150ms !important;
}

/* 激活状态下的下划线 */
.tab-active .absolute {
  opacity: 1 !important;
}

/* Tab按钮容器样式 */
.tab-btn {
  display: inline-block !important;
  padding: 8px 4px !important;
  margin: 0 12px !important;
  position: relative !important;
  background: transparent !important;
  border: none !important;
}

/* Tab按钮文本样式 */
.tab-btn span {
  display: block !important;
  margin-bottom: 2px !important;
}

/* 确保下划线在按钮底部 */
.tab-btn .absolute {
  bottom: -2px !important;
}