/* ==========================================================================
   WeddingMe - Interactive Gifting & Guestbook (gift-long.css)
   Hunbei-style: Light Gift Modal + Dark Glass Bottom Bar
   ========================================================================== */

:root {
  --g-pink:        #ff4466;
  --g-pink-light:  #ff7a9a;
  --g-pink-bg:     rgba(255, 68, 102, 0.10);
  --g-pink-grad:   linear-gradient(135deg, #ff4466 0%, #ff7a9a 100%);
  --g-gold:        #f5a623;
  --g-gold-grad:   linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  --g-bar-bg:      rgba(28, 28, 36, 0.92);
  --g-bar-border:  rgba(255,255,255,0.10);
  --g-font:        -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", Helvetica, Arial, sans-serif;
}

/* === 1. Danmaku (Disabled per user request) === */
#gift-danmaku-container {
  display: none !important;
}

.danmaku-item {
  position: absolute;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-family: var(--g-font);
  font-size: 13px;
  left: 100%;
  animation: danmaku-fly linear forwards;
}
.danmaku-item .danmaku-gift-icon { width:18px; height:18px; object-fit:contain; }
.danmaku-item .danmaku-sender { font-weight:600; color:#ffb3c6; }

@keyframes danmaku-fly {
  from { left: 100%; }
  to   { left: -110%; }
}

/* === 2. Floating Bottom Bar (Hunbei exact 1:1: #toolbarNew & .toolbar) === */
#toolbarNew,
.toolbar-wrapper {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 9990;
  width: 100%;
  padding: 14px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 25%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.95) 100%) !important;
  background-size: 100% 100% !important;
  box-sizing: border-box;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease !important;
  will-change: transform, opacity;
}

#toolbarNew.toolbar-hidden,
.toolbar-wrapper.toolbar-hidden {
  transform: translateY(100%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#gift-bar-gift-btn,
#gift-bar-like-btn {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
}

.toolbar-btn-hidden {
  opacity: 0 !important;
  transform: scale(0.85) !important;
  pointer-events: none !important;
}

#toolbarNew .toolbar,
#gift-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  text-align: left;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  padding: 0 10px;
  box-sizing: border-box;
  pointer-events: auto;
  font-family: var(--g-font);
}

/* Reset all buttons and inputs inside toolbar */
#toolbarNew button,
#gift-bottom-bar button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* 1. Bar Left: Wish message input */
#toolbarNew .toolbar .bar-left,
#gift-bottom-bar .bar-left {
  position: relative;
  flex: 1;
  text-align: left;
  display: flex;
  align-items: center;
}

#toolbarNew .toolbar .bar-left .bar-mess,
#gift-bottom-bar .bar-left .bar-mess,
#gift-bottom-bar .gift-bar-wish-pill {
  width: 100%;
  height: 34px;
  line-height: 34px;
  padding: 0 30px 0 14px;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 34px;
  font-size: 12px;
  color: #ffffff;
  border: none;
  outline: none;
  cursor: pointer;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#toolbarNew .toolbar .bar-left .bar-mess::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

#toolbarNew .toolbar .bar-left .iconfont.icon-danmuliebiao1,
#gift-bottom-bar .bar-left .iconfont.icon-danmuliebiao1 {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2. Bar Center: 2 quick shortcut gifts */
#toolbarNew .toolbar .bar-center,
#gift-bottom-bar .bar-center,
#gift-bottom-bar .gift-bar-shortcuts {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
}

#toolbarNew .toolbar .bar-center .center-gift,
#gift-bottom-bar .bar-center .center-gift,
#gift-bottom-bar .gift-bar-shortcut-pill {
  height: 34px;
  padding: 0 8px;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s;
  box-sizing: border-box;
}
#toolbarNew .toolbar .bar-center .center-gift:active,
#gift-bottom-bar .bar-center .center-gift:active,
#gift-bottom-bar .gift-bar-shortcut-pill:active {
  transform: scale(0.95);
  background-color: rgba(0, 0, 0, 0.45);
}
#toolbarNew .toolbar .bar-center .center-gift img,
#gift-bottom-bar .bar-center .center-gift img,
#gift-bottom-bar .gift-bar-shortcut-pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}
#toolbarNew .toolbar .bar-center .center-gift span,
#gift-bottom-bar .bar-center .center-gift span,
#gift-bottom-bar .gift-bar-shortcut-pill span {
  font-size: 11px;
  color: #ffffff;
  font-weight: 500;
  white-space: nowrap;
}

/* 3. Bar Right: Gift Box Icon (Jumping) + Like Heart */
#toolbarNew .toolbar .bar-right,
#gift-bottom-bar .bar-right,
#gift-bottom-bar .gift-bar-actions {
  margin-left: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0;
}

#toolbarNew .toolbar .bar-right .bar-r-com,
#gift-bottom-bar .bar-right .bar-r-com,
#gift-bottom-bar .gift-bar-action-btn {
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
}

#toolbarNew .toolbar .bar-right .bar-r-com.bar-r-gift,
#gift-bottom-bar .bar-right .bar-r-com.bar-r-gift,
#gift-bottom-bar #gift-bar-gift-btn {
  width: 36px;
  height: 36px;
  transform-origin: center bottom;
  animation: giftJump 3s ease infinite;
  display: block;
}

@keyframes giftJump {
  0%, 24%, 48%, 100% {
    transform: translateZ(0);
  }
  12% {
    transform: translate3d(0, -8px, 0);
  }
  36% {
    transform: translate3d(0, -8px, 0);
  }
}

