/* ==========================================================================
   RƯƠNG VÀNG THẦN THOẠI & POPUP GIFTCODE - MU LỤC ĐỊA XƯA (SIÊU MƯỢT KHÔNG LAG)
   ========================================================================== */

/* 1. KHỐI RƯƠNG BÁU TRÊN HERO BANNER (Nằm cao hơn & dịch sang phải Logo) */
.hero-chest-widget {
  position: absolute;
  top: -35px;
  right: -135px;
  translate: var(--hero-chest-offset-x, 0px) var(--hero-chest-offset-y, 0px);
  z-index: 35;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s ease, translate 0.25s ease;
}

@media (max-width: 1300px) {
  .hero-chest-widget {
    right: -100px;
    top: -30px;
    transform: scale(0.92);
  }
}

@media (max-width: 1100px) {
  .hero-chest-widget {
    right: -60px;
    top: -25px;
    transform: scale(0.85);
  }
}

@media (max-width: 860px) {
  .hero-chest-widget {
    right: 50%;
    transform: translateX(110px) scale(0.76);
    top: -20px;
  }
}

@media (max-width: 540px) {
  .hero-chest-widget {
    right: 50%;
    transform: translateX(80px) scale(0.68);
    top: -22px;
  }
}

/* 2. CHỈ DẪN NGÓN TAY CHỈ TỪ BÊN PHẢI SANG RƯƠNG: [Rương] [👈 Nhận Giftcode] */
.chest-cta-pointer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(180, 83, 9, 0.95));
  border: 1.5px solid #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  animation: pointerPointLeft 1.5s ease-in-out infinite;
  transform-origin: left center;
}

@keyframes pointerPointLeft {
  0%, 100% {
    transform: translateX(0px);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
  }
  50% {
    transform: translateX(-7px);
    box-shadow: 0 0 24px rgba(251, 191, 36, 1), 0 0 35px rgba(239, 68, 68, 0.85);
  }
}

.pointer-hand-icon {
  font-size: 15px;
  display: inline-block;
  animation: handWiggle 1.2s ease-in-out infinite alternate;
}

@keyframes handWiggle {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(10deg); }
}

.pointer-cta-text {
  font-size: 11.5px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px #f59e0b;
}

/* 3. KHỐI RƯƠNG SVG & HIỆU ỨNG ÁNH SÁNG */
.chest-interactive-box {
  position: relative;
  width: 120px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hào quang xoay thần thoại */
.chest-sunburst-rays {
  position: absolute;
  inset: -30px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.chest-sunburst-rays svg {
  width: 170px;
  height: 170px;
  animation: chestRaysSpin 40s linear infinite;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  fill: rgba(245, 158, 11, 0.35);
}

.hero-chest-widget:hover .chest-sunburst-rays svg {
  opacity: 0.85;
}

@keyframes chestRaysSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Vệt sáng ngang chói lòa (Anamorphic Lens Flare) */
.chest-lens-flare {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 135%;
  height: 6px;
  pointer-events: none;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flare-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #fff, #ffd700, transparent);
  animation: flarePulse 2.2s ease-in-out infinite;
}

@keyframes flarePulse {
  0%, 100% { opacity: 0.7; transform: scaleX(0.92); }
  50% { opacity: 1; transform: scaleX(1.15); }
}

/* 4. HOẠT ẢNH CHUYỂN ĐỘNG CỦA RƯƠNG (IDLE, HOVER RUMBLE, OPEN) */
.chest-svg-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease-out;
}

/* 4.1 Idle breathing */
@keyframes chestIdleBreathing {
  0%, 100% {
    transform: translateY(0px) scale(1, 1);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
  }
  35% {
    transform: translateY(-4px) scale(0.98, 1.02);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 18px rgba(245, 158, 11, 0.6));
  }
  70% {
    transform: translateY(2px) scale(1.02, 0.98);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.35));
  }
}

.chest-idle {
  animation: chestIdleBreathing 4.2s ease-in-out infinite;
}

/* 4.2 Hover Rumble Burst: Rung bần bật 0.42s rồi dừng */
@keyframes chestHoverRumble {
  0% { transform: scale(1) translate(0, 0) rotate(0deg); }
  12% { transform: scale(1.05) translate(-3px, -2px) rotate(-2deg); }
  25% { transform: scale(1.06) translate(3px, 2px) rotate(2deg); }
  38% { transform: scale(1.07) translate(-2px, 2px) rotate(-1.5deg); }
  50% { transform: scale(1.06) translate(2px, -2px) rotate(1.5deg); }
  65% { transform: scale(1.07) translate(-2px, -1px) rotate(-1deg); }
  80% { transform: scale(1.06) translate(2px, 1px) rotate(0.8deg); }
  92% { transform: scale(1.06) translate(-1px, 1px) rotate(-0.3deg); }
  100% { transform: scale(1.06) translate(0, -3px) rotate(0deg); }
}

