
:root{
  --bg:#0b0b0f;
  --red1:#ff2a2a;
  --red2:#b30000;
  --red3:#6f0000;
  }
.lathinh-container #gameStage{
  position: fixed;
  z-index: 10000;
}
.lathinh-container #playNowBtn[disabled]{
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(35%);
}
.lathinh-container{
  display: none;
}
.lathinh-container.show {
    display: block;
    opacity: 1;
}
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.overlay.show {
  display: block;
}
.lathinh-container .login-backdrop{
  position: fixed;
  inset: 0;
  display: none;
  align-items:center;
  justify-content:center;
  padding: 14px;
  // background: rgba(0,0,0,.58);
  z-index: 100000;
}
.lathinh-container .login-backdrop.show{ display:flex; }

.lathinh-container .login-popup{
    width: min(420px, 96vw);
    border-radius: 16px;
    background: transparent;
    border: none;
    box-shadow: none;
    // overflow: hidden;
    position: relative;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/500x420_-_khung_nh_p_th_ng_tin_-_khai_ph_o.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.lathinh-container .login-input::placeholder {
  color: #E5E5E5;
  opacity: 0.5;
}
.lathinh-container .login-close{
    position: absolute;
    right: -6px;
    top: -12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-size: 27px;
    font-weight: 900;
    cursor: pointer;
    border-radius: 50%;
    height: 34px !important;
    background: #98181B;
}

/* THỂ LỆ dropdown trong login */
.lathinh-container .login-rule{
    margin: 0 12px 12px 12px;
    border-radius: 12px;
    // border: 1px solid rgba(255, 255, 255, .14);
    background: transparent;
    overflow: hidden;
  color: white;
}
.content-loc{
  text-align: center;
  color: white;
}
.lathinh-container .login-rule-head{
padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: white;
    background: linear-gradient(180deg, #ff3b3b, #b10000);
    width: 50%;
    height: 39px !important;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_th__l_.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

.lathinh-container .login-rule-head .chev{
  transition: transform .18s ease;
  font-size: 18px;
}
.lathinh-container .login-rule.open .login-rule-head .chev{ transform: rotate(180deg); }

/* nội dung thể lệ: mở ra có scroll nếu dài */
.lathinh-container .login-rule-body{
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .25s ease, opacity .18s ease, transform .18s ease;
  padding: 0 12px;
  overflow-y: auto;             /* ✅ scroll khi dài */
}
#loginBackdropHome.show{
  display: flex;
}
.lathinh-container .login-rule.open .login-rule-body{
  max-height: min(220px, 35vh); /* ✅ giới hạn chiều cao + responsive */
  opacity: 1;
  transform: translateY(0);
  padding: 8px 12px 12px;
}

.lathinh-container .login-rule-body p,.lathinh-container .login-rule-body li{
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.35;
  opacity: .92;
  font-weight: 700;
}

.lathinh-container .login-rule-body ul{ padding-left: 18px; margin: 6px 0; }

/* scrollbar đẹp (optional) */
.lathinh-container .login-rule-body::-webkit-scrollbar{ width: 6px; }
.lathinh-container login-rule-body::-webkit-scrollbar-track{ background: rgba(255,255,255,.08); border-radius: 8px; }
.lathinh-container .login-rule-body::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.40); border-radius: 8px; }

.lathinh-container .login-head{
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0));
}
.lathinh-container .login-title{
  font-size: 18px;
  font-weight: 900;
}
.lathinh-container .login-sub{
  margin-top: 6px;
  font-size: 13px;
  opacity: .85;
  line-height: 1.35;
}

.lathinh-container .login-body{ padding: 14px 16px 4px; }
.lathinh-container .login-label{
  display:block;
  font-size: 13px;
  font-weight: 700;
  opacity: .9;
  margin-bottom: 8px;
  color: white;
}
.lathinh-container .login-input{
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color:#fff;
  padding: 0 12px;
  font-size: 16px;
  outline: none;
}
.lathinh-container .login-input:focus{
  border-color: rgba(255,255,255,.35);
}