#toolbarNew .toolbar .bar-right .bar-heart,
#gift-bottom-bar .bar-right .bar-heart {
  position: relative;
  width: 36px;
  height: 36px;
  text-align: center;
}

#toolbarNew .toolbar .bar-right .bar-heart .bar-praise,
#gift-bottom-bar .bar-right .bar-heart .bar-praise,
#gift-bottom-bar .action-badge {
  position: absolute;
  max-width: 36px;
  height: 15px;
  line-height: 15px;
  right: 0;
  top: -2px;
  z-index: 3;
  font-size: 10px;
  color: #ffffff;
  border-radius: 6px;
  padding: 0 4px;
  box-sizing: border-box;
  white-space: nowrap;
  background-color: #f38200;
  transform: translateX(40%);
}

#toolbarNew .toolbar .bar-right .bar-zan,
#gift-bottom-bar .bar-right .bar-zan {
  position: relative;
  z-index: 2;
  height: 36px;
  width: 36px;
  box-sizing: border-box;
}
#toolbarNew .toolbar .bar-right .bar-zan img,
#gift-bottom-bar .bar-right .bar-zan img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
#toolbarNew .toolbar .bar-right .bar-zan .ani-num,
#gift-bottom-bar .bar-right .bar-zan .ani-num {
  position: absolute;
  top: 0;
  left: 10px;
  opacity: 0;
  font-size: 14px;
  color: #f07a87;
  font-weight: 700;
}
#toolbarNew .toolbar .bar-right .bar-zan.active .ani-num,
#gift-bottom-bar .bar-right .bar-zan.active .ani-num {
  animation: praiseNum 1.2s;
  animation-fill-mode: both;
}
@keyframes praiseNum {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-12px); }
  80% { opacity: 1; transform: translateY(-16px); }
  100% { opacity: 0; transform: translateY(-22px); }
}

#toolbarNew .toolbar .bar-right .bar-zan .stop-longtap,
#gift-bottom-bar .bar-right .bar-zan .stop-longtap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 1;
}

/* Floating heart */
.floating-heart {
  position: fixed; pointer-events: none; z-index: 99999;
  font-size: 22px;
  animation: floatHeart 1.2s ease-out forwards;
}
@keyframes floatHeart {
  0%   { opacity:1; transform:translate(0,0) scale(0.6); }
  50%  { transform:translate(calc(var(--rx,0)*1px),-65px) scale(1.2); }
  100% { opacity:0; transform:translate(calc(var(--rx,0)*1.5px),-140px) scale(1); }
}

/* === 3. Modal Overlay === */
.gift-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.50);
  z-index: 10000;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}
.gift-modal-overlay.active { opacity:1; visibility:visible; }

/* === 4. Wish Center Modal (Hunbei Hình 2: .bar-messwin) === */
.gift-modal-center {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  font-family: var(--g-font);
}
.gift-modal-center.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.bar-messwin {
  width: 300px;
  background: #ffffff url(/portal/images/gifts/mess-bg.png) no-repeat center top;
  background-size: 100% 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 18px 24px;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.30);
  box-sizing: border-box;
}

