

/* Vé quay + dấu cộng */
#veQuayContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  margin-top: 10px;
  font-weight: bold;
  color: #e91e63;
}

#veQuayContainer img {
  width: 24px;
  height: 24px;
}

.plus-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #ff9800;
  cursor: pointer;
  transition: transform 0.2s;
}

.plus-btn:hover {
  transform: scale(1.2);
}



/* Modal Đổi vé */
#exchangeModal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px 25px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  width: 90%;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

#exchangeModal h3 {
  color: #e91e63;
  margin-bottom: 8px;
}

#exchangeModal p {
  color: #555;
  font-size: 15px;
  margin-bottom: 12px;
}

#exchangeModal button {
  padding: 8px 16px;
  background-color: #ff69b4;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#exchangeModal button:hover {
  background-color: #e91e63;
}

#exchangeMessage {
  margin-top: 10px;
  font-size: 15px;
}

#closeExchange {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  cursor: pointer;
  color: #e91e63;
}
/* Ẩn toàn bộ khu vực incense nếu ở trang gacha */
.incense-game {
  display: none !important;
}

#incenseButton,
#clickCount,
#incense-screen {
  display: none !important;
}


.blessing-counter {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #e91e63;
}




/* thanh vé và điểm*/
.fireworks-burst {
  position: fixed;
  font-size: 48px;
  animation: burstFirework 1s ease-out forwards;
  pointer-events: none;
  z-index: 9999;
}

@keyframes burstFirework {
  0% {
    opacity: 1;
    transform: scale(0.5) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(3) rotate(720deg);
  }
}



.loading-avatar {
  filter: blur(2px);
  opacity: 0.6;
  transition: filter .2s, opacity .2s;
}


/* Toàn bộ khu gacha */
.gacha-game {
  max-width: 900px;
  margin: auto;
  padding: 16px;
  background: linear-gradient(135deg, #ffb6c1, #ff69b4, #d36fa6);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  color: #fff;
  font-family: 'Poppins', sans-serif;
}

/* Banner art */
.gacha-banner {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  color: #333;
}

.banner-art {
  position: relative;
}

.banner-art img {
  width: 100%;
  display: block;
}

.banner-info {
  position: absolute;
  bottom: 55px;   /* trước là 12px → nhích lên để chừa chỗ tabs */
  left: 15px;
  background: rgba(255, 105, 180, 0.8);
  padding: 8px 14px;
  border-radius: 10px;
  color: #fff;
}


.banner-info h2 {
  font-size: 20px;
  margin: 0 0 4px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.banner-info p {
  margin: 2px 0;
  font-size: 14px;
}

/* Container banner */
.banner-art {
  position: relative;
}

/* Thanh bonus */
.gacha-progress {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 220px;
  background: rgba(0,0,0,0.75);
  padding: 6px 10px 10px;
  border-radius: 12px;
  text-align: center;
  font-family: sans-serif;
  z-index: 3;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Header: text + tags */
.progress-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.progress-header .label {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,0.6);
}

.progress-header .tag {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  line-height: 1.2;
}

.progress-header .tag.star4 {
  background: #ff4da6; /* hồng đậm */
}

.progress-header .tag.featured {
  background: #5dade2; /* xanh dương */
}

/* Thanh tiến độ */
.gacha-progress .progress-bar {
  height: 10px;
  background: #fa8d8d;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.gacha-progress .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff69b4, #ffd1dc);
  width: 0%;
  transition: width 0.3s ease;
}

/* Mốc 50 - 100 */
.gacha-progress .progress-steps {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: #fff;
  font-weight: bold;
}


/* Buttons */
.gacha-controls.overlay {
  position: absolute;
  bottom: 15px;         /* sát đáy banner */
  right: 15px;          /* sát cạnh phải */
  display: flex;
  gap: 10px;
  z-index: 3;
}


/* Nút roll overlay */
.gacha-controls.overlay button {
  background: linear-gradient(145deg, #ff69b4, #ffb6c1);
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 105, 180, 0.4);
  transition: transform 0.2s;
}

.gacha-controls.overlay button:hover {
  transform: scale(1.05);
}

.gacha-controls.overlay .highlight {
  background: linear-gradient(145deg, #ff85c1, #ffd1dc);
}

/* Gacha results grid */
/* Overlay che toàn màn hình */
.gacha-result-modal {
  display: none; /* mặc định ẩn */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* Khung kết quả */
.gacha-result-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 700px;
  text-align: center;
  animation: popUp 0.3s ease;
  position: relative;
}

/* Nút đóng */
.close-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 26px;
  font-weight: bold;
  color: #e91e63;
  cursor: pointer;
}

/* Danh sách item */
.gacha-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
  margin-top: 15px;
}

/* Item trong kết quả */
.gacha-item {
  text-align: center;
}

.gacha-item img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  border: 3px solid #aaa;
  background: #f9f9f9;
}

.gacha-item.common img { border-color: #2e86de; }
.gacha-item.rare img { border-color: #9b59b6; }
.gacha-item.legendary img {
  border-color: gold;
  box-shadow: 0 0 10px gold, 0 0 20px rgba(255,215,0,0.6);
}


/* Tabs overlay trên ảnh */
.gacha-tabs.overlay {
  position: absolute;
  bottom: 15px;           /* cùng đáy với banner-info */
  left: 15px;             /* sát cạnh trái */
  display: flex;
  gap: 8px;
  z-index: 3;
}

.gacha-tabs.overlay button {
  background: rgba(255, 105, 180, 0.85); /* hồng mờ */
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background 0.2s;
}

.gacha-tabs.overlay button:hover {
  background: rgba(255, 150, 200, 0.95);
}


/* Overlay khi roll */
.roll-animation {
  display: none;
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.85);
  z-index: 9998;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.chest {
  width: 160px;
  height: 120px;
  background: url("../img/chest.png") no-repeat center/cover;
  cursor: pointer;
  transition: transform 0.2s;
}

.chest.crack1 { transform: scale(1.05) rotate(-5deg); }
.chest.crack2 { transform: scale(1.05) rotate(5deg); }
.chest.explode {
  background: none;
  animation: explodeChest 0.8s forwards;
}

@keyframes explodeChest {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

#chestHint {
  color: #fff;
  margin-top: 12px;
  font-size: 18px;
}



/* /*auto mở rương* */
#autoOpenToggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(255,255,255,0.8);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}


/*skip*/
.skip-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 50, 100, 0.85);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10000;
}
.skip-btn:hover {
  background: rgba(220, 20, 80, 1);
}



/* Container danh sách lịch sử */
#historyList {
  display: flex;
  flex-direction: column;  /* ✅ xếp dọc */
  gap: 6px;
  margin-top: 10px;
}

/* Mỗi dòng lịch sử */
.history-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
  border-radius: 6px;
  background: #fafafa;
}

/* Số thứ tự */
.history-index {
  font-weight: bold;
  color: #888;
  min-width: 40px;
}

/* Tên + độ hiếm */
.history-name {
  flex: 1;
  text-align: left;
  font-weight: bold;
}

/* Thời gian */
.history-time {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

/* 🎨 Màu theo độ hiếm */
.history-item.common .history-name { color: #2e86de; }
.history-item.rare .history-name { color: #9b59b6; }
.history-item.legendary .history-name {
  color: goldenrod;
  text-shadow: 0 0 4px rgba(255,215,0,0.6);
}
