/* ============================================
 * effect-engine.css —— 动效引擎管理面板样式（跟随后台主题体系）
 * 布局与主题引擎管理一致：工具栏 + 卡片 + 选项网格
 * ============================================ */

#effect-engine.section.active {
  display: block;
  min-height: 0;
  padding: 0;
}

.effect-engine-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: max(480px, calc(100vh - 150px));
  color: var(--admin-panel-text-strong);
}

.effect-engine-card {
  background: var(--wb-theme-surface-bg);
  border: 1px solid var(--wb-theme-surface-border);
  border-radius: 12px;
  box-shadow: var(--admin-panel-shadow-soft);
}

.effect-engine-card {
  padding: 18px 20px;
}

.effect-engine-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.effect-engine-card h4 {
  font-size: 15px;
}

.effect-engine-card-meta {
  display: block;
  margin-top: 3px;
  color: var(--admin-panel-text-muted);
  font-size: 12px;
}

.effect-engine-duration {
  display: flex;
  align-items: center;
  gap: 16px;
}

.effect-engine-duration input[type="range"] {
  flex: 1 1 auto;
  min-width: 0;
  accent-color: var(--wb-theme-button-strong);
  cursor: pointer;
}

.effect-engine-duration-value {
  min-width: 56px;
  text-align: right;
  color: var(--wb-theme-button-strong);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.effect-engine-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.effect-engine-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid var(--wb-theme-surface-border);
  border-radius: var(--admin-tab-radius, 8px);
  background: var(--wb-theme-surface-bg);
  color: var(--wb-theme-button-soft-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.effect-engine-option:hover {
  border-color: var(--wb-theme-button-strong);
  background: var(--admin-panel-surface-soft);
  color: var(--admin-panel-text-strong);
}

.effect-engine-option.is-active {
  border-color: var(--wb-theme-button-border);
  background: var(--wb-theme-button-strong);
  color: var(--wb-theme-button-text);
  font-weight: 600;
  box-shadow: none;
}

/* ===== 类型标签：复用系统 .member-management-view-tab 样式，自动跟随主题 ===== */
.effect-engine-cat-body {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.effect-engine-cat-body.is-active {
  display: flex;
}

.effect-engine-duration-card {
  margin-bottom: 2px;
}

/* ===== 按钮点击动效（全局按钮反馈） ===== */
.effect-btn-scale { animation: effectBtnScale var(--switch-effect-duration, .3s) ease; }
.effect-btn-ripple { animation: effectBtnRipple var(--switch-effect-duration, .3s) ease-out; }
.effect-btn-glow { animation: effectBtnGlow var(--switch-effect-duration, .3s) ease-out; }
.effect-btn-bounce { animation: effectBtnBounce var(--switch-effect-duration, .3s) cubic-bezier(.34, 1.56, .64, 1); }

@keyframes effectBtnScale {
  0% { transform: scale(1); }
  40% { transform: scale(.93); }
  100% { transform: scale(1); }
}
@keyframes effectBtnRipple {
  0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--wb-theme-button-strong) 45%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 14px transparent; }
}
@keyframes effectBtnGlow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--wb-theme-button-strong) 50%, transparent); }
  100% { box-shadow: 0 0 0 16px transparent; }
}
@keyframes effectBtnBounce {
  0% { transform: scale(1); }
  35% { transform: scale(.9); }
  70% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* ===== 弹窗打开动效（由动效引擎配置控制） ===== */
.effect-modal-pop { animation: effectModalPop var(--switch-effect-duration, .3s) cubic-bezier(.34, 1.56, .64, 1); }
.effect-modal-zoom { animation: effectModalZoom var(--switch-effect-duration, .3s) ease; }
.effect-modal-slide-up { animation: effectModalSlideUp var(--switch-effect-duration, .3s) ease; }
.effect-modal-fade { animation: effectModalFade var(--switch-effect-duration, .3s) ease; }
.effect-modal-rotate { animation: effectModalRotate var(--switch-effect-duration, .3s) ease; }

@keyframes effectModalPop {
  0% { opacity: .4; transform: scale(.82); }
  60% { transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes effectModalZoom {
  0% { opacity: .3; transform: scale(.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes effectModalSlideUp {
  0% { opacity: .4; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes effectModalFade {
  0% { opacity: .3; }
  100% { opacity: 1; }
}
@keyframes effectModalRotate {
  0% { opacity: .3; transform: rotateZ(-8deg) scale(.9); }
  100% { opacity: 1; transform: rotateZ(0deg) scale(1); }
}
