/* WeddingMe TemplateCenter & CreateDesign Styling (Hunbei 1:1 Exact) */

/* Favorite & Star Icons (Hunbei 1:1) */
.icon-shoucang:before,
.icon-shoucangfill:before {
  content: "\e65d" !important;
}
.icon-shoucangoutline:before {
  content: "\e65e" !important;
}
.icon-shoucangjia:before {
  content: "\e63f" !important;
}
.iconfont.icon-like,
.icon-like {
  font-family: inherit !important;
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  background-color: rgb(237 85 102 / var(--un-bg-opacity));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.icon-like:before {
  content: "" !important;
}
.icon-shoucangfill {
  color: #FFB800;
}

/* 0. Common Utility Classes matching Hunbei Unocss */
.f-c-c {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wh-16 { width: 16px; height: 16px; }
.wh-24 { width: 24px; height: 24px; }
.wh-28 { width: 28px; height: 28px; }
.wh-30 { width: 30px; height: 30px; }
.wh-32 { width: 32px; height: 32px; }
.wh-40 { width: 40px; height: 40px; }
.wh-full { width: 100%; height: 100%; }

.text-11 { font-size: 11px; }
.text-12 { font-size: 12px; }
.text-13 { font-size: 13px; }
.text-14 { font-size: 14px; }
.text-16 { font-size: 16px; }
.text-20 { font-size: 20px; }
.text-22 { font-size: 22px; }

.text-#333 { color: #333333; }
.text-#666 { color: #666666; }
.text-#999 { color: #999999; }
.text-#fff { color: #ffffff; }

.rounded-4 { border-radius: 4px; }
.rounded-6 { border-radius: 6px; }
.rounded-8 { border-radius: 8px; }
.rounded-12 { border-radius: 12px; }

.gap-16 { gap: 16px; }
.gap-23 { gap: 23px; }
.min-w-940 { min-width: 940px; }

/* 1. Filter Classify (Hunbei 1:1) */
.filter-classify {
  width: 100%;
}

.filter-classify .select-style {
  --un-bg-opacity: 1;
  background-color: rgb(242 242 242 / var(--un-bg-opacity)) !important;
  font-weight: 600 !important;
  color: #333333 !important;
}

.filter-classify .select-hover:hover {
  --un-bg-opacity: 1;
  background-color: rgb(247 248 249 / var(--un-bg-opacity));
}

.filter-classify .more-state {
  height: auto !important;
  overflow: visible !important;
}

.filter-classify .custom-dropdown {
  z-index: 100;
}

.filter-classify input[type=text],
.filter-classify input[type=number] {
  -moz-appearance: textfield;
}

.filter-classify .border-shadow {
  border: 1px solid #e5e5e5;
  box-shadow: 0 6px 24px 2px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  background-color: #ffffff;
  z-index: 2099;
}

/* 2. Filter Sort Bar (Hunbei 1:1) */
#FilterSort .order-select {
  color: #333333 !important;
  font-weight: 600 !important;
}

#FilterSort .right-style {
  margin-right: 8px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  padding-left: 16px;
  padding-right: 16px;
  user-select: none;
  background-color: transparent;
  transition: background-color 0.2s;
}

#FilterSort .right-style:hover {
  --un-bg-opacity: 1;
  background-color: rgb(247 248 249 / var(--un-bg-opacity));
}

#FilterSort .right-select {
  --un-bg-opacity: 1 !important;
  background-color: rgb(242 242 242 / var(--un-bg-opacity)) !important;
  font-weight: 600 !important;
}

#FilterSort .border-shadow {
  border: 1px solid #e5e5e5;
  box-shadow: 0 6px 24px 2px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background-color: #ffffff;
  z-index: 2099;
}

#FilterSort .unify-select {
  --un-bg-opacity: 1;
  background-color: rgb(242 242 242 / var(--un-bg-opacity)) !important;
  font-weight: 600 !important;
}

#FilterSort .overturn {
  transform: rotate(180deg);
}

/* 3. Card Template Waterfall / Grid (Hunbei 1:1) */
.card {
  width: 100%;
}