.lathinh-container .login-error{
  margin-top: 10px;
  font-size: 13px;
  color: white;
  font-weight: 800;
}

.lathinh-container .login-actions{
  padding: 12px 16px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.lathinh-container .login-btn{
    width: 50%;
    height: 39px;
    background: transparent;
    cursor: pointer;
    font-weight: 900;
    color: #fff;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_ch_i_ngay.png);
    border: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.lathinh-container .login-btn[disabled]{
  opacity: .55;
  cursor: not-allowed;
}

.lathinh-container .stage{
    position: fixed;
    inset: 0;
    width: 25vw;
    height: 90vh;
    // overflow: hidden;
    background: transparent;
    left: 50%;
    top: 53%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/500x420_-_khung_nh_p_th_ng_tin_-_khai_ph_o.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }
  .lathinh-container canvas{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
  .lathinh-container .top-badge{
    position:absolute; left:50%; top:30px;
    transform:translateX(-50%) rotate(45deg);
    width:86px; height:86px;
    background:
      radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), rgba(255,255,255,0) 45%),
      linear-gradient(135deg, #ff3b3b, #b10000);
    border-radius:10px;
    box-shadow: 0 18px 40px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.14);
    display:grid; place-items:center;
  }
  // .lathinh-container .top-badge span{
  //   transform:rotate(-45deg);
  //   font-weight:900;
  //   font-size:15px;
  //   color:#ffe28a;
  //   text-shadow: 0 2px 0 rgba(0,0,0,.25);
  // }
  .top-badge img {
    transform: translateX(-5%) rotate(-45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
  .lathinh-container .knot{
    position:absolute; left:50%; top:100px;;
    transform:translateX(-50%);
    width:20px; height:10px;
    border-radius:999px;
    background: linear-gradient(#ffda7a, #b57a10);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 8px 16px rgba(0,0,0,.25);
  }
  .lathinh-container .rope{
    position:absolute; left:50%; top:103px;
    transform:translateX(-50%);
    width:4px; height:555px;
    border-radius:999px;
    background: linear-gradient(#7a3b00, #3a1a00);
    box-shadow: 0 0 0 1px rgba(255,255,255,.06);
  }
.lathinh-container #gameStage #playNowBtnHome {
    background: transparent;
    text-transform: uppercase;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_khai_ph_o.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 237px;
    height: 49px;
    border: none;
    border-radius: 0;
}
.lathinh-container #gameStage .ui #playNowBtnHome[data-state="joined"] {
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_d__tham_gia.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent;
    pointer-events: none;
    width: 237px;
    height: 49px;
    border: none;
    border-radius: 0px;
}
  .lathinh-container .clusters{
    position:absolute;
    left:50%;
    top: 135px;
    transform:translateX(-50%);
    width:300px;
    height:545px;
  }
  .lathinh-container .cluster{
    position:absolute; top:0;
    width:140px;
    height:500px;
    filter: drop-shadow(0 16px 18px rgba(0,0,0,.45));
  }
  .lathinh-container .cluster.left{ left: 28px;}
  .lathinh-container .cluster.right{ right:80px; }
  .lathinh-container .tube{
    position:absolute;
    width:85px; height:26px;
    border-radius:999px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 45%),
      linear-gradient(90deg, var(--red3), var(--red2) 30%, var(--red1) 55%, var(--red2) 85%, var(--red3));
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.12),
      inset 0 -3px 7px rgba(0,0,0,.35),
      0 12px 18px rgba(0,0,0,.26);
    transform-origin: 20% 50%;
    will-change: transform, opacity;
  }
  .lathinh-container .tube::before{
    content:"";
    position:absolute; left:-10px; top:50%;
    width:18px; height:18px;
    transform:translateY(-50%);
    border-radius:50%;
    background:
      radial-gradient(circle at 35% 35%, rgba(255,255,255,.75), rgba(255,255,255,0) 35%),
      radial-gradient(circle at 50% 60%, #ffd36a, #b57a10 70%, #6a3a00 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  }
  .lathinh-container .tube::after{
    content:"";
    position:absolute; left:10px; top:50%;
    width:10px; height:10px;
    transform:translateY(-50%);
    border-radius:50%;
    background: radial-gradient(circle, rgba(255,255,255,.85), rgba(255,255,255,.15) 55%, rgba(0,0,0,.2) 100%);
    opacity:.75;
  }
  .lathinh-container .tube.right{ transform-origin: 80% 50%; }
  .lathinh-container .tube.right::before{ left:auto; right:-10px; }
  .lathinh-container .tube.right::after{ left:auto; right:10px; }
  .lathinh-container .tube.popped{
    opacity:0;
    transform: translateY(12px) scale(.9) rotate(var(--r));
    transition: opacity .14s ease, transform .14s ease;
  }
  .lathinh-container .ui{
    position: absolute;
    left: 50%;
    bottom: 5%;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transform: translate(-50%, -0%);
  }
  .lathinh-container button{
    appearance: none;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    justify-content: center;
    height: 55px;
  }
.lathinh-container button:active{ transform: translateY(1px); }
.lathinh-container .hint{ opacity:.85; font-size:13px; line-height:1.2; }
.lathinh-container .voucher-backdrop{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(0,0,0,.55);
  z-index: 99999;
}
.lathinh-container .voucher-flex{
  display: flex;
  justify-content: center;
  align-items: center;
}
.lathinh-container .voucher-backdrop.show{    
 display: block;
}
.lathinh-container .voucher-popup{
    width: min(560px, 96vw);
    border-radius: 18px;
    background: url(https://cdn.hstatic.net/files/1000253775/file/500x420_-_khung_nh_p_th_ng_tin_-_khai_ph_o.png);
    border: 3px solid rgba(255, 255, 255, .35);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .60);
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: top;
}
.lathinh-container .voucher-close{
    position: absolute;
    right: -10px;
    top: -11px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, .85);
    background: #BC1B20;
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-size: 28px;
    font-weight: 900;
    cursor: pointer;
}

.lathinh-container .voucher-top{
  display:flex;
  align-items:stretch;
  gap:12px;
  padding:60px 0px 10px;
}
.lathinh-container .voucher-top-left{
  flex:1;
  background: rgba(255,255,255,.10);
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding:14px 14px;
}
.lathinh-container .voucher-title{
  font-weight: 1000;
  font-size: 24px;
  letter-spacing: .5px;
  color:#fff;
  text-transform: uppercase;
}
.lathinh-container .voucher-subtitle{
  margin-top:6px;
  font-weight: 800;
  font-size: 16px;
  color: rgba(255,255,255,.95);
  text-transform: uppercase;
}
.lathinh-container .voucher-badge{
  width: 170px;
  background: #e9f4ff;
  color:#0a4aa0;
  border-radius: 14px;
  position: relative;
  overflow:hidden;
  border: 2px solid rgba(255,255,255,.65);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}
.lathinh-container .voucher-badge::before,
.lathinh-container .voucher-badge::after{
  content:"";
  position:absolute;
  top:0; bottom:0;
  width:18px;
  background: radial-gradient(circle at 50% 12px, transparent 10px, #e9f4ff 11px), radial-gradient(circle at 50% calc(100% - 12px), transparent 10px, #e9f4ff 11px);
}
.lathinh-container .voucher-badge::before{ left:-9px; }
.lathinh-container .voucher-badge::after{ right:-9px; }

.lathinh-container .voucher-badge-label{
  position:absolute;
  left:8px;
  top:10px;
  font-size:11px;
  font-weight:900;
  letter-spacing: .8px;
  opacity:.85;
  transform: rotate(-90deg);
  transform-origin: left top;
}
.lathinh-container .voucher-badge-value{
  font-size: 44px;
  font-weight: 1000;
  line-height:1;
}
.lathinh-container .voucher-badge-note{
  position:absolute;
  right:10px;
  top:12px;
  font-size: 12px;
  font-weight: 900;
  text-align:right;
  width: 70px;
  opacity:.9;
}
.lathinh-container .voucher-body{
    width: 100%;
    border-radius: 14px;
    color: #fff;
    font-weight: 1000;
    font-size: 24px;
    padding: 14px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-transform: uppercase;
    margin-top: 0px;
    flex-direction: column;
}
.lathinh-container .voucher-codebox{
  background:#fff;
  border-radius: 14px;
  padding: 14px 12px;
  border: 2px solid rgba(0,0,0,.10);
  text-align:center;
  font-size: 26px;
  letter-spacing: 4px;
  font-weight: 600;
  color:#0b0b0f;
  user-select: all;
  width: 100%;
}
.lathinh-container .voucher-actions{
  margin-top: 12px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.lathinh-container .btn-buy{
color: #fff;
    font-weight: 1000;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_mua_ngay.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
}
.lathinh-container .btn-buy .cart{
  font-size: 20px;
}
/* ===== RULES DROPDOWN ===== */
.lathinh-container .rule-panel{
border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, .28);
    background: rgba(0, 0, 0, .14);
    overflow: hidden;
    line-height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}

.lathinh-container .rule-head{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    font-weight: 1000;
    text-transform: uppercase;
}

.lathinh-container .rule-head .chev{
  font-size: 20px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .18s ease;
}
.lathinh-container .rule-panel.open .rule-head .chev{
  transform: rotate(180deg);
}
.lathinh-container .rule-body{
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .22s ease, opacity .18s ease, transform .18s ease;
  padding: 0 14px;
  overflow-y: auto; 
}
.lathinh-container .rule-panel.open .rule-body{
  max-height: 200px;
  opacity: 1;
  transform: translateY(0);
  padding: 0 14px 12px;
}
.lathinh-container .rule-body p, .lathinh-container .rule-body li{
  margin: 8px 0;
  font-size: 14px;
  font-weight: 700;
  opacity: .95;
  line-height: 1.35;
}
.lathinh-container .rule-body ul{ padding-left: 18px; margin: 8px 0; }
.lathinh-container .rule-body a{ color:#fff; text-decoration: underline; font-weight:900; }
.lathinh-container .btn-copy{
    background: transparent;
    text-transform: uppercase;
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_sao_ch_p.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    width: 100%;
    height: 52px;
    border: none;
}
.lathinh-container .btn-copy.copied{
    background-image: url(https://cdn.hstatic.net/files/1000253775/file/200x40_-_n_t_d__sao_ch_p.png);
    border-color: transparent;
    border: none;
}
.lathinh-container .voucher-bottom{
  padding: 0 0px 16px;
}
.lathinh-container .voucher-rule{
  width:100%;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.15);
  color:#fff;
  font-weight: 1000;
  font-size: 24px;
  padding: 14px 10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
  text-transform: uppercase;
}
.lathinh-container .voucher-rule .plus{
  font-size: 28px;
  font-weight: 1000;
}
.lathinh-container .success-lucky{
  transform-origin: bottom center;
  will-change: transform, opacity;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 10px;
}
.lathinh-container .success-lucky.show { animation: prizePop .6s ease-out;display: block }
@keyframes prizePop {
  0% {
    transform: translate(-50%, -40%) scale(0.2);
    opacity: 0;
  }
  60% {
    transform: translate(-50%, -52%) scale(1.08); /* vượt nhẹ */
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
.lathinh-container .voucher-loading{ color: rgba(255,255,255,.92); font-weight:800; }
.lathinh-container .voucher-error{ color: #ffd2d2; font-weight:900; }
@media(max-width: 480px){
  .lathinh-container .stage{
    width: 90vw;
  }
  .lathinh-container .btn-copy{
    font-size: 16px;
    height: 38px;
  }
  .lathinh-container .btn-buy{
        font-size: 16px;
  }
      .lathinh-container button {
        height: 40px;
    }
}
@media(max-width: 414px){
  .lathinh-container .clusters {
    height: 400px;
  }
  .lathinh-container .rope{
        height: 415px;
  }
  .lathinh-container .clusters{
    top: 125px;
  }
}