/* ========== 弹窗 body lock ========== */
.modal-body-lock {
  position: fixed !important;
  width: 100% !important;
  overflow: hidden !important;
  touch-action: none !important;
  -webkit-overflow-scrolling: none !important;
  overscroll-behavior: none !important;
}

/* ========== 卡片刷新动画 ========== */

/* 随机任务卡片刷新生效（统一翻转动画） */
.card-shuffle {
  animation: card-shuffle 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes card-shuffle {
  0%   { transform: rotateY(0deg) scale(1);    opacity: 1; }
  45%  { transform: rotateY(90deg) scale(0.92); opacity: 0.5; }
  55%  { transform: rotateY(90deg) scale(0.92); opacity: 0.5; }
  100% { transform: rotateY(0deg) scale(1);    opacity: 1; }
}

/* 挑战标签脉冲动画 */
.challenge-pulse {
  animation: challenge-pulse 2s ease-in-out infinite;
}

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

/* 罚单按钮脉冲动画 - 持续3秒 */
.button-shake {
  animation: button-pulse 0.8s ease-in-out 4;
}

@keyframes button-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3); }
  50% { transform: scale(1.08); box-shadow: 0 6px 20px rgba(24, 144, 255, 0.6); }
}

/* 宠物图鉴动效 - PC版本参考 */
@keyframes card-reveal {
  0% {
    opacity: 0;
    transform: scale(0.3) rotateY(90deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotateY(0deg);
  }
  100% {
    transform: scale(1) rotateY(0deg);
  }
}

/* 卡片刷新动画 - 旋转进入 */
@keyframes card-spin-in {
  0% {
    opacity: 0;
    transform: scale(0.5) rotate(180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* 卡片刷新动画 - 弹性弹出 */
@keyframes card-bounce-in {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 卡片刷新动画 - 翻转 */
@keyframes card-flip {
  0% {
    transform: rotateY(0deg);
  }
  50% {
    transform: rotateY(90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}

/* 卡片刷新动画 - 闪光扫过 */
@keyframes card-shine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ========== 神兽专属动画 ========== */

/* 皇冠呼吸动画 */
@keyframes crown-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 2px 8px rgba(255,215,0,0.6));
  }
  50% {
    transform: scale(1.1);
    opacity: 0.95;
    filter: drop-shadow(0 3px 12px rgba(255,215,0,0.8));
  }
}

/* 头像金色发光动画 */
@keyframes avatar-glow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(255,215,0,0.4), inset 0 2px 8px rgba(255,255,255,0.8);
  }
  50% {
    box-shadow: 0 12px 32px rgba(255,215,0,0.6), inset 0 2px 12px rgba(255,255,255,0.9);
  }
}

/* 方案A：流光效果 */
@keyframes frameGlow2 {
  0%, 100% { box-shadow: 0 0 4px #52c41a40; }
  50% { box-shadow: 0 0 12px #52c41a80; }
}
@keyframes frameGlow3 {
  0%, 100% { box-shadow: 0 0 6px #1890ff40; }
  50% { box-shadow: 0 0 16px #1890ffaa; }
}
@keyframes frameGlow4 {
  0%, 100% { box-shadow: 0 0 8px #722ed160, 0 0 4px #722ed130; }
  50% { box-shadow: 0 0 20px #722ed1cc, 0 0 10px #722ed160; }
}
@keyframes frameGlow5 {
  0%, 100% { box-shadow: 0 0 12px #faad1460, 0 0 6px #faad1430; }
  50% { box-shadow: 0 0 24px #faad14ee, 0 0 12px #faad1480; }
}

/* 方案B：脉冲呼吸 */
@keyframes framePulse1 {
  0%, 100% { border-color: #d9d9d9; }
  50% { border-color: #d9d9d9cc; }
}
@keyframes framePulse2 {
  0%, 100% { border-color: #52c41a; transform: scale(1); }
  50% { border-color: #73d13d; transform: scale(1.02); }
}
@keyframes framePulse3 {
  0%, 100% { border-color: #1890ff; transform: scale(1); box-shadow: 0 0 4px #1890ff40; }
  50% { border-color: #40a9ff; transform: scale(1.03); box-shadow: 0 0 12px #1890ff80; }
}
@keyframes framePulse4 {
  0%, 100% { border-color: #722ed1; transform: scale(1); box-shadow: 0 0 6px #722ed140; }
  50% { border-color: #9254de; transform: scale(1.04); box-shadow: 0 0 18px #722ed1aa; }
}
@keyframes framePulse5 {
  0%, 100% { border-color: #faad14; transform: scale(1); box-shadow: 0 0 10px #faad1460; }
  50% { border-color: #ffc53d; transform: scale(1.05); box-shadow: 0 0 24px #faad14cc, 0 0 8px #faad1480; }
}

/* ========== 可爱童趣风格 ========== */

/* 可爱弹跳动画 */
@keyframes cute-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 可爱摇摆动画 */
@keyframes cute-wiggle {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* 漂浮动画 */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* 闪烁动画 */
@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* 彩虹渐变 */
@keyframes rainbow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 全局可爱按钮样式 */
.cute-button {
  border-radius: 16px !important;
  font-weight: bold !important;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55) !important;
}

.cute-button:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
}

.cute-button:active {
  transform: scale(0.95);
}

/* 可爱卡片样式 */
.cute-card {
  border-radius: 24px !important;
  border: 4px solid !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.cute-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
}

/* 可爱标签样式 */
.cute-tag {
  border-radius: 12px !important;
  padding: 6px 14px !important;
  font-weight: bold !important;
  font-size: 14px !important;
}

/* ========== iOS 微信/浏览器安全区域适配 ========== */
html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Nunito', 'Comic Sans MS', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #E3F2FD 0%, #FCE4EC 50%, #FFF9C4 100%);
  background-attachment: fixed;
  /* iOS 安全区域：顶部状态栏高度 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  /* 防止 iOS 橡皮筋效果导致布局抖动 */
  overscroll-behavior: none;
}

#root {
  min-height: 100vh;
  /* 确保内容不被底部安全区域遮挡 */
  padding-bottom: env(safe-area-inset-bottom);
}

/* ========== 全局样式 ========== */

/* Ant Design 覆盖样式 */
.ant-btn {
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ant-card {
  border-radius: 20px;
  overflow: hidden;
}

.ant-tag {
  border-radius: 10px;
  font-weight: 600;
}

/* 标签页样式优化 */
.ant-tabs-tab {
  font-size: 18px !important;
  font-weight: bold !important;
  padding: 12px 24px !important;
  border-radius: 16px !important;
  transition: all 0.3s ease !important;
}

.ant-tabs-tab:hover {
  background: rgba(135, 206, 235, 0.2);
  transform: scale(1.05);
}

.ant-tabs-tab-active {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.3), rgba(244, 208, 63, 0.3)) !important;
  border-radius: 16px !important;
}

/* 进度条样式优化 */
.ant-progress-line {
  border-radius: 10px;
}

.ant-progress-bg {
  border-radius: 10px !important;
}

/* 列表项样式优化 */
.ant-list-item {
  border-radius: 12px;
  padding: 16px !important;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.ant-list-item:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateX(4px);
}

/* Ant Design 移动端适配 */
@media (max-width: 576px) {
  .ant-layout-header {
    padding: 0 12px !important;
  }

  .ant-tabs-nav {
    margin: 0 !important;
  }

  .ant-tabs-tab {
    font-size: 16px !important;
    padding: 10px 16px !important;
  }
}

@media (max-width: 768px) {
  .ant-col {
    margin-bottom: 4px;
  }
}

/* ========== 登录页Logo呼吸动画 ========== */
@keyframes logoBreath {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.95;
  }
}

/* ========== 任务卡片按钮动效 ========== */

/* 完成按钮点击缩放反馈 */
.task-complete-btn:active {
  transform: scale(0.95);
  filter: brightness(0.9);
  transition: transform 0.1s, filter 0.1s;
}

/* ========== 称号横向滚动区样式 ========== */

/* 横向滚动容器：隐藏滚动条，启用弹性滚动 */
.title-scroll-container {
  display: flex;
  flex-direction: row;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  /* 隐藏滚动条 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.title-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

/* 称号滚动卡片：固定宽度，flex不收缩 */
.title-scroll-card {
  flex-shrink: 0;
  width: 150px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.title-scroll-card:active {
  transform: scale(1.02);
}

/* 居中模式（≤3张卡片） */
.title-scroll-container.center-mode {
  justify-content: center;
  flex-wrap: nowrap;
}

/* 已获得称号滚动卡片（统一规格） */
.title-scroll-card.earned {
  width: 150px;
}


/* 周报大图弹窗：锁背景滚动 */
.learnie-body-lock {
  overflow: hidden !important;
  touch-action: none;
}

.policy-content h1 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #FF9A76;
}

.policy-content h2 {
  font-size: 16px;
  font-weight: 700;
  color: #444;
  margin: 24px 0 12px;
}

.policy-content h3 {
  font-size: 14px;
  font-weight: 700;
  color: #555;
  margin: 18px 0 8px;
}

.policy-content p {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin: 0 0 10px;
}

.policy-content strong {
  font-weight: 600;
  color: #222;
}

.policy-content ul {
  margin: 6px 0 10px 20px;
  padding: 0;
  list-style: disc;
}

.policy-content ul li {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 4px;
}

.policy-content hr {
  border: none;
  border-top: 1px solid #F0F0F0;
  margin: 20px 0;
}

.policy-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}

.policy-content table td,
.policy-content table th {
  border: 1px solid #EEEEEE;
  padding: 8px 12px;
  text-align: left;
}

.policy-content table th {
  background: #FFF9F5;
  font-weight: 600;
}