.bar-messwin .mess-logo {
  width: 165px;
  height: 106px;
  margin-top: -62px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.bar-messwin .mess-title {
  margin-top: 6px;
  font-weight: 600;
  font-size: 19px;
  color: #333333;
  text-align: center;
}

.bar-messwin .mess-input {
  width: 100%;
  height: 42px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(237, 85, 102, 0.40);
  margin-top: 14px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-sizing: border-box;
}

.bar-messwin .mess-input input {
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  color: #333333;
  border: none;
  outline: none;
  background: transparent;
}
.bar-messwin .mess-input input::placeholder {
  color: #999999;
}

.bar-messwin .mess-textarea {
  width: 100%;
  height: 86px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(237, 85, 102, 0.40);
  margin-top: 12px;
  padding: 10px 12px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  justify-content: space-between;
}

.bar-messwin .mess-textarea textarea {
  width: calc(100% - 28px);
  height: 100%;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  outline: none;
  border: none;
  background: transparent;
  color: #333333;
  line-height: 1.4;
}
.bar-messwin .mess-textarea textarea::placeholder {
  color: #999999;
}

.bar-messwin .mess-textarea .mess-select-btn {
  width: 24px;
  height: 24px;
  cursor: pointer;
  background: url(/portal/images/gifts/icon-wish-list.png) no-repeat center/contain;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.bar-messwin .mess-textarea .mess-select-btn:active {
  transform: scale(0.9);
}

.bar-messwin .mess-textarea .wish-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 20;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid rgba(237, 85, 102, 0.25);
  padding: 4px 12px;
  box-sizing: border-box;
}

.bar-messwin .mess-textarea .wish-dropdown .wish-item {
  padding: 8px 0;
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
  color: #333333;
  line-height: 1.4;
  text-align: left;
}
.bar-messwin .mess-textarea .wish-dropdown .wish-item:last-child {
  border-bottom: none;
}
.bar-messwin .mess-textarea .wish-dropdown .wish-item .wish-dot {
  color: #ff4874;
  margin-right: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.bar-messwin .bar-btm-box {
  width: 100%;
  height: 42px;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-messwin .bar-btm-box .voice-btn-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.bar-messwin .bar-btm-box .voice-btn-box .voice-btn {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.bar-messwin .bar-btm-box .voice-btn-box .voice-btn-text {
  font-size: 10px;
  color: #666666;
  line-height: 1;
  margin-top: 3px;
  text-align: center;
}

.bar-messwin .bar-btm-box .bar-m-sub {
  flex: 1;
  height: 42px;
  background: linear-gradient(270deg, #ff4874, #ff9061);
  border-radius: 21px;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 72, 116, 0.35);
  transition: transform 0.15s, opacity 0.2s;
  font-family: inherit;
}
.bar-messwin .bar-btm-box .bar-m-sub:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.bar-messwin .icon-cuowu2 {
  position: absolute;
  bottom: -56px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  transition: transform 0.15s;
}
.bar-messwin .icon-cuowu2:active {
  transform: translateX(-50%) scale(0.9);
}

/* === 5. Bottom Sheet (Hunbei exact 1:1: .bar-gift-new) === */
.bar-gift-new {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 480px;
  background-color: #ffffff;
  border-radius: 12px 12px 0 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  z-index: 10001;
  font-family: var(--g-font);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
  overflow: visible; /* Important: Allows streamer to float at top: -57px */
}
.bar-gift-new.active {
  transform: translate(-50%, 0);
}

/* Streamer capsule floating on top-left of bar-gift-new (hidden so it doesn't block choices) */
.bar-gift-new .streamer {
  display: none !important;
}
.bar-gift-new .streamer.streamer-pop {
  animation: streamerPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes streamerPop {
  0% { transform: scale(0.92); opacity: 0.8; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
.bar-gift-new .streamer .streamer-img {
  width: 170px;
  height: 42px;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 42px;
  object-fit: fill;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  background: linear-gradient(90deg, #ff4466 0%, #ff7a9a 60%, #ffb3c6 100%);
}
.bar-gift-new .streamer .s-messgae {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  border-radius: 42px;
  padding: 0 38px 0 5px;
  box-sizing: border-box;
}
.bar-gift-new .streamer .s-messgae .s-head {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-left: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.bar-gift-new .streamer .s-messgae .s-head img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bar-gift-new .streamer .s-messgae .s-content {
  margin-left: 6px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bar-gift-new .streamer .s-messgae .s-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  line-height: 1.2;
}
.bar-gift-new .streamer .s-messgae .s-gift {
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-gift-new .streamer .s-messgae .gaoguang {
  width: 116px;
  height: 42px;
  position: absolute;
  top: 0;
  animation: around 1.5s linear infinite alternate;
}
.bar-gift-new .streamer .s-gift-img {
  width: 64px;
  height: 64px;
  position: absolute;
  top: -15px;
  right: -6px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}
@keyframes around {
  0% { transform: translateX(-80%); }
  100% { transform: translateX(80%); }
}

/* Main bar-gift-box */
.bar-gift-new .bar-gift-box {
  position: relative;
}

.bar-gift-new .select-type {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  border-bottom: 1px solid #f0f0f0;
}

.bar-gift-new .select-type .option {
  width: 80px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #999999;
  position: relative;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}
.bar-gift-new .select-type .option.active {
  font-size: 14px;
  font-weight: 700;
  color: #ed5566;
}

.bar-gift-new .select-type .option img {
  width: 22px;
  height: 7px;
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
}
.bar-gift-new .select-type .option.active img {
  display: block;
}

.bar-gift-new .bar-gift-list {
  position: relative;
  width: 100%;
  padding: 4px 12px 6px;
  overflow: hidden;
  box-sizing: border-box;
}

.bar-gift-new .bar-gift-list .swiper-block {
  width: 100%;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.bar-gift-new .bar-gift-list .swiper-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  cursor: grab;
}

.bar-gift-new .bar-gift-list .swiper-container:active {
  cursor: grabbing;
}

.bar-gift-new .bar-gift-list .swiper-wrapper {
  display: flex;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.bar-gift-new .bar-gift-list .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.bar-gift-new .bar-gift-list .swiper-slide .gift-ul,
.bar-gift-new .bar-gift-list .gift-ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  row-gap: 4px;
  column-gap: 4px;
  box-sizing: border-box;
  padding: 2px 0;
}

.bar-gift-new .bar-gift-list .swiper-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  height: 12px;
}

.bar-gift-new .bar-gift-list .swiper-pagination .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dcdcdc;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-block;
}

.bar-gift-new .bar-gift-list .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  width: 14px;
  border-radius: 3px;
  background: #ed5566;
}

.bar-gift-new .bar-gift-list .gift-ul .gift-li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ffffff;
  padding: 4px 2px;
  cursor: pointer;
  transition: all 0.15s;
  box-sizing: border-box;
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li:active {
  transform: scale(0.95);
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li.active {
  background: #fff4f6;
  border-color: #ed5566;
  box-shadow: 0 2px 8px rgba(237, 85, 102, 0.15);
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li .title {
  font-size: 11px;
  color: #1e293b;
  margin-top: 3px;
  font-weight: 600;
  line-height: 1.25;
  height: 28px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  text-align: center;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-width: 100%;
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li.active .title {
  color: #ed5566;
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li .price {
  font-size: 10px;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}
.bar-gift-new .bar-gift-list .gift-ul .gift-li.active .price {
  color: #e11d48;
  font-weight: 600;
}

/* Custom cash view in sheet */
.bar-gift-new .bar-gift-cash {
  padding: 12px 14px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}
.bar-gift-new .bar-gift-cash .cash-banner-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  margin-bottom: 6px;
}
.bar-gift-new .bar-gift-cash .give-effect {
  width: 100%;
  height: 38px;
  background: #fff4f6;
  border-radius: 8px;
  border: 1px solid rgba(237, 85, 102, 0.4);
  padding: 0 12px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.bar-gift-new .bar-gift-cash .give-effect .effect-price {
  font-size: 12px;
  color: #333333;
}
.bar-gift-new .bar-gift-cash .give-effect .effect-price span {
  color: #ed5566;
  font-weight: 700;
  margin-right: 6px;
}
.bar-gift-new .bar-gift-cash .give-effect .effect-switch {
  margin-left: auto;
}
.bar-gift-new .bar-gift-cash .give-tip {
  font-size: 10px;
  color: #999999;
  margin-top: 6px;
  text-align: center;
}
.bar-gift-new .bar-gift-cash .give-tip span {
  font-weight: 600;
}
.bar-gift-new .bar-gift-cash .give-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 38px;
  border-radius: 8px;
  background: #f7f8f9;
  padding: 0 12px;
  margin-top: 8px;
  box-sizing: border-box;
}
.bar-gift-new .bar-gift-cash .give-price input {
  font-size: 15px;
  border: none;
  background: transparent;
  outline: none;
  font-weight: 600;
  color: #333333;
  width: 80%;
}
.bar-gift-new .bar-gift-cash .give-price span {
  font-size: 13px;
  color: #333333;
  font-weight: 600;
}
.bar-gift-new .bar-gift-cash .gift-quick-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}
.bar-gift-new .bar-gift-cash .gift-amount-pill {
  background: #f7f8f9;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #444444;
  cursor: pointer;
  transition: all 0.15s;
}
.bar-gift-new .bar-gift-cash .gift-amount-pill.selected {
  background: #fff4f6;
  border-color: #ed5566;
  color: #ed5566;
}
.bar-gift-new .bar-gift-cash .give-username {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bar-gift-new .bar-gift-cash .give-username input {
  flex: 1;
  height: 36px;
  background: #f7f8f9;
  border-radius: 36px;
  font-size: 14px;
  text-align: center;
  border: none;
  outline: none;
  color: #333;
}
.bar-gift-new .bar-gift-cash .give-username .cash-btn {
  width: 130px;
  height: 36px;
  background: #ed5566;
  border-radius: 36px;
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(237, 85, 102, 0.3);
}

/* Bottom footer of sheet: .gift-give-foot */
.bar-gift-new .gift-give-foot {
  display: flex;
  flex-flow: column;
  align-items: center;
  box-shadow: 0 -4px 10px 0 rgba(0, 0, 0, 0.04);
  border-radius: 8px 8px 0 0;
  padding: 6px 12px 8px;
  box-sizing: border-box;
}
.bar-gift-new .gift-give-foot .give-effect {
  width: 100%;
  height: 38px;
  background: #fff4f6;
  border-radius: 8px;
  border: 1px solid rgba(237, 85, 102, 0.40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-sizing: border-box;
}
.bar-gift-new .gift-give-foot .give-effect .effect-price {
  font-size: 12px;
  color: #333333;
  text-align: left;
  display: flex;
  align-items: center;
}
.bar-gift-new .gift-give-foot .give-effect .effect-price span {
  color: #ed5566;
  font-weight: 700;
  margin-right: 6px;
}
.bar-gift-new .gift-give-foot .give-effect .effect-switch {
  margin-left: auto;
}

/* Mint switch iOS */
.mint-switch {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.mint-switch-input {
  display: none;
}
.mint-switch-core {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 22px;
  border: 1px solid #d9d9d9;
  border-radius: 16px;
  box-sizing: border-box;
  background: #d9d9d9;
  transition: all 0.2s;
}
.mint-switch-core:after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.mint-switch-input:checked + .mint-switch-core {
  border-color: #ed5566;
  background-color: #ed5566;
}
.mint-switch-input:checked + .mint-switch-core:after {
  transform: translateX(18px);
}

.bar-gift-new .gift-give-foot .give-tip {
  font-size: 10px;
  color: #999999;
  margin: 6px 0 6px;
  text-align: center;
}
.bar-gift-new .gift-give-foot .give-tip span {
  font-weight: 600;
}

.bar-gift-new .gift-give-foot .give-username {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.bar-gift-new .gift-give-foot .give-username input {
  flex: 1;
  height: 36px;
  background: #f7f8f9;
  border-radius: 36px;
  font-size: 14px;
  text-align: center;
  border: none;
  outline: none;
  color: #333333;
  box-sizing: border-box;
}
.bar-gift-new .gift-give-foot .give-username .cash-btn {
  width: 130px;
  height: 36px;
  background: #ed5566;
  border-radius: 36px;
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(237, 85, 102, 0.30);
  transition: transform 0.15s, opacity 0.2s;
}
.bar-gift-new .gift-give-foot .give-username .cash-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* === Single Gift View: .give-gift (Hunbei exact 1:1) === */
.bar-gift-new .give-gift {
  width: 100%;
  height: 390px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  border-radius: 12px 12px 0 0;
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  flex-flow: column;
  z-index: 10;
  padding: 16px;
}
.bar-gift-new .give-gift .back {
  position: absolute;
  top: 14px;
  left: 14px;
  cursor: pointer;
  z-index: 2;
  color: #333333;
  display: flex;
  align-items: center;
}
.bar-gift-new .give-gift img.give-gift-preview-img {
  margin-top: 16px;
  width: 96px;
  height: 96px;
  object-fit: contain;
}
.bar-gift-new .give-gift .give-name {
  font-size: 16px;
  font-weight: 700;
  color: #333333;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-gift-new .give-gift .give-name span {
  font-size: 16px;
  font-weight: 700;
  color: #ed5566;
}
.bar-gift-new .give-gift .give-effect {
  width: 100%;
  height: 40px;
  background: #fff4f6;
  border-radius: 8px;
  border: 1px solid rgba(237, 85, 102, 0.4);
  margin-top: 14px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  box-sizing: border-box;
}
.bar-gift-new .give-gift .give-effect .effect-price {
  font-size: 12px;
  color: #333333;
  text-align: left;
}
.bar-gift-new .give-gift .give-effect .effect-price span {
  color: #ed5566;
  margin-right: 6px;
  font-weight: 700;
}
.bar-gift-new .give-gift .give-effect .effect-switch {
  margin-left: auto;
}
.bar-gift-new .give-gift .give-tip {
  font-size: 10px;
  color: #999999;
  margin-top: 8px;
  text-align: center;
}
.bar-gift-new .give-gift .give-tip span {
  font-weight: 600;
}
.bar-gift-new .give-gift input {
  background: #f2f3f6;
  text-align: center;
  width: 100%;
  height: 38px;
  border-radius: 38px;
  margin-top: 10px;
  font-size: 14px;
  border: none;
  outline: none;
  color: #333;
  box-sizing: border-box;
}
.bar-gift-new .give-gift .give-btn {
  background: #ed5566;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  border-radius: 38px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(237, 85, 102, 0.35);
  transition: transform 0.15s;
}
.bar-gift-new .give-gift .give-btn:active {
  transform: scale(0.96);
}

/* === 10. Checkout Card === */
.gift-checkout-card {
  position: fixed; top:50%; left:50%;
  transform: translate(-50%,-50%) scale(0.92);
  width: 90%; max-width: 360px;
  background: #fff; border-radius: 20px;
  padding: 20px 18px 18px;
  box-sizing: border-box; z-index: 10005;
  color: #222; font-family: var(--g-font);
  text-align: center;
  opacity: 0; visibility: hidden;
  transition: all 0.25s cubic-bezier(0.2,0.8,0.3,1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
}
.gift-checkout-card.active { transform:translate(-50%,-50%) scale(1); opacity:1; visibility:visible; }

.gift-checkout-header { position:relative; margin-bottom:12px; }

.gift-checkout-close {
  position: absolute; top:-6px; right:-4px;
  width:28px; height:28px; background:#f0f0f0; border:none; border-radius:14px;
  color:#555; font-size:15px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}

.gift-checkout-gift-preview {
  display:flex; align-items:center; justify-content:center;
  gap:10px; margin-bottom:10px;
}
.gift-checkout-gift-preview img { width:40px; height:40px; object-fit:contain; }
.gift-checkout-gift-preview .gift-summary-text { text-align:left; }
.gift-checkout-gift-preview .gift-name { font-weight:600; font-size:14px; color:#222; }
.gift-checkout-gift-preview .gift-price { color:var(--g-pink); font-weight:700; font-size:17px; }

.gift-qr-wrapper {
  background:#fff; border:1px solid #eee;
  padding:10px; border-radius:14px;
  display:inline-block; margin:4px auto 12px;
}
.gift-qr-wrapper img { width:180px; height:180px; display:block; object-fit:contain; }

.gift-checkout-timer {
  display:flex; align-items:center; justify-content:center;
  gap:6px; font-size:12px; color:#e67e00; margin-bottom:10px;
}

.gift-radar-pulse {
  width:8px; height:8px; background:#22c55e; border-radius:4px;
  animation: radarPulse 1.6s infinite;
}
@keyframes radarPulse {
  0%   { box-shadow:0 0 0 0 rgba(34,197,94,0.7); }
  70%  { box-shadow:0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow:0 0 0 0 rgba(34,197,94,0); }
}

.gift-checkout-details {
  background:#f7f7f9; border-radius:10px;
  padding:10px 12px; text-align:left;
  font-size:12px; color:#666; margin-bottom:10px;
}
.gift-checkout-row { display:flex; justify-content:space-between; margin-bottom:4px; gap:6px; }
.gift-checkout-row strong { color:#222; text-align:right; word-break:break-all; }

.gift-copy-code-btn {
  background:rgba(255,68,102,0.10); border:1px solid var(--g-pink);
  color:var(--g-pink); border-radius:6px; padding:2px 8px;
  font-size:11px; cursor:pointer; margin-left:4px; white-space:nowrap;
}
.gift-checkout-note { font-size:11px; color:#aaa; text-align:center; }

/* === 11. Fireworks Canvas === */
#gift-fireworks-canvas {
  position:fixed; inset:0;
  width:100vw; height:100vh;
  pointer-events:none; z-index:99999;
}

/* === 12. #giftLong Last Slide (Hunbei Hình 1 clone: #giftPage) === */
#giftLong {
  position: relative;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  background: #fbf7f8;
  color: #333333;
  font-family: var(--g-font);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 110px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  z-index: 10;
}

#giftLong::-webkit-scrollbar,
#giftPage::-webkit-scrollbar,
.gift-long-feed::-webkit-scrollbar,
.gift-long-feed-wrapper::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  -webkit-appearance: none !important;
  background: transparent !important;
}

#giftLong,
#giftPage,
.gift-long-feed,
.gift-long-feed-wrapper {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#giftPage {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#giftPage .gift {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  padding: 14px 14px 16px;
  box-sizing: border-box;
}

#giftPage .gift .gift-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
#giftPage .gift .gift-title .title-left {
  font-weight: 600;
  font-size: 16px;
  color: #333333;
}
#giftPage .gift .gift-title .title-right {
  font-size: 11px;
  color: #999999;
}

#giftPage .gift .swiper-block {
  width: 100%;
  overflow: hidden;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

#giftPage .gift .swiper-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
  cursor: grab;
}

#giftPage .gift .swiper-container:active {
  cursor: grabbing;
}

#giftPage .gift .swiper-wrapper {
  display: flex;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

#giftPage .gift .swiper-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

#giftPage .gift .swiper-slide .gift-ul,
#giftPage .gift .gift-ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 6px;
  padding: 4px 2px;
  box-sizing: border-box;
}

#giftPage .gift .swiper-slide .gift-ul .gift-li,
#giftPage .gift .gift-ul .gift-li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid transparent;
  padding: 6px 4px;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}
#giftPage .gift .swiper-slide .gift-ul .gift-li:active,
#giftPage .gift .gift-ul .gift-li:active {
  transform: scale(0.96);
}
#giftPage .gift .swiper-slide .gift-ul .gift-li.active,
#giftPage .gift .gift-ul .gift-li.active {
  background: #fff5f6;
  border: 1.5px solid #ed5566;
  box-shadow: 0 2px 8px rgba(237, 85, 102, 0.15);
}
#giftPage .gift .swiper-slide .gift-ul .gift-li img,
#giftPage .gift .gift-ul .gift-li img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.2s;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}
#giftPage .gift .swiper-slide .gift-ul .gift-li:hover img,
#giftPage .gift .gift-ul .gift-li:hover img {
  transform: scale(1.06);
}
#giftPage .gift .swiper-slide .gift-ul .gift-li .title,
#giftPage .gift .gift-ul .gift-li .title {
  font-size: 11.5px;
  font-weight: 600;
  color: #1e293b;
  margin-top: 4px;
  text-align: center;
  line-height: 1.25;
  height: 29px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-width: 100%;
}
#giftPage .gift .swiper-slide .gift-ul .gift-li.active .title,
#giftPage .gift .gift-ul .gift-li.active .title {
  color: #ed5566;
}
#giftPage .gift .swiper-slide .gift-ul .gift-li .price,
#giftPage .gift .gift-ul .gift-li .price {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
  text-align: center;
}
#giftPage .gift .swiper-slide .gift-ul .gift-li.active .price,
#giftPage .gift .gift-ul .gift-li.active .price {
  color: #e11d48;
  font-weight: 600;
}

#giftPage .gift .swiper-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 14px;
}
#giftPage .gift .swiper-pagination .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: all 0.25s ease;
  cursor: pointer;
  box-sizing: border-box;
  display: inline-block;
  opacity: 1;
}
#giftPage .gift .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  background: #ed5566;
  width: 16px;
  height: 6px;
  border-radius: 3px;
  transform: none;
}

