/* ==========================================================================
   nanhu clientarea theme · anim.css  动效增强层
   加载在 module.css 之后 · 只叠加动画/过渡，不改布局与配色 · 尊重 prefers-reduced-motion
   仅在用户中心（含购物车共用骨架）生效
   ========================================================================== */

/* ---------- 关键帧 ---------- */
@keyframes fx-fade-up   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fx-fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-fade-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes fx-pulse-soft{ 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes fx-stripes  { from { background-position: 1rem 0; } to { background-position: 0 0; } }

/* ---------- 页面标题栏 ---------- */
.page-title-box { animation: fx-fade-down .45s cubic-bezier(.22, .61, .36, 1) both; }

/* ---------- 侧边菜单：错峰滑入 ---------- */
.sky-sidebar .menu-title, .sky-sidebar .sub-menu > li, .sky-sidebar .nav-link {
  animation: fx-fade-in .4s ease both;
}
.sky-sidebar .sub-menu > li:nth-child(1) { animation-delay: .02s; }
.sky-sidebar .sub-menu > li:nth-child(2) { animation-delay: .06s; }
.sky-sidebar .sub-menu > li:nth-child(3) { animation-delay: .10s; }
.sky-sidebar .sub-menu > li:nth-child(4) { animation-delay: .14s; }
.sky-sidebar .sub-menu > li:nth-child(5) { animation-delay: .18s; }
.sky-sidebar .sub-menu > li:nth-child(6) { animation-delay: .22s; }
.sky-sidebar .nav-link { transition: transform .2s ease, color .2s ease, background .2s ease; }
.sky-sidebar .nav-link:hover { transform: translateX(3px); }

/* ---------- 顶部导航语言下拉：展开动画 ---------- */
.sky-navbar .sky-sidebarlanguage .sidebar-language-dropdown .language-dropdown-menu {
  animation: fx-fade-down .26s ease both;
}

/* ---------- 通用卡片：入场 + 悬浮抬升 ---------- */
.sky-card, .card { animation: fx-fade-up .5s cubic-bezier(.22, .61, .36, 1) both; }
.sky-card, .card, .dashboard-resource-card, .dashboard-todo-card, .balance-card,
.user-center_product, .user-center_safety, .latest-help-card, .newsInformation {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.sky-card:hover, .card:hover, .dashboard-resource-card:hover, .dashboard-todo-card:hover,
.balance-card:hover, .user-center_product:hover, .user-center_safety:hover,
.latest-help-card:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(255, 107, 26, .16); }

/* ---------- 用户信息卡：头像区闪现 ---------- */
.userInformation { animation: fx-fade-up .5s cubic-bezier(.22, .61, .36, 1) both; }

/* ---------- 通知 / 公告：滑入 + hover 右移 ---------- */
.notice-content, .top-notice { animation: fx-fade-up .5s cubic-bezier(.22, .61, .36, 1) both; }
.user-center_notice_item, .notice_item_title { transition: transform .2s ease, color .2s ease; }
.user-center_notice_item:hover { transform: translateX(4px); }

/* ---------- 表格：行 hover ---------- */
.table tbody tr { transition: background .2s ease; }
.table tbody tr:hover { background: #f2fbf7; }

/* ---------- 按钮：hover 抬升 ---------- */
.btn, .btn-primary, .menu-btn, .menuButtons {
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn:hover, .btn-primary:hover, .menu-btn:hover, .menuButtons:hover {
  transform: translateY(-1px); box-shadow: 0 8px 18px rgba(255, 107, 26, .22);
}

/* ---------- 进度条：条纹流动 ---------- */
.progress-bar { background-size: 1rem 1rem; animation: fx-stripes 1s linear infinite; }

/* ---------- 二维码区：淡入 ---------- */
.qrcode-section { animation: fx-fade-in .5s ease both; }

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
