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

:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== 自定义点阵背景 ===== */
.bg-dot-pattern {
  background-image: radial-gradient(rgba(30, 62, 26, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bg-dot-pattern-light {
  background-image: radial-gradient(rgba(250, 204, 21, 0.18) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* ===== 竖排文字（茶园/产地用） ===== */
.writing-vertical-rl {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ===== 漂浮与光效动画 ===== */
@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-22px) rotate(6deg);
  }
}

.animate-float-slow {
  animation: float-slow 7s ease-in-out infinite;
}

@keyframes sun-shimmer {
  0%, 100% {
    opacity: 0.65;
    filter: blur(0px) brightness(1);
  }
  50% {
    opacity: 0.9;
    filter: blur(1px) brightness(1.08);
  }
}

.animate-sun-shimmer {
  animation: sun-shimmer 3.6s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 4s ease-in-out infinite;
}

/* ===== 商家实时滚动播报 ===== */
@keyframes scroll-up {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

.animate-scroll-up {
  animation: scroll-up 24s linear infinite;
}

.animate-scroll-up:hover {
  animation-play-state: paused;
}

/* ===== 自定义滚动条 ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f5f7;
}
::-webkit-scrollbar-thumb {
  background: #2d5a27;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1e3e1a;
}

/* ===== 数值微调：保持原文稿 Apple 风排版 ===== */
.font-serif {
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia,
    "Times New Roman", serif;
}

/* 小工具：移除移动端默认 tap 高亮 */
* {
  -webkit-tap-highlight-color: transparent;
}