.card .group {
  position: relative;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card .group:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.group .scence-type {
  position: absolute;
  bottom: 56px;
  right: 12px;
  z-index: 2;
  height: 20px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.group .handle-cover {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.group:hover .handle-cover {
  opacity: 1;
}

/* Template Hover Scrub Indicator (Hunbei 1:1) */
.thumb-scrub-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.15);
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.thumb-scrub-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ed5566, #ff758c);
  border-radius: 2px;
  transition: width 0.08s ease-out;
}

.group.has-tall-thumb .item-img {
  height: auto !important;
  max-height: none !important;
  min-height: 100% !important;
  object-fit: cover !important;
  transform-origin: top center !important;
}

.group.has-tall-thumb:hover .item-img {
  transform: none; /* override group-hover:scale-105 zoom so scrub transform is clean */
}

/* 4. CreateDesign View (Hunbei 1:1) */
.create-classify {
  margin-bottom: 32px;
}

.create-classify .cd-slider-container {
  position: relative;
  width: calc(100% - 448px);
  margin-left: 24px;
}

.create-classify .cd-arrow-overlay {
  position: absolute;
  top: 0;
  height: 100%;
  width: 40px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.create-classify .cd-arrow-overlay.left {
  left: 0;
  background: linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.create-classify .cd-arrow-overlay.right {
  right: 0;
  background: linear-gradient(270deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.create-classify .cd-arrow-btn {
  pointer-events: auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 2px 12px 1px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  user-select: none;
}

.create-classify .cd-arrow-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  transform: scale(1.08);
}

.create-classify .cd-slider-track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.create-classify .cd-slider-track::-webkit-scrollbar {
  display: none;
}

.cd-slider-card {
  width: 200px;
  flex-shrink: 0;
  margin-right: 24px;
  border-radius: 8px;
  cursor: pointer;
}

.cd-slider-card:last-child {
  margin-right: 0;
}

.cd-slider-thumb {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: #F7F8F9;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.cd-slider-card:hover .cd-slider-thumb {
  background-color: #F2F2F2;
}

.cd-slider-img {
  max-height: 152px;
  max-width: 152px;
  border-radius: 4px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.cd-slider-card:hover .cd-slider-img {
  transform: scale(1.05);
}

.cd-slider-hover-mask {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.2);
}

.cd-slider-card:hover .cd-slider-hover-mask {
  display: flex;
}

.cd-slider-title {
  height: 48px;
  width: 198px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #333333;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
  transition: all 0.2s ease;
}

.cd-slider-card:hover .cd-slider-title {
  font-weight: 600;
  color: #ed5566;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ed5566;
  color: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  user-select: none;
  border: none;
}

.btn-primary:hover {
  background-color: #d94455;
}

/* 5. Pagination matching Hunbei */
.portal-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
}

.portal-pagination-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333333;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  transition: all 0.2s;
}

.portal-pagination-btn:hover:not(:disabled) {
  border-color: #ed5566;
  color: #ed5566;
}

.portal-pagination-btn.active {
  background: #ed5566;
  border-color: #ed5566;
  color: #ffffff;
  font-weight: 600;
}

.portal-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 6. Waterfall Columns (Hunbei 1:1) */
.tc-waterfall-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* 7. Floating Quick Action Toolbar (Hunbei 1:1 #float-win) */
#float-win {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #ebebeb;
}
#float-win .f-item:last-child:after {
  display: none;
}
#float-win .f-item:after {
  pointer-events: none;
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  margin-left: -8px;
  width: 16px;
  height: 1px;
  background: #e5e5e5;
}
#float-win .f-item:hover {
  background: #f7f8f9;
}
#float-win .f-item:hover svg {
  color: #ed5566 !important;
}

/* 8. Live Preview Modal (Hunbei 1:1 #preview-tpl) */
#preview-tpl {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  padding-top: 60px;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: stretch;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-x: hidden;
  overflow-y: hidden;
}

#preview-tpl.open {
  display: flex;
  animation: fadeInModal 0.25s ease-out;
}