#giftPage .gift .gift-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f6f6f6;
}
#giftPage .gift .gift-footer .footer-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
#giftPage .gift .gift-footer .footer-msg img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}
#giftPage .gift .gift-footer .footer-msg span {
  font-size: 12px;
  color: #475569;
  width: 100%;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  height: 26px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
#giftPage .gift .gift-footer .footer-btn {
  background: #ed5566;
  color: #ffffff;
  font-weight: 600;
  font-size: 12.5px;
  height: 30px;
  padding: 0 14px;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(237, 85, 102, 0.25);
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
#giftPage .gift .gift-footer .footer-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

/* Card 2: 祝福礼金 */
#giftPage .cash {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  padding: 14px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
#giftPage .cash .cash-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
#giftPage .cash .cash-left .cash-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffe9ec;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#giftPage .cash .cash-left .cash-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
#giftPage .cash .cash-left .cash-msg {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
#giftPage .cash .cash-left .cash-msg .cash-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
  text-align: left;
  white-space: nowrap;
}
#giftPage .cash .cash-left .cash-msg .cash-content {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#giftPage .cash .cash-btn {
  background: #ffffff;
  color: #ed5566;
  border: 1.2px solid #ed5566;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
#giftPage .cash .cash-btn:active {
  background: rgba(237, 85, 102, 0.08);
  transform: scale(0.96);
}