.chest-rumble-burst {
  animation: chestHoverRumble 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

/* 4.3 Hover Ready Pose: Giữ thế ngưng rung, sẵn sàng nổ tung khi chuột vẫn hover */
.chest-ready-pose {
  transform: scale(1.06) translateY(-4px);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 22px rgba(251, 191, 36, 0.85));
  transition: transform 0.25s ease-out, filter 0.25s ease-out;
}

/* 4.4 3D Chest Lid Pop */
.chest-lid-group {
  transform-origin: 200px 145px;
  transition: transform 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chest-open .chest-lid-group {
  transform: translateY(-70px) rotateX(-58deg) scale(0.95);
}

/* Runes glow pulse */
@keyframes runeGlowPulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; filter: drop-shadow(0 0 8px #38bdf8); }
}

.rune-glow {
  animation: runeGlowPulse 2.8s ease-in-out infinite;
}

/* ==========================================================================
   5. FULLSCREEN FX CANVAS (Coin Explosion & Confetti - Zero lag)
   ========================================================================== */
.giftcode-chest-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99998;
}

/* ==========================================================================
   6. MODAL POPUP THẦN THOẠI KHAI MỞ GIFTCODE (LUÔN FIT FULL MÀN HÌNH)
   ========================================================================== */
.giftcode-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.giftcode-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Nền tối không dùng blur nặng để tránh giật lag GPU */
.giftcode-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 2, 10, 0.92);
  z-index: 1;
}

/* Container luôn nằm vừa vặn 1 màn hình */
.giftcode-modal-container {
  position: relative;
  z-index: 10;
  width: 96vw;
  max-width: 1080px;
  max-height: 95vh;
  height: auto;
  background: linear-gradient(180deg, rgba(20, 12, 34, 0.98) 0%, rgba(10, 6, 20, 0.99) 100%);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.95), 0 0 35px rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-sizing: border-box;
  overflow-y: auto;
  color: #fff;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.giftcode-modal-overlay.is-active .giftcode-modal-container {
  transform: scale(1);
}

/* Nút đóng (X) */
.giftcode-modal-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 20;
}

.giftcode-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg);
}

/* Header modal */
.giftcode-modal-header {
  text-align: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.giftcode-fomo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.85), rgba(217, 119, 6, 0.85));
  border: 1px solid #fbbf24;
  color: #ffd700;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.giftcode-modal-title {
  font-size: clamp(18px, 2.4vw, 25px);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fffbeb 0%, #fde047 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.5));
  margin: 0 0 4px 0;
}

.giftcode-modal-subtitle {
  font-size: 12px;
  color: #cbd5e1;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.4;
}

/* ==========================================================================
   7. THẺ BÀI GIFTCODE (HOLOGRAPHIC FOIL & 3D TILT)
   ========================================================================== */
.giftcode-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Thẻ đơn Holographic Thần Thoại (Mythic Ornate Frame) */
.holo-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, border-color 0.25s ease, box-shadow 0.25s ease;
  user-select: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), inset 0 0 30px rgba(0, 0, 0, 0.85);
}

/* 4 GÓC VÀNG HOÀNG GIA CHẠM KHẮC FANTASY MU (ORNATE CORNER BRACKETS) */
.card-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  z-index: 6;
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.8));
}
.card-corner-tl {
  top: 4px;
  left: 4px;
  border-top: 2.5px solid #ffd700;
  border-left: 2.5px solid #ffd700;
  border-top-left-radius: 6px;
}
.card-corner-tr {
  top: 4px;
  right: 4px;
  border-top: 2.5px solid #ffd700;
  border-right: 2.5px solid #ffd700;
  border-top-right-radius: 6px;
}
.card-corner-bl {
  bottom: 4px;
  left: 4px;
  border-bottom: 2.5px solid #ffd700;
  border-left: 2.5px solid #ffd700;
  border-bottom-left-radius: 6px;
}
.card-corner-br {
  bottom: 4px;
  right: 4px;
  border-bottom: 2.5px solid #ffd700;
  border-right: 2.5px solid #ffd700;
  border-bottom-right-radius: 6px;
}