#preview-tpl.open .preview-tpl-container {
  animation: slideUpSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpSheet {
  from { transform: translateY(60px); opacity: 0.9; }
  to { transform: translateY(0); opacity: 1; }
}

#close-preview-tpl-btn {
  position: fixed;
  right: 42px;
  top: 20px;
  font-size: 26px;
  color: #ffffff;
  cursor: pointer;
  z-index: 10002;
  transition: opacity 0.2s, transform 0.2s;
}

#close-preview-tpl-btn:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

.preview-tpl-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  height: 100%;
  border-radius: 16px 16px 0 0;
  background: #ffffff;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-phone-device,
.mw-preview-phone-frame {
  width: 391px;
  max-width: 100%;
  height: 716px;
  background: #1e2329;
  border: 8px solid #1e2329;
  border-radius: 40px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  flex-shrink: 0;
}

.preview-phone-device .phone-notch,
.mw-preview-phone-frame .phone-notch {
  width: 36px;
  height: 4px;
  background: #1e2329;
  border-radius: 0 0 8px 8px;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#preview-phone-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  background: #fafafa;
}

#preview-phone-scroll::-webkit-scrollbar {
  width: 4px;
}
#preview-phone-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.preview-scroll-indicator {
  position: absolute;
  right: 12px;
  bottom: 16px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 12px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  z-index: 10;
}

.preview-tpl-info {
  width: 418px;
  border-radius: 8px;
  border: 1px solid #E5E5E5;
  padding: 24px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

#preview-tpl-scroll::-webkit-scrollbar {
  width: 6px;
}
#preview-tpl-scroll::-webkit-scrollbar-track {
  background: transparent;
}
#preview-tpl-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 6px;
}
#preview-tpl-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

@media (max-width: 1024px) {
  #preview-tpl {
    padding-top: 40px;
  }
  #close-preview-tpl-btn {
    right: 20px;
    top: 10px;
  }
  .preview-tpl-main {
    flex-direction: column;
    align-items: center;
  }
  .preview-tpl-info {
    width: 100% !important;
    max-width: 500px;
    margin-top: 20px;
  }
  #preview-tpl-scroll {
    padding: 16px 20px !important;
  }
}

@media (max-width: 640px) {
  #preview-tpl {
    padding-top: 0;
  }
  .preview-tpl-container {
    border-radius: 0;
  }
  .preview-phone-device {
    width: 300px;
    height: 520px;
  }
  #close-preview-tpl-btn {
    right: 14px;
    top: 10px;
    color: #333;
    z-index: 10005;
  }
}

/* 9. MyWorks (Quản lý tác phẩm - Hunbei 1:1 Exact) */
.my-works-page {
  background-color: #ffffff !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  padding: 0 40px 24px !important;
  box-sizing: border-box !important;
  flex-direction: column !important;
  position: relative !important;
}

.my-works-container {
  max-width: 1400px !important;
  margin: 0 auto !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* 1. Top Section (Fixed / Sticky Header, White background, Categories + Search + Stats) */
.mw-top-section {
  flex-shrink: 0;
  background: #ffffff;
  padding-top: 24px;
  padding-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.mw-top-section.is-scrolled {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.mw-top-toolbar {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  height: 40px;
}

.mw-type-tabs {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.mw-type-tabs li {
  height: 32px;
  line-height: 32px;
  padding: 0 16px;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333333;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.mw-type-tabs li:hover {
  background-color: #f7f8f9;
}

.mw-type-tabs li.active {
  background-color: #f2f2f2;
  color: #333333;
  font-weight: 700;
}

.mw-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mw-search-box {
  position: relative;
  width: 240px;
  height: 40px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: #ffffff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.mw-search-box:focus-within {
  border-color: #ed5566;
}

.mw-search-icon {
  flex-shrink: 0;
  margin-right: 8px;
}

.mw-search-box input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 14px;
  color: #333333;
  background: transparent;
}

.mw-search-box input::placeholder {
  color: #999999;
}

#mw-search-clear {
  border: none;
  background: transparent;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

#mw-search-clear:hover {
  color: #ed5566;
}

.mw-btn-create-design {
  height: 40px;
  width: 120px;
  border-radius: 8px;
  background: #ed5566;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  transition: background-color 0.2s;
  box-sizing: border-box;
  box-shadow: none;
}

.mw-btn-create-design:hover {
  background: #e54153;
  color: #ffffff !important;
}

/* 2. Stats Bar (Directly below Tabs, still on White background) */
.mw-stats-bar {
  margin-top: 16px;
  margin-bottom: 0;
  font-size: 14px;
  color: #666666;
  line-height: 20px;
}

.mw-stats-bar span {
  font-weight: normal;
  color: #666666;
}

/* 3. Gray Container wrapping the Cards List (Hunbei 1:1 rd-8 bg-[#F7F8F9]) */
.mw-works-scroll-wrap {
  background-color: #F7F8F9 !important;
  border-radius: 8px !important;
  padding: 30px 35px !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  width: 100% !important;
  box-sizing: border-box !important;
  -webkit-overflow-scrolling: touch !important;
}

.mw-works-scroll-wrap::-webkit-scrollbar {
  width: 6px !important;
}

.mw-works-scroll-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15) !important;
  border-radius: 4px !important;
}

.mw-works-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25) !important;
}

