/* ============================================================
   CreationToast — 创作完成通知组件样式 (Phase 3)
   风格：粘土 Claymorphism
   ============================================================ */

/* ── 通知容器 ────────────────────────────────────────────────── */
.creation-toast-container {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* 容器不拦截点击，让透过的元素可点击 */
  max-width: calc(100vw - 32px);
}

/* ── 单个通知卡片 ────────────────────────────────────────────── */
.creation-toast-item {
  position: relative;
  width: 340px;
  max-width: 100%;
  padding: 16px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFFDF7, #FFF5F7);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(180, 167, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(180, 167, 246, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;

  /* 入场动画起始状态 */
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

/* 堆叠偏移 */
.creation-toast-item {
  margin-bottom: calc(var(--ct-offset, 0px) * 0.35);
}

/* 入场激活 */
.creation-toast-item.ct-enter {
  transform: translateY(0);
  opacity: 1;
}

/* 出场（向右滑出） */
.creation-toast-item.ct-leaving {
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  transition: transform 0.28s ease-in, opacity 0.2s ease;
}

/* ── 左区域：图标 + 文字 ────────────────────────────────────── */
.ct-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.ct-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  animation: ct-icon-bounce 0.4s ease 0.3s both;
}

@keyframes ct-icon-bounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.ct-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ct-title {
  font-family: 'Baloo 2', 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #4A3F7A;
  line-height: 1.3;
}

.ct-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  color: #718096;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

/* ── 缩略图 ──────────────────────────────────────────────────── */
.ct-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ct-thumb-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #E8E0FF, #FFE0EC);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ── "去看看"按钮 ────────────────────────────────────────────── */
.ct-view {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #B4A7F6, #FF8FA3);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(180, 167, 246, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  min-height: 40px;
  min-width: 56px;
  -webkit-tap-highlight-color: transparent;
}

.ct-view:active {
  transform: scale(0.95);
  box-shadow: 0 2px 6px rgba(180, 167, 246, 0.2);
}

/* ── 关闭按钮 ────────────────────────────────────────────────── */
.ct-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: #718096;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}

.ct-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #4A5568;
}

.ct-close:active {
  background: rgba(0, 0, 0, 0.18);
}

/* ── 响应式：窄屏适配 ────────────────────────────────────────── */
@media (max-width: 380px) {
  .creation-toast-container {
    right: 8px;
    left: 8px;
    max-width: none;
  }

  .creation-toast-item {
    width: auto;
    padding: 14px 12px;
    gap: 8px;
  }

  .ct-icon {
    font-size: 26px;
  }

  .ct-title {
    font-size: 14px;
  }

  .ct-subtitle {
    font-size: 11px;
    max-width: 100px;
  }

  .ct-thumb,
  .ct-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .ct-view {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 36px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Phase 3: 首页完成横幅 v36-completion-banner
   ═══════════════════════════════════════════════════════════════ */

.v36-completion-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #FFFDF7, #FFF5F7);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(180, 167, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(180, 167, 246, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  animation: v36-cb-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes v36-cb-slide-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.v36-completion-banner:active {
  transform: scale(0.98);
  box-shadow:
    0 3px 12px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(180, 167, 246, 0.12);
}

.v36-cb-icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
  animation: v36-cb-bounce 0.5s ease 0.2s both;
}

@keyframes v36-cb-bounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.v36-cb-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v36-cb-title {
  font-family: 'Baloo 2', 'Fredoka', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #4A3F7A;
  line-height: 1.4;
}

.v36-cb-type-icon {
  font-size: 20px;
  vertical-align: -2px;
}

.v36-cb-hint {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #B4A7F6;
}

.v36-cb-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.v36-cb-thumb-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #E8E0FF, #FFE0EC);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* ═══════════════════════════════════════════════════════════════
   Phase 3: TabBar 角标
   ═══════════════════════════════════════════════════════════════ */

.tabbar-badge {
  position: absolute;
  top: -2px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF6B9D, #FF3D6F);
  color: #fff;
  font-family: 'Nunito', -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 61, 111, 0.35);
  animation: tabbar-badge-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes tabbar-badge-pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* TabBar item 需要有 position: relative 以定位角标 */
.tab-item {
  position: relative;
}