/* Viên kim cương / đinh tán ngọc phát sáng ở mỗi đỉnh góc */
.card-corner::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #ffffff;
  border-radius: 1px;
  box-shadow: 0 0 4px #ffd700, 0 0 8px #ffd700;
  transform: rotate(45deg);
}
.card-corner-tl::after { top: -1px; left: -1px; }
.card-corner-tr::after { top: -1px; right: -1px; }
.card-corner-bl::after { bottom: -1px; left: -1px; }
.card-corner-br::after { bottom: -1px; right: -1px; }

/* Khung chỉ vàng chạm khắc bên trong thẻ (Inner Filigree Frame) */
.card-inner-frame {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 11px;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.65);
}

/* Hiệu ứng viền phát sáng quét nhẹ (Border Shimmer Aura) */
.card-border-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(135deg, transparent 20%, rgba(255, 215, 0, 0.15) 50%, transparent 80%);
  background-size: 200% 200%;
  animation: cardBorderGlowSweep 5s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes cardBorderGlowSweep {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* Lớp xà cừ cầu vồng phản chiếu Holographic Sheen */
.holo-card::before {
  content: '';
  position: absolute;
  top: -150%;
  left: -150%;
  width: 400%;
  height: 400%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 215, 0, 0.3) 45%,
    rgba(255, 75, 185, 0.3) 50%,
    rgba(0, 240, 255, 0.3) 55%,
    rgba(255, 255, 255, 0.1) 65%,
    transparent 80%
  );
  transform: rotate(var(--sheen-rot, 25deg)) translate(var(--sheen-x, 0%), var(--sheen-y, 0%));
  pointer-events: none;
  opacity: 0.65;
  mix-blend-mode: color-dodge;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.holo-card:hover::before {
  opacity: 0.95;
}

/* THEMES CHO CÁC THẺ BÀI - VIỀN KIM LOẠI DÀY & ĐẬM NÉT FANTASY */
/* 1. Theme Purple (Arcane Violet & Imperial Gold) */
.card-theme-purple {
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.5) 0%, rgba(18, 9, 36, 0.96) 100%);
  border: 2px solid #c084fc;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(168, 85, 247, 0.4), inset 0 0 25px rgba(88, 28, 135, 0.45);
}
.card-theme-purple:hover {
  border-color: #f3e8ff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(192, 132, 252, 0.75), inset 0 0 30px rgba(147, 51, 234, 0.6);
}
.card-theme-purple .btn-copy-code {
  background: linear-gradient(90deg, #9333ea, #6366f1);
}

/* 2. Theme Amber (Royal Gold & Flame Dragon) */
.card-theme-amber {
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.52) 0%, rgba(28, 14, 5, 0.96) 100%);
  border: 2.5px solid #fbbf24;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 25px rgba(245, 158, 11, 0.5), inset 0 0 25px rgba(180, 83, 9, 0.45);
}
.card-theme-amber:hover {
  border-color: #fef08a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 38px rgba(251, 191, 36, 0.85), inset 0 0 30px rgba(245, 158, 11, 0.7);
}
.card-theme-amber .btn-copy-code {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #07040d !important;
  font-weight: 900;
}