.mw-works-scroll-wrap::-webkit-scrollbar-track {
  background: transparent !important;
}

.mw-works-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 30px;
  justify-content: center;
}

@media (min-width: 1200px) {
  .mw-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1800px) {
  .mw-works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mw-work-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mw-work-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.mw-card-body {
  padding: 20px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 134px;
  box-sizing: border-box;
}

.mw-card-thumb-wrap {
  position: relative;
  width: 94px;
  height: 94px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f7f8f9;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.mw-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.mw-card-thumb-wrap:hover .mw-card-img {
  transform: scale(1.05);
}

.mw-card-badge-type {
  position: absolute;
  top: 0;
  left: 0;
  background: rgb(123, 170, 248);
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  height: 20px;
  min-width: 45px;
  padding: 0 4px;
  border-radius: 6px 0 6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 20px;
  z-index: 2;
}

.mw-card-info {
  margin-left: 16px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mw-card-title-row {
  display: flex;
  align-items: center;
  position: relative;
}

.mw-title-box {
  position: relative;
  max-width: 100%;
  font-size: 17px;
  font-weight: 700;
  color: #333333;
}

.mw-card-title-text {
  font-size: 17px;
  font-weight: 700;
  color: #333333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  line-height: 24px;
  transition: color 0.2s;
}

.mw-card-title-text:hover {
  color: #ed5566;
}

/* Strictly hide pencil icon and keep text layout width when editing */
.mw-card-title-row.is-editing .mw-btn-pencil,
.mw-card-title-row.is-editing .mw-btn-inline-edit {
  display: none !important;
}

.mw-card-title-row.is-editing .mw-card-title-text {
  visibility: hidden !important;
}

.mw-inline-title-input {
  display: none;
  position: absolute;
  inset: 0;
  bottom: -1px;
  width: 100%;
  max-width: 100%;
  height: 24px;
  line-height: 24px;
  background: #ffffff;
  border: none;
  border-bottom: 2px solid #ed5566;
  font-size: 17px;
  font-weight: 700;
  color: #333333;
  outline: none;
  padding: 0;
  box-sizing: content-box;
  z-index: 10;
}

.mw-btn-pencil {
  border: none;
  background: transparent;
  padding: 2px;
  margin-left: 5px;
  cursor: pointer;
  color: #666666;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.mw-btn-pencil:hover {
  color: #ed5566;
}

.mw-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.mw-tag-type {
  font-size: 14px;
  font-weight: 500;
  padding: 0 8px;
  height: 24px;
  min-width: 40px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mw-tag-long_page {
  background: #ffe9ec;
  color: #ed5566;
}

.mw-tag-h5 {
  background: #f0f7ff;
  color: #3b82f6;
}

.mw-tag-video {
  background: #fff7e6;
  color: #fa8c16;
}

.mw-tag-poster {
  background: #f6ffed;
  color: #52c41a;
}

.mw-card-date {
  font-size: 14px;
  color: #999999;
}

.mw-card-stats-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.mw-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #999999;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}

.mw-stat-item:hover {
  color: #ed5566;
}

.mw-stat-item b {
  color: #666666;
  font-weight: 600;
}

.mw-stat-arrow {
  font-size: 12px;
  color: #999999;
  margin-left: 2px;
}

.mw-card-extra {
  flex-shrink: 0;
}

.mw-btn-upgrade {
  position: absolute;
  right: 20px;
  top: 60px;
  height: 24px;
  padding: 0 10px;
  border-radius: 20px;
  background: #FFE9BF;
  color: #59423B;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.mw-btn-upgrade:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mw-card-footer {
  border-top: 1px solid #e5e5e5;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #ffffff;
  padding: 0 20px;
}

.mw-footer-action {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333333;
  transition: color 0.2s ease;
  position: relative;
  gap: 5px;
  user-select: none;
}

.mw-footer-action:hover {
  color: #ed5566;
}

.mw-footer-action svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.mw-footer-action:hover svg {
  transform: scale(1.1);
}

.mw-footer-action span {
  font-size: 14px;
  color: #333333;
  margin-top: 5px;
  line-height: 1.2;
  transition: color 0.2s;
}

.mw-footer-action:hover span {
  color: #ed5566;
}

/* Slide-up tray for 更多 (More Panel) matching Hunbei 1:1 */
.mw-more-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-radius: 0 0 12px 12px;
  background: #ffffff;
  box-shadow: 0px -4px 16px rgba(0, 0, 0, 0.08);
  border-top: 1px solid #ebebeb;
  animation: mwSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mwSlideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mw-more-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 8px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid #ebebeb;
  padding: 6px 0;
  z-index: 50;
  min-width: 120px;
  text-align: left;
}

.mw-popover-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #333333;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mw-popover-item:hover {
  background-color: #f7f8f9;
  color: #ed5566;
}

.mw-popover-delete {
  color: #e53e3e;
}

.mw-popover-delete:hover {
  background-color: #fff5f5;
  color: #c53030;
}

/* ========================================================
   All MyWorks Modals Overlay (Fixed Viewport & Highest Z-Index)
   ======================================================== */
#mw-share-modal,
#mw-rename-modal,
#mw-delete-modal,
#mw-download-modal,
#mw-feedback-modal,
#mw-views-modal,
#mw-upgrade-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.55) !important;
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#mw-share-modal {
  overflow-y: auto !important;
  padding: 0 !important;
}

#mw-share-modal[style*="display: none"],
#mw-rename-modal[style*="display: none"],
#mw-delete-modal[style*="display: none"],
#mw-download-modal[style*="display: none"],
#mw-feedback-modal[style*="display: none"],
#mw-views-modal[style*="display: none"],
#mw-upgrade-modal[style*="display: none"] {
  display: none !important;
}