/* Stats bar */
.gift-long-stats-bar {
  display: flex;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.gift-long-stat-item {
  flex: 1;
  text-align: center;
}

.gift-long-stat-item:first-child {
  border-right: 1px solid #f2f2f2;
}

.gift-long-stat-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--g-pink);
}

.gift-long-stat-label {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

/* Feed */
.gift-long-feed-wrapper {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.gift-long-feed-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

.gift-long-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gift-long-feed-empty {
  text-align: center;
  padding: 24px 10px;
  color: #bbb;
  font-size: 13px;
}

.gift-feed-card {
  background: #fff;
  border: 1px solid #fde;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: 0 1px 6px rgba(255, 68, 102, 0.08);
}

.gift-feed-card-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 20px;
  background: #fff0f3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-feed-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.gift-feed-content {
  flex: 1;
  min-width: 0;
}

.gift-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.gift-feed-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--g-pink);
}

.gift-feed-time {
  font-size: 10px;
  color: #ccc;
}

.gift-feed-gift-title {
  font-size: 12px;
  color: #e67e00;
  font-weight: 500;
  margin-bottom: 3px;
}

.gift-feed-message {
  font-size: 13px;
  color: #555;
  line-height: 1.45;
  word-break: break-word;
}

/* === 13. Streamer Banner Floating (Hunbei 1:1, shown only on gift click) === */
.gift-streamer-container {
  position: fixed;
  bottom: 60px;
  left: 12px;
  z-index: 10010;
  pointer-events: none;
  font-family: var(--g-font);
  display: none;
}

