/* ============ Slime 斯莱姆主题 ============ */
:root, body, body[data-theme="light"]{
  --bg:#EAF5DC;--card-bg:#fff;--text:#1B3A0E;--text-sub:#5B8A3A;--text-light:#9CCC65;
  --border:#D6EAB9;--border-2:#C1E0A0;--primary:#7CB342;--primary-text:#fff;
  --top-bg:#7CB342;--top-text:#fff;--icon-bg:#7CB342;--icon-text:#fff;
  --shadow:0 4px 16px rgba(124,179,66,.18);
  --grad:linear-gradient(135deg,#AED581 0%,#7CB342 50%,#558B2F 100%);
--top-c1:#AED581;--top-c2:#558B2F;--bottom-c:#FFFFFF;}
body[data-theme="dark"]{
  --bg:#0F1A08;--card-bg:#1A2910;--text:#DCEFC6;--text-sub:#9CCC65;--text-light:#558B2F;
  --border:#2A3D18;--border-2:#3A4D28;--top-bg:#1A2910;--top-text:#DCEFC6;
  --icon-bg:#7CB342;--icon-text:#fff;
  --grad:linear-gradient(135deg,#2E4A1A 0%,#0F1A08 100%);
  --shadow:0 4px 16px rgba(0,0,0,.4);
--top-c1:#2E4A1A;--top-c2:#0F1A08;--bottom-c:#1A2910;}
body[data-theme="gold"]{
  --bg:#F5EFD8;--card-bg:#fff;--text:#3A2E0E;--text-sub:#8B7A3A;--text-light:#C9A44B;
  --border:#E8DFB9;--border-2:#D6C89A;--primary:#C9A44B;--primary-text:#fff;
  --top-bg:#C9A44B;--top-text:#fff;--icon-bg:#C9A44B;--icon-text:#fff;
  --grad:linear-gradient(135deg,#E8DFB9 0%,#C9A44B 100%);
--top-c1:#E8DFB9;--top-c2:#C9A44B;--bottom-c:#F5EFD8;}
body[data-theme="red"]{
  --bg:#F5E0E0;--card-bg:#fff;--text:#3A0E0E;--text-sub:#8B3A3A;--text-light:#C94B4B;
  --border:#E8B9B9;--border-2:#D69A9A;--primary:#C94B4B;--primary-text:#fff;
  --top-bg:#C94B4B;--top-text:#fff;--icon-bg:#C94B4B;--icon-text:#fff;
  --grad:linear-gradient(135deg,#E8B9B9 0%,#C94B4B 100%);
--top-c1:#E8B9B9;--top-c2:#C94B4B;--bottom-c:#F5E0E0;}
body[data-theme="purple"]{
  --bg:#EAE0F5;--card-bg:#fff;--text:#2A0E3A;--text-sub:#6B3A8B;--text-light:#9A4BC9;
  --border:#D6B9E8;--border-2:#C19AD6;--primary:#8B5CF6;--primary-text:#fff;
  --top-bg:#8B5CF6;--top-text:#fff;--icon-bg:#8B5CF6;--icon-text:#fff;
  --grad:linear-gradient(135deg,#C19AD6 0%,#8B5CF6 100%);
--top-c1:#C19AD6;--top-c2:#8B5CF6;--bottom-c:#EAE0F5;}
body[data-theme="blue"]{
  --bg:#E0EEF5;--card-bg:#fff;--text:#0E2A3A;--text-sub:#3A6B8B;--text-light:#4B9AC9;
  --border:#B9D6E8;--border-2:#9AC1D6;--primary:#3B82F6;--primary-text:#fff;
  --top-bg:#3B82F6;--top-text:#fff;--icon-bg:#3B82F6;--icon-text:#fff;
  --grad:linear-gradient(135deg,#9AC1D6 0%,#3B82F6 100%);
--top-c1:#9AC1D6;--top-c2:#3B82F6;--bottom-c:#E0EEF5;}

/* 卡片果冻挤压 */
.app-card,.tool-card,.my-grid-card,.notice-card,.lucky-btn{
  transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .25s;
}
.app-card:active,.tool-card:active,.my-grid-card:active,.notice-card:active,.lucky-btn:active{
  animation:slimeSquish .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slimeSquish{
  0%{transform:scale(1)}
  30%{transform:scale(1.06,.9)}
  55%{transform:scale(.95,1.05)}
  100%{transform:scale(1)}
}

/* 按钮弹性缩放 */
.btn-view,.btn-auth,.btn-logout,.soft-tab,.tab-item{
  transition:transform .2s cubic-bezier(.34,1.56,.64,1),background .2s,color .2s;
}
.btn-view:active,.btn-auth:active,.btn-logout:active,.soft-tab:active,.tab-item:active{
  animation:slimeBounce .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slimeBounce{
  0%{transform:scale(1)}
  35%{transform:scale(.88,1.12)}
  65%{transform:scale(1.12,.88)}
  100%{transform:scale(1)}
}

/* Tab 选中放大旋转 */
.tab-item.active .icon{
  transform:scale(1.15);
  filter:drop-shadow(0 2px 4px rgba(124,179,66,.5));
  animation:tabPop .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes tabPop{
  0%{transform:scale(1)}
  50%{transform:scale(1.35) rotate(-8deg)}
  100%{transform:scale(1.15)}
}

/* 页面软滑入 */
.page.active{animation:pageSlide .35s cubic-bezier(.34,1.56,.64,1)}
@keyframes pageSlide{
  0%{opacity:0;transform:translateY(8px) scale(.98)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}

/* 标题浮动 */
.top-bar h1{display:inline-block;animation:slimeFloat 3s ease-in-out infinite}
@keyframes slimeFloat{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-3px)}
}

/* 卡片入场 */
.app-card,.tool-card{animation:cardEnter .4s cubic-bezier(.34,1.56,.64,1) backwards}
.app-card:nth-child(1),.tool-card:nth-child(1){animation-delay:.02s}
.app-card:nth-child(2),.tool-card:nth-child(2){animation-delay:.06s}
.app-card:nth-child(3),.tool-card:nth-child(3){animation-delay:.10s}
.app-card:nth-child(4),.tool-card:nth-child(4){animation-delay:.14s}
.app-card:nth-child(5),.tool-card:nth-child(5){animation-delay:.18s}
.app-card:nth-child(6),.tool-card:nth-child(6){animation-delay:.22s}
@keyframes cardEnter{
  0%{opacity:0;transform:translateY(14px) scale(.94)}
  100%{opacity:1;transform:translateY(0) scale(1)}
}

.my-grid-icon,.my-avatar{background:linear-gradient(135deg,#AED581,#7CB342)!important;color:#fff!important}
.soft-tab.active{background:linear-gradient(135deg,#AED581,#7CB342);box-shadow:0 4px 12px rgba(124,179,66,.5)}
.lucky-btn{border:2px dashed #7CB342;background:linear-gradient(135deg,#F1F8E9,#E8F5E9)}
.app-icon{transition:transform .3s cubic-bezier(.34,1.56,.64,1)}
.app-card:hover .app-icon{transform:scale(1.1) rotate(-3deg)}
.tab-bar{background:linear-gradient(180deg,#fff 0%,#F1F8E9 100%);border-top:1px solid #D6EAB9}

/* 主题按钮可拖动 */
.theme-fab{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;transition:transform .2s}
.theme-fab.dragging{transition:none!important;transform:scale(1.15);opacity:.9}
/* 分享图标下移，避免和状态栏重叠 */
.top-bar .share-icon{top:62px!important}
.top-bar .top-actions{top:62px!important}


/* 卡片背景完整显示 */
.tool-card, .notice-card, .swiper-item, .app-icon img {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.tool-card .deco{display:none !important}

.tool-card .deco, .tool-card .tool-icon{display:none !important}

/* ==== App 内 top/bottom 紧凑 ==== */

.top-bar h1{font-size:20px !important;line-height:1.1 !important;margin:0 !important}
.top-bar p{font-size:11px !important;margin-top:3px !important;opacity:.7 !important}
.top-bar .share-icon{top:calc(10px + var(--sbt,0px)) !important}
.top-bar .share-icon .icon{width:22px !important;height:22px !important}

/* 底部系统导航栏 —— 用 tab-bar 主题色填充 */
.tab-bar{padding-bottom:calc(6px + var(--sbb,0px)) !important;background:var(--card-bg) !important}

/* ===== 顶栏最终样式 ===== */

.top-bar h1{font-size:22px !important;line-height:1.15 !important;margin:0 !important}
.top-bar p{font-size:11px !important;margin-top:3px !important;opacity:.75 !important}
.top-bar .share-icon{top:calc(14px + var(--sbt,0px)) !important}

/* 顶栏最终：padding-top 固定 12px（状态栏由 APP 顶条负责） */
.top-bar{padding:12px 20px 14px !important}
.top-bar h1{font-size:22px !important;line-height:1.15 !important;margin:0 !important}
.top-bar p{font-size:11px !important;margin-top:3px !important;opacity:.75 !important}
.top-bar .share-icon{top:14px !important}