#mw-share-modal[style*="display: flex"],
#mw-rename-modal[style*="display: flex"],
#mw-delete-modal[style*="display: flex"],
#mw-download-modal[style*="display: flex"],
#mw-feedback-modal[style*="display: flex"],
#mw-views-modal[style*="display: flex"],
#mw-upgrade-modal[style*="display: flex"] {
  display: flex !important;
}

/* Modal helper utilities */
.w-400 { width: 400px !important; }
.w-440 { width: 440px !important; }
.w-480 { width: 480px !important; }
.w-520 { width: 520px !important; }
.w-600 { width: 600px !important; }
.wh-56 { width: 56px !important; height: 56px !important; }
.wh-120 { width: 120px !important; height: 120px !important; }
.wh-128 { width: 128px !important; height: 128px !important; }
.wh-160 { width: 160px !important; height: 160px !important; }
.rounded-16 { border-radius: 16px !important; }
.rounded-12 { border-radius: 12px !important; }
.rounded-8 { border-radius: 8px !important; }

/* ========================================================
   Hunbei WorkPreview Modal (预览分享) 1:1 Styles
   ======================================================== */
#workPreview {
  width: 1000px !important;
  max-width: 95vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 1000000 !important;
}

.mw-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0;
  margin-bottom: 16px;
  border-bottom: none;
  flex-shrink: 0;
}