.toolbar-gift {
  display: block;
  opacity: 0;
  transform: translate3d(-150%, 0, 0);
  transition: none;
}

.toolbar-gift.animate-in {
  animation: giftStreamerShow 4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes giftStreamerShow {
  0% {
    opacity: 0;
    transform: translate3d(-150%, 0, 0);
  }
  10%, 86% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  100% {
    opacity: 0;
    transform: translate3d(-40px, -20px, 0) scale(0.9);
  }
}

.toolbar-gift .streamer {
  width: 172px;
  height: 44px;
  position: relative;
  display: flex;
  align-items: center;
}

.toolbar-gift .streamer .streamer-img {
  width: 172px;
  height: 44px;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 22px;
  object-fit: fill;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.toolbar-gift .streamer .s-messgae {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  border-radius: 22px;
  padding: 0 38px 0 6px;
  box-sizing: border-box;
}

.toolbar-gift .streamer .s-messgae .s-head {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7);
  margin-right: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #ffffff;
}

.toolbar-gift .streamer .s-messgae .s-head img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.toolbar-gift .streamer .s-messgae .s-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.2;
}

.toolbar-gift .streamer .s-messgae .s-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.toolbar-gift .streamer .s-messgae .s-gift {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.toolbar-gift .streamer .s-messgae .gaoguang {
  width: 120px;
  height: 44px;
  position: absolute;
  top: 0;
  pointer-events: none;
  animation: streamerGaoGuang 1.6s linear infinite alternate;
}

@keyframes streamerGaoGuang {
  0%   { left: -100px; }
  100% { left: 180px; }
}

.toolbar-gift .streamer .s-gift-img {
  width: 58px;
  height: 58px;
  position: absolute;
  top: -12px;
  right: -8px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  pointer-events: none;
}

/* === 14. Center Hero Celebration Badge (Hunbei pop effect) === */
.gift-center-hero-badge {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 10005;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: heroBadgePop 2.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes heroBadgePop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  24% {
    transform: translate(-50%, -50%) scale(1);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -75%) scale(0.85);
  }
}