/* 3. Theme Cyan (Devias Ice Diamond) */
.card-theme-cyan {
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.5) 0%, rgba(5, 18, 30, 0.96) 100%);
  border: 2px solid #38bdf8;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(6, 182, 212, 0.4), inset 0 0 25px rgba(8, 145, 178, 0.45);
}
.card-theme-cyan:hover {
  border-color: #e0f2fe;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.75), inset 0 0 30px rgba(14, 165, 233, 0.6);
}
.card-theme-cyan .btn-copy-code {
  background: linear-gradient(90deg, #0891b2, #2563eb);
}

/* 4. Theme Red (Crimson Dragon Knight) */
.card-theme-red {
  background: linear-gradient(180deg, rgba(185, 28, 28, 0.5) 0%, rgba(28, 6, 6, 0.96) 100%);
  border: 2px solid #f87171;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(239, 68, 68, 0.4), inset 0 0 25px rgba(185, 28, 28, 0.45);
}
.card-theme-red:hover {
  border-color: #fee2e2;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(239, 68, 68, 0.75), inset 0 0 30px rgba(220, 38, 38, 0.6);
}
.card-theme-red .btn-copy-code {
  background: linear-gradient(90deg, #dc2626, #b91c1c);
}

/* 5. Theme Emerald (Ancient Chaos Jewel) */
.card-theme-emerald {
  background: linear-gradient(180deg, rgba(4, 120, 87, 0.5) 0%, rgba(5, 24, 16, 0.96) 100%);
  border: 2px solid #34d399;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 20px rgba(16, 185, 129, 0.4), inset 0 0 25px rgba(4, 120, 87, 0.45);
}
.card-theme-emerald:hover {
  border-color: #d1fae5;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 35px rgba(16, 185, 129, 0.75), inset 0 0 30px rgba(5, 150, 105, 0.6);
}
.card-theme-emerald .btn-copy-code {
  background: linear-gradient(90deg, #059669, #047857);
}

/* Ribbon ruy băng trên đỉnh thẻ */
.card-highlight-ribbon {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: #07040d;
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 12px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  z-index: 5;
}

/* Header trong thẻ */
.card-inner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.card-category-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.card-tier-tag {
  font-size: 10.5px;
  font-weight: 900;
  color: #ffd700;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.4);
}

/* Icon & Title */
.card-main-icon {
  font-size: 32px;
  text-align: center;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.card-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

.card-package-title {
  font-size: 14.5px;
  font-weight: 900;
  text-align: center;
  color: #fff;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

/* Danh sách quà */
.card-rewards-box {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: #e2e8f0;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 70px;
}

.reward-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  line-height: 1.35;
}

.reward-row:last-child {
  margin-bottom: 0;
}

.reward-bullet {
  color: #ffd700;
  font-size: 11px;
  flex-shrink: 0;
}

/* Code box & nút copy */
.card-code-val-box {
  background: rgba(0, 0, 0, 0.75);
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 6px;
  text-align: center;
  margin-bottom: 8px;
  font-family: monospace;
  font-size: 15px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 1.2px;
}

.btn-copy-code {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: none;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  color: #fff;
}

.btn-copy-code:active {
  transform: scale(0.97);
}

.btn-copy-code.is-copied {
  background: linear-gradient(90deg, #10b981, #059669) !important;
  color: #fff !important;
}

/* Hàng 2 nút hành động ngang hàng (Sao Chép Mã bên trái & Nút Zalo bên phải) */
.card-action-row {
  display: flex;
  gap: 7px;
  align-items: stretch;
}

.btn-copy-code.btn-half {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 8px 4px;
  font-size: 10.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nút liên kết Zalo phong cách MU Fantasy */
.btn-card-zalo {
  flex: 1;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(135deg, #0068ff 0%, #0084ff 50%, #00b4d8 100%);
  color: #ffffff !important;
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0, 104, 255, 0.45), inset 0 0 8px rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
  user-select: none;
}

.btn-card-zalo:hover {
  background: linear-gradient(135deg, #0077ff 0%, #0099ff 50%, #38bdf8 100%);
  border-color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.8), inset 0 0 12px rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-card-zalo:active {
  transform: scale(0.97);
}

.zalo-badge-icon {
  font-size: 12.5px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

.zalo-btn-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dòng chú thích Zalo nhận quà bên dưới nút */
.card-zalo-hint-text {
  font-size: 10px;
  color: #ffd700;
  text-align: center;
  margin-top: 6px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  padding: 0 4px;
  white-space: normal;
}

/* ==========================================================================
   8. KHUNG HƯỚNG DẪN 3 BƯỚC NHẬP CODE (HUD MMORPG GỌN GÀNG)
   ========================================================================== */
.giftcode-hud-instructions {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.giftcode-hud-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.giftcode-hud-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #fbbf24;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.giftcode-hud-countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #f87171;
  background: rgba(185, 28, 28, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 10px;
  border-radius: 12px;
}

.giftcode-hud-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.giftcode-hud-step {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #fbbf24;
  color: #fbbf24;
  font-weight: 900;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-info h4 {
  font-size: 11.5px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 2px 0;
}

.step-info p {
  font-size: 10.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.key-cap {
  display: inline-block;
  padding: 1px 5px;
  background: #1e293b;
  border: 1px solid #64748b;
  border-radius: 3px;
  color: #ffd700;
  font-family: monospace;
  font-weight: 800;
}

.cmd-code {
  color: #38bdf8;
  font-family: monospace;
  font-weight: 700;
}

.giftcode-hud-notice {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  color: #fef08a;
  line-height: 1.35;
}

.giftcode-hud-notice p {
  margin: 0;
}

/* ==========================================================================
   9. MODAL FOOTER & TOAST
   ========================================================================== */
.giftcode-modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-giftcode-reset {
  padding: 7px 18px;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid #fbbf24;
  color: #ffd700;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-giftcode-reset:hover {
  background: rgba(245, 158, 11, 0.35);
  transform: scale(1.03);
}

/* Toast */
.giftcode-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 99999;
  background: rgba(15, 23, 42, 0.96);
  border: 1.5px solid #10b981;
  color: #34d399;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
}

.giftcode-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