.mw-preview-title {
  font-size: 18px;
  font-weight: 600;
  color: #333333;
}

.mw-preview-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #909399;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}

.mw-preview-close:hover {
  color: #ed5566;
  background-color: rgba(0, 0, 0, 0.05);
}

.mw-preview-close svg {
  width: 20px;
  height: 20px;
}

.mw-preview-body {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Left Column */
.mw-preview-phone-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 100%;
}

/* Black Titanium CSS Phone Frame Mockup (calibrated clearly smaller than #workPreview modal) */
.mw-preview-phone-frame {
  position: relative;
  width: 360px;
  height: 716px;
  background-color: #1e2329;
  border-radius: 40px;
  border: 8px solid #1e2329;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Tai thỏ / Dynamic Island */
.mw-preview-phone-frame .phone-notch,
.preview-phone-device .phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  background-color: #1e2329;
  border-radius: 0 0 8px 8px;
  z-index: 10;
}

/* Home Indicator Bar */
.mw-preview-phone-frame .phone-home-indicator,
.preview-phone-device .phone-home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 4px;
  z-index: 15;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Header title ở đỉnh màn hình điện thoại */
.mw-preview-phone-screen .header-title,
.preview-phone-device .header-title,
.header-title {
  height: 42px;
  min-height: 42px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #333333 !important;
  border-bottom: 1px solid #f0f0f0;
  padding: 0 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', sans-serif;
  box-sizing: border-box;
}

/* Màn hình hiển thị iframe */
.mw-preview-phone-screen {
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  position: relative;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
}

.mw-preview-phone-screen::-webkit-scrollbar {
  display: none;
}

.mw-preview-phone-frame iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: none;
  display: block;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.mw-preview-phone-frame iframe::-webkit-scrollbar {
  display: none;
}

/* 3-Segment Page Navigation Bar (.p-a-btn) */
.mw-preview-phone-wrap .p-a-btn,
.preview-phone-device-wrap .p-a-btn,
.p-a-btn {
  margin-left: 14px;
  width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease;
  z-index: 20;
}

.mw-preview-phone-wrap .p-a-btn .up,
.mw-preview-phone-wrap .p-a-btn .down,
.preview-phone-device-wrap .p-a-btn .up,
.preview-phone-device-wrap .p-a-btn .down,
.p-a-btn .up,
.p-a-btn .down {
  width: 32px;
  background-color: #2b85ff;
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  padding: 10px 4px;
  user-select: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  box-sizing: border-box;
}

.mw-preview-phone-wrap .p-a-btn .up:hover:not(.disabled),
.mw-preview-phone-wrap .p-a-btn .down:hover:not(.disabled),
.preview-phone-device-wrap .p-a-btn .up:hover:not(.disabled),
.preview-phone-device-wrap .p-a-btn .down:hover:not(.disabled),
.p-a-btn .up:hover:not(.disabled),
.p-a-btn .down:hover:not(.disabled) {
  background-color: #1b75eb;
}

.mw-preview-phone-wrap .p-a-btn .up:active:not(.disabled),
.mw-preview-phone-wrap .p-a-btn .down:active:not(.disabled),
.preview-phone-device-wrap .p-a-btn .up:active:not(.disabled),
.preview-phone-device-wrap .p-a-btn .down:active:not(.disabled),
.p-a-btn .up:active:not(.disabled),
.p-a-btn .down:active:not(.disabled) {
  background-color: #1660c7;
}

.mw-preview-phone-wrap .p-a-btn .up.disabled,
.mw-preview-phone-wrap .p-a-btn .down.disabled,
.preview-phone-device-wrap .p-a-btn .up.disabled,
.preview-phone-device-wrap .p-a-btn .down.disabled,
.p-a-btn .up.disabled,
.p-a-btn .down.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.mw-preview-phone-wrap .p-a-btn .up,
.preview-phone-device-wrap .p-a-btn .up,
.p-a-btn .up {
  border-radius: 8px 8px 0 0;
}