.gift-center-hero-badge .hero-burst-rays {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, rgba(255, 107, 129, 0.25) 50%, rgba(255, 255, 255, 0) 70%);
  animation: heroRaysSpin 4s linear infinite;
}

@keyframes heroRaysSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.gift-center-hero-badge .hero-gift-icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.gift-center-hero-badge .hero-gift-title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}



/* Nút đóng bottom sheet */
.bar-gift-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s;
}

.bar-gift-close:active {
  transform: scale(0.9);
  background: rgba(0, 0, 0, 0.12);
}

/* === 15. Hunbei 1:1 SVGA Celebration Player Containers === */
#svgaDemo,
#svgaPlay {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 500px;
  height: 100vh;
  z-index: 99998;
  pointer-events: none;
  overflow: hidden;
}

/* Khi mở bottom sheet chọn quà, vùng phát hiệu ứng nằm phía trên drawer */
#svgaDemo.sheet-open,
.gift-modal-open #svgaDemo {
  bottom: calc(320px + env(safe-area-inset-bottom, 0px));
  height: calc(100vh - 320px - env(safe-area-inset-bottom, 0px));
}

/* ─── System Template CTA End Page (Chuẩn 1:1 media_1791300648783.png) ─── */
.wm-cta-page-wrap {
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff7f9 0%, #fff1f4 45%, #ffffff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 24px 20px;
  font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  text-align: center;
}

#wm-cta-endpage.wm-cta-fullscreen-roll,
.wm-cta-fullscreen-roll {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  transform: translateY(100%) !important;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform;
  pointer-events: none !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 20px !important;
  background: linear-gradient(180deg, #fff7f9 0%, #fff1f4 45%, #ffffff 100%) !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden !important;
  font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  user-select: none !important;
  text-align: center !important;
}

#wm-cta-endpage.wm-cta-fullscreen-roll.active,
.wm-cta-fullscreen-roll.active,
#wm-cta-endpage.active {
  transform: translateY(0%) !important;
  pointer-events: auto !important;
}

body.cta-open #toolbarNew,
body.cta-open #gift-bottom-bar,
body.cta-open .toolbar-wrapper,
body.cta-open #h5-swipe-indicator {
  display: none !important;
}

.wm-cta-container {
  width: 100%;
  max-width: 340px;
  height: 100%;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  margin: auto 0;
  box-sizing: border-box;
}

.wm-cta-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin-top: 6px;
}

.wm-cta-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 14px;
  background: rgba(237, 85, 102, 0.08);
  color: #ed5566;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.wm-cta-title {
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 6px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wm-cta-subtitle {
  font-size: 13px;
  color: #8c767a;
  margin: 0;
  line-height: 1.45;
  text-align: center;
}

.wm-cta-envelope-area {
  position: relative;
  width: 240px;
  height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  flex-shrink: 0;
}

