/* footer angpao icon */
    .nav-icon {
        position: relative; /* anchor for angpao */
        width: 40px;        /* example, use your actual size */
        height: 40px;
        background-size: cover;
    }

    .angpao-indicator {
        position: absolute;
        bottom: 0;   /* bottom of icon */
        right: -6px;    /* right of icon */
        font-size: 13px;  /* scales with parent */
        animation: bounce 1.2s infinite;
    }

    .ft-icon {
        position: relative; /* make this the anchor */
    }

    @keyframes bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-3px); }
    }

    /* Ensure alert is the positioning context */
    .alert {
      position: relative;
      padding: .75rem 1.25rem;
      margin-bottom: 1rem;
      border: 1px solid transparent;
      border-radius: .25rem;
      /* Optional: make layout nicer when text wraps */
      padding-right: 3.5rem; /* reserve space for the close button */
    }

    /* Make the message wrap nicely */
    .alert > span {
      display: block;           /* ensures it takes full width available */
      word-break: break-word;   /* wrap long words/URLs */
      margin-right: 0.5rem;
    }

    /* Force-close position to top-right no matter what */
    .alert .close {
      position: absolute !important;
      top: 0.25rem;             /* tweak to vertically align with alert border/padding */
      right: 0.25rem;           /* tweak horizontal position */
      z-index: 10;
      white-space: nowrap;
      padding: .75rem 1rem;
    }