.mw-preview-phone-wrap .p-a-btn .down,
.preview-phone-device-wrap .p-a-btn .down,
.p-a-btn .down {
  border-radius: 0 0 8px 8px;
}

.mw-preview-phone-wrap .p-a-btn .iconfont,
.preview-phone-device-wrap .p-a-btn .iconfont,
.p-a-btn .iconfont {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: #ffffff !important;
  line-height: 1 !important;
  flex-shrink: 0;
}

.mw-preview-phone-wrap .p-a-btn .iconfont svg,
.preview-phone-device-wrap .p-a-btn .iconfont svg,
.p-a-btn .iconfont svg {
  display: block;
  width: 14px;
  height: 14px;
  color: #ffffff;
  stroke: currentColor;
}

.mw-preview-phone-wrap .p-a-btn .p-a-text,
.preview-phone-device-wrap .p-a-btn .p-a-text,
.p-a-btn .p-a-text {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 2px;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
  white-space: nowrap;
}

.mw-preview-phone-wrap .p-a-btn .center,
.preview-phone-device-wrap .p-a-btn .center,
.p-a-btn .center {
  width: 32px;
  background-color: #1e2329;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
}

/* Right Column */
.mw-preview-right-col {
  flex: 1;
  height: 100%;
  max-height: min(780px, calc(100vh - 100px));
  overflow-y: auto;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mw-preview-card {
  border-radius: 12px;
  background: #F7F8F9;
  padding: 16px;
  border: 1px solid #f0f0f0;
  box-sizing: border-box;
}

.mw-preview-card-title {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.mw-preview-card-title .bar {
  width: 3px;
  height: 16px;
  border-radius: 4px;
  background: #ed5566;
  margin-right: 8px;
}

.mw-preview-card-title .text {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
}

/* Card 1: Share style */
.mw-preview-style-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.mw-preview-inputs {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mw-preview-input-wrap {
  height: 38px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  transition: border-color 0.2s;
}

.mw-preview-input-wrap:focus-within {
  border-color: #ed5566;
}

.mw-preview-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #333333;
  padding: 0;
}

.mw-preview-input-wrap .count {
  width: 48px;
  text-align: right;
  font-size: 12px;
  color: #999999;
  flex-shrink: 0;
}

.mw-preview-textarea-wrap {
  position: relative;
  height: 74px;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 12px;
  border: 1px solid #e5e5e5;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.mw-preview-textarea-wrap:focus-within {
  border-color: #ed5566;
}

.mw-preview-textarea-wrap textarea {
  width: 100%;
  height: 38px;
  resize: none;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: #333333;
  padding: 0;
  line-height: 1.5;
}

.mw-preview-textarea-wrap .count {
  position: absolute;
  bottom: 6px;
  right: 10px;
  width: 48px;
  text-align: right;
  font-size: 12px;
  color: #999999;
}

/* Cover trigger */
.mw-preview-cover-trigger {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
  background: #ffffff;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mw-preview-cover-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mw-preview-cover-trigger .change-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mw-preview-notice {
  margin-top: 12px;
  font-size: 13px;
  color: #999999;
  line-height: 20px;
}

.mw-preview-notice a {
  color: #ed5566;
  text-decoration: none;
}

.mw-preview-notice a:hover {
  text-decoration: underline;
}

/* Card 2: QR & Link */
.mw-preview-qr-subtitle {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333333;
  gap: 6px;
}

.mw-preview-qr-img {
  width: 128px;
  height: 128px;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: block;
  margin: 10px auto 0;
}

.mw-preview-link-bar {
  margin-top: 14px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 14px;
  border: 1px solid #e5e5e5;
  transition: border-color 0.2s;
}

.mw-preview-link-bar:hover {
  border-color: #d1d5db;
}

.mw-preview-link-left {
  display: flex;
  align-items: center;
  overflow: hidden;
  flex: 1;
  margin-right: 10px;
}

.mw-preview-link-left .label {
  color: #999999;
  font-size: 14px;
  white-space: nowrap;
  margin-right: 6px;
}

.mw-preview-link-left .url {
  color: #333333;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
}

.mw-preview-copy-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: #666666;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.mw-preview-copy-btn:hover {
  color: #1e2329;
  background-color: #f2f4f7;
}

/* Tooltip đã sao chép */
.mw-copy-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 50%;
  transform: translateX(50%) translateY(4px);
  background-color: #1e2329;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.mw-copy-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1e2329;
}