.wm-cta-card-preview {
  position: absolute;
  top: 8px;
  width: 165px;
  height: 165px;
  border-radius: 10px;
  background: #ffffff;
  border: 4px solid #ffffff;
  box-shadow: 0 12px 28px rgba(237, 85, 102, 0.22);
  overflow: hidden;
  transform: rotate(-2.5deg);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-cta-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wm-cta-envelope-pocket {
  position: absolute;
  bottom: 0;
  width: 220px;
  height: 125px;
  background: linear-gradient(180deg, #fcdbe2 0%, #f7c3ce 100%);
  border-radius: 12px 12px 16px 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
  z-index: 3;
  clip-path: polygon(0% 0%, 50% 36%, 100% 0%, 100% 100%, 0% 100%);
}

.wm-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 8px;
  margin-bottom: 6px;
}

.wm-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 230px;
  height: 46px;
  background: linear-gradient(135deg, #ff657e 0%, #ed5566 100%);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none !important;
  box-shadow: 0 8px 22px rgba(237, 85, 102, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.wm-cta-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 26px rgba(237, 85, 102, 0.48);
}

.wm-cta-btn:active {
  transform: scale(0.98);
}

.wm-cta-remove-link {
  background: transparent;
  border: none;
  color: #d8727d;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
  transition: color 0.15s;
}

.wm-cta-remove-link:hover {
  color: #b0434f;
}

/* ==========================================================================
   Floating Paid Gifts Shelf (Bottom-left, unobtrusive)
   ========================================================================== */
.gift-paid-shelf {
  position: fixed;
  bottom: 64px;
  left: 12px;
  z-index: 998;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: auto;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: none;
}
.gift-paid-shelf::-webkit-scrollbar {
  display: none;
}

.gift-paid-badge {
  display: flex;
  align-items: center;
  background: rgba(18, 20, 24, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 105, 135, 0.65);
  border-radius: 28px;
  padding: 3px 12px 3px 3px;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 10px rgba(255, 77, 109, 0.28);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  user-select: none;
  animation: giftBadgePop 0.4s ease-out;
}
.gift-paid-badge:hover {
  transform: scale(1.06);
  border-color: #ff4d6d;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(255, 77, 109, 0.5);
}
.gift-paid-badge:active {
  transform: scale(0.96);
}
.gift-paid-badge .badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.gift-paid-badge .badge-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.gift-paid-badge .badge-sender {
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Be Vietnam Pro', -apple-system, sans-serif;
}
.gift-paid-badge .badge-gift {
  color: #ffccd5;
  font-size: 9.5px;
  font-weight: 500;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes giftBadgePop {
  0% { transform: scale(0.5) translateY(12px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ==========================================================================
   Notice Modal: Preview / Non-Subdomain Notice Dialog
   ========================================================================== */
.gift-notice-win {
  background: #ffffff !important;
  background-image: none !important;
  padding: 32px 24px 24px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  font-family: 'Be Vietnam Pro', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  width: 320px !important;
  max-width: 90vw !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3) !important;
  box-sizing: border-box !important;
}

.gift-notice-icon {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fef3c7;
}

.gift-notice-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #1e2329 !important;
  margin-bottom: 10px !important;
  letter-spacing: -0.2px !important;
}

.gift-notice-desc {
  font-size: 13.5px !important;
  line-height: 1.55 !important;
  color: #4b5563 !important;
  margin-bottom: 22px !important;
}

.gift-notice-btn {
  width: 100% !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
  outline: none !important;
}

.gift-notice-btn:active {
  transform: scale(0.98) !important;
}

/* ==========================================================================
   Full Interaction Assurance: Ensure all buttons and inputs are visible
   ========================================================================== */
#gift-bar-wish-btn,
.bar-mess,
#gift-bottom-bar .bar-left,
#gift-wish-modal,
.bar-messwin,
#gift-wish-submit-btn,
#gift-modal-name,
#gift-modal-submit-btn,
#gift-modal-cash-name,
#gift-modal-cash-submit-btn,
#gift-single-give-name,
#gift-single-give-submit,
.give-username,
#gift-envelope-btn,
#gift-page-send-btn,
#gift-bar-gift-btn,
#gift-tab-gifts,
#gift-tab-custom {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}

.give-username {
  display: flex !important;
}

#gift-modal-cash-submit-btn,
#gift-modal-submit-btn,
#gift-single-give-submit {
  display: flex !important;
}

#gift-wish-submit-btn {
  display: block !important;
}

/* Fallback reset for any stale cache applying body.gift-restricted-mode */
body.gift-restricted-mode #gift-bar-wish-btn,
body.gift-restricted-mode .bar-mess,
body.gift-restricted-mode #gift-bottom-bar .bar-left,
body.gift-restricted-mode #gift-wish-modal,
body.gift-restricted-mode .bar-messwin,
body.gift-restricted-mode #gift-wish-submit-btn,
body.gift-restricted-mode #gift-modal-name,
body.gift-restricted-mode #gift-modal-submit-btn,
body.gift-restricted-mode #gift-modal-cash-name,
body.gift-restricted-mode #gift-modal-cash-submit-btn,
body.gift-restricted-mode #gift-single-give-name,
body.gift-restricted-mode #gift-single-give-submit,
body.gift-restricted-mode .give-username {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
body.gift-restricted-mode .give-username {
  display: flex !important;
}
body.gift-restricted-mode #gift-modal-cash-submit-btn,
body.gift-restricted-mode #gift-modal-submit-btn,
body.gift-restricted-mode #gift-single-give-submit {
  display: flex !important;
}
body.gift-restricted-mode #gift-wish-submit-btn {
  display: block !important;
}







