@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  font-weight: 400;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 深色模式全局样式 */
html {
  background-color: #111827;
  color: #f9fafb;
}

body {
  @apply bg-gray-900 text-gray-100 transition-colors duration-300;
}

/* 深色模式下的滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  @apply bg-gray-800;
}

::-webkit-scrollbar-thumb {
  @apply bg-gray-600 rounded-md;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-gray-500;
}

/* 淡入上升动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* 平滑过渡效果 */
.smooth-refresh {
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.smooth-refresh.loading {
  opacity: 0.7;
  transform: scale(0.98);
}

/* 隐藏滚动条但保持滚动功能 */
.scrollbar-hide {
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Safari and Chrome */
}

/* 隐藏所有闪烁光标 */
* {
  caret-color: transparent !important;
}

input, textarea, [contenteditable] {
  caret-color: transparent !important;
  cursor: default !important;
}

input:focus, textarea:focus, [contenteditable]:focus {
  caret-color: transparent !important;
  outline: none;
}