.mw-copy-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(50%) translateY(0);
}

/* Card 3: Toolbar & Switch */
.mw-preview-tb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mw-preview-tb-head .left {
  display: flex;
  align-items: center;
}

.mw-preview-tb-head .note {
  margin-left: 12px;
  font-size: 13px;
  color: #999999;
}

.mw-preview-tb-head .note span {
  color: #ed5566;
}

.mw-preview-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  cursor: pointer;
  margin-left: auto;
}

.mw-preview-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mw-preview-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d1d5db;
  transition: .3s;
  border-radius: 22px;
}

.mw-preview-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.mw-preview-switch input:checked + .mw-preview-slider {
  background-color: #ed5566;
}

.mw-preview-switch input:checked + .mw-preview-slider:before {
  transform: translateX(18px);
}

.mw-preview-tb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  font-size: 13px;
  color: #333333;
  margin-top: 14px;
}

.mw-preview-tb-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}

.mw-preview-tb-grid label:hover {
  color: #ed5566;
}

.mw-preview-tb-colors {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid #e5e5e5;
}

.mw-preview-tb-colors .color-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333333;
}

.mw-preview-tb-colors input[type="color"] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  background: #ffffff;
}

.edit-wximg {
  background: rgba(0, 0, 0, 0.4);
  position: absolute;
  width: 100%;
  top: 0;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.edit-wximg .pulse-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-61%, -40%);
  z-index: 9;
  width: 100px;
  height: 100px;
}

.edit-wximg .pulse-effect .pulse {
  position: absolute;
  left: 42px;
  top: 23px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(237, 85, 102, 0.85);
  box-shadow: 0 0 10px rgba(237, 85, 102, 0.6);
}

.edit-wximg .pulse-effect .pulse:before,
.edit-wximg .pulse-effect .pulse:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background-color: rgba(237, 85, 102, 0.85);
  animation: pulse 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.edit-wximg .pulse-effect .pulse:after {
  animation-delay: 0.7s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

.edit-wximg .hand-icon {
  width: 44px;
  height: 44px;
  margin-left: 20px;
  z-index: 10;
  animation: handWave 1.5s infinite ease-in-out;
  transform-origin: 70% 70%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

@keyframes handWave {
  0% {
    transform: rotate(0) scale(1);
  }
  25% {
    transform: rotate(-15deg) scale(0.95);
  }
  50% {
    transform: rotate(0) scale(1);
  }
  75% {
    transform: rotate(-15deg) scale(0.95);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}

/* Custom scrollbar for WorkPreview right column */
.mw-preview-scroll::-webkit-scrollbar {
  width: 6px;
}
.mw-preview-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.mw-preview-scroll::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 4px;
}
.mw-preview-scroll::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

/* Hunbei User Header Profile & Popover Dropdown (1:1 Exact) */
.wh-50 {
  width: 50px !important;
  height: 50px !important;
}
.w-280 {
  width: 280px !important;
}
.h-68 {
  height: 68px !important;
}
.mr-40 {
  margin-right: 40px !important;
}
.mr-80 {
  margin-right: 80px !important;
}
.user-header-profile {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  cursor: pointer;
}
.user-header-profile:hover #user-popover-dropdown,
.user-header-profile:focus-within #user-popover-dropdown,
#user-popover-dropdown:hover,
#user-popover-dropdown.is-active {
  display: block !important;
}
#user-popover-dropdown::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
  display: block;
}
.el-popper.el-popover {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 8px !important;
  box-shadow: 0px 2px 12px 1px rgba(0, 0, 0, 0.08) !important;
  padding: 20px !important;
  box-sizing: border-box;
  animation: elFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes elFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