/* angpao promo section */
  .angpao-heading-wrapper {
    text-align: center; /* ✅ centers all children */
    margin-bottom: 20px;
  }

  /* 🎁 Fancy promo title */
  .angpao-heading {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    color: #ffd700;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, #ffd700, #ffcc00, #ff6600, #ffd700);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerTitle 4s linear infinite;
    text-shadow: 0 0 8px rgba(255, 153, 0, 0.6), 0 0 14px rgba(255, 51, 0, 0.5);
  }

  @keyframes shimmerTitle {
    0% { background-position: 0% center; }
    100% { background-position: 300% center; }
  }

  /* ✨ Glowing divider */
  .angpao-divider {
    width: 160px;
    height: 4px;
    margin: 0 auto 25px auto;
    background: linear-gradient(90deg, transparent, #ffd700, #ff3300, #ffd700, transparent);
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px #ff9900, 0 0 20px #ff3300;
  }

  .angpao-divider::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shine 2s linear infinite;
  }

  @keyframes shine {
    0% { left: -50%; }
    100% { left: 150%; }
  }

  .angpao-container {
      /* display: flex;
      gap: 15px;
      flex-wrap: wrap; */
      display: grid;
      /* grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); */
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      gap: 15px;
      justify-content: center;
  }

  /* ✨ Titles & Amounts */
  .angpao-title {
    font-size: clamp(12px, 2vw, 14px);
    font-weight: bold;
    line-height: 1.4em;
  }

  .angpao-amount {
    font-size: clamp(14px, 3vw, 18px);
    color: yellow;
    font-weight: bold;
    margin: 6px 0;
  }

  .claim-btn {
    background: linear-gradient(145deg, #fff27a, #ffd700, #e6b800);
    color: #222;
    font-weight: bold;
    border: none;
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 3vw, 18px);
    border-radius: 25px;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 14px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,0.5);
    transition: all 0.2s ease;
  }

  .angpao-footer {
    margin-top: 8px;
    min-height: 24px;  /* ensures coin has its space */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .angpao-card .coin {
    width: clamp(14px, 4vw, 20px);
    height: clamp(14px, 4vw, 20px);
    flex-shrink: 0; /* don't shrink when card gets smaller */
  }

  .claim-btn:active {
    transform: translateY(2px);
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.4);
    background: linear-gradient(145deg, #e6b800, #ffd700, #fff27a);
  }

  .claim-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    overflow: visible;
    min-width: 70px;
    min-height: 30px;
    background: linear-gradient(145deg, #ffd700, #ff9900, #ff6600);
    animation: pulseGlow 1.2s infinite;
  }

  @keyframes pulseGlow {
    0% {
      box-shadow: 0 0 5px #ffd700, 0 0 10px #ff9900;
      transform: scale(1);
    }
    50% {
      box-shadow: 0 0 20px #ffcc00, 0 0 40px #ff6600;
      transform: scale(1.05);
    }
    100% {
      box-shadow: 0 0 5px #ffd700, 0 0 10px #ff9900;
      transform: scale(1);
    }
  }

  /* animated coin burst/glow */
  .claim-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 320%;              /* make it larger than button */
    height: 320%;
    transform: translate(-50%, -50%);
    background: url("/images/app/coin.gif") no-repeat center center;
    background-size: contain;
    z-index: 5;               /* sits above button */
    pointer-events: none;
  }

  /* Bounce only for active promos */
  .angpao-card:not(.disabled) .claim-btn {
    animation: bounceBtn 2.2s ease-in-out infinite;
  }

  @keyframes bounceBtn {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }

  /* ✨ Promo Card Layout */
  .angpao-card {
    border-radius: 12px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(6px, 2vw, 12px);
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
    background: linear-gradient(145deg, #ff8800, #ff5500);
    overflow: hidden;
    z-index: 0;

    /* aspect-ratio: 4 / 5; */
    max-width: 200px;   /* keep cards a fixed size */
    width: 100%;
  }

  /* Extra small phones (≤350px): force 3 per row */
  @media (max-width: 350px) {
    .angpao-card {
      flex: 1 1 calc(25% - 15px);
    }

    .angpao-container {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 767px) {
    .angpao-card {
      flex: 1 1 calc(25% - 15px);
    }

    .angpao-container {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  /* Tablet: 4 per row */
  @media (min-width: 768px) {
    .angpao-card {
      flex: 1 1 calc(25% - 15px);
      max-width: 180px;
    }
  }

  /* Desktop: 5 per row */
  @media (min-width: 1200px) {
    .angpao-card {
      flex: 1 1 calc(20% - 15px);
      max-width: 200px;
    }
  }

  /* 🔥 Walking border */
  .angpao-card::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 14px;
    background: linear-gradient(
      90deg,
      #ffd700,
      #ff0000,
      #ff6600,
      #ff3300,
      #ffd700
    );
    background-size: 400% 400%;
    animation: moveBorder 6s linear infinite;
    z-index: 1;
  }

  .angpao-card::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border-radius: 10px;
    background: linear-gradient(145deg, #d41414, #b00000);
    z-index: 2;
  }

  .angpao-card * {
    position: relative;
    z-index: 3;
  }

  @keyframes moveBorder {
    0%   { background-position: 0% 0%; }
    25%  { background-position: 100% 0%; }
    50%  { background-position: 100% 100%; }
    75%  { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
  }

  /* 🚫 Disabled promo */
  .angpao-card.disabled {
    opacity: 0.8;
    filter: grayscale(40%);
  }

  .angpao-card.disabled .claim-btn {
      pointer-events: none;   /* disable clicking */
      opacity: 0.6;           /* dim the button */
  }

  .angpao-card.disabled::before {
    background: linear-gradient(to bottom, #808080, #bfbfbf, #808080);
    animation: none;
  }

  /* ✨ Coin */
  .coin {
    width: clamp(12px, 4vw, 18px);
    height: clamp(12px, 4vw, 18px);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff6a3, #ffd700, #e6b800);
    border: 1.5px solid #cfa600;
    animation: spinCoin 1.2s linear infinite;
    margin: 0 auto;
    box-shadow: inset -1px -1px 2px rgba(0,0,0,0.25),
                inset 1px 1px 3px rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(7px, 2vw, 10px);
    font-weight: bold;
    color: #fff8d5;
    text-shadow: 0 0 2px #b8860b;
  }

  @keyframes spinCoin {
    0%   { transform: rotateY(0deg); }
    50%  { transform: rotateY(180deg); }
    100% { transform: rotateY(360deg); }
  }

  .angpao-card form {
    display: inline-block;
    margin: 0; /* remove default spacing */
  }
