:root {
  --bg: #ffffff;
  --text: #111;
  --glass: #f2f2f2;
}

/* @media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #ffffff;
    --glass: #1e1e1e;
  }
}
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ===== TOOLBAR ===== */

.toolbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background: var(--glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  z-index: 100;
}

.left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-icon {
  width: 30px;
  height: 30px;
  background: gray;
  border-radius: 6px;
}

#toolbarTitle {
  font-size: 18px;
  font-weight: bold;
}

.stat-box {
  display: flex;
  gap: 10px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: bold;
}

.point {
  background: #fff4cc;
  color: #d4a100;
}

.ticket {
  background: #eafff2;
  color: #00b85c;
}
.plus {
  color: #00b85c;
}

/* ===== MAIN ===== */

.main {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
}

/* ===== SPIN ===== */

#tabSpin {
  padding-top: 60px;
}

/* ===== BANNER ===== */

.banner-box {
  width: 90%;
  max-width: 500px;
  margin: 20px auto;
  position: relative;
}

.banner-img {
  width: 100%;
  border-radius: 15px;
}

.reward-btn {
  width: 90%;
  margin: 10px auto 0;
  display: block;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: #FFD700;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}

/* ===== SPIN BUTTON ===== */

.spin-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
}

.spin-btn {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 12px 36px;
  border-radius: 50px;
  border: none;
  cursor: pointer;

  color: white;
  font-weight: bold;
  font-size: 16px;
  transition: 0.3s ease;

  background: linear-gradient(135deg, #00c853, #00e676);

  box-shadow:
    0 0 8px rgba(0,255,120,0.6),
    0 0 16px rgba(0,255,120,0.4);
}

/* Glow viền mềm hơn */
.spin-btn::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 52px;
  background: linear-gradient(90deg, #00ff99, #00ffcc, #00ff99);
  z-index: -1;
  filter: blur(6px);
  opacity: 0.8;
  animation: glowMove 4s linear infinite;
}


@keyframes glowMove {
  0% { background-position: 0% }
  100% { background-position: 200% }
}

.spin-btn.red {
  background: linear-gradient(135deg, #ff4d4d, #ff0000);
  box-shadow:
    0 0 10px rgba(255,0,0,0.6),
    0 0 20px rgba(255,0,0,0.4);
}

.spin-btn.red::before {
  background: linear-gradient(90deg, #ff0000, #ff6666, #ff0000);
}

.spin-btn {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.spin-btn:hover {
  transform: scale(1.05);
}


/* Không cho chữ xuống dòng */
.spin-text {
  font-size: 18px;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Cost nhỏ gọn lại */
.spin-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: 4px;
}
.ticket-icon {
  font-size: 18px;
}

/* HIỆU ỨNG LẤP LÁNH */
.shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );
  transform: rotate(25deg);
  animation: shineMove 3s infinite;
}

@keyframes shineMove {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

/* ===== POPUP ===== */

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.popup-content {
  width: 90%;
  max-width: 400px;
  background: var(--bg);
  border-radius: 15px;
  padding: 15px;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 10px;
}

.close-btn {
  cursor: pointer;
}

.reward-list {
  max-height: 300px;
  overflow-y: auto;
}

.reward-item {
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

/* ===== PROFILE ===== */

.profile {
  margin-top: 50px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: gray;
  margin: auto;
}

#userName {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
}

/* ===== OPTION ===== */

.option-box {
  margin: 40px auto;
  width: 90%;
  max-width: 400px;
  background: var(--glass);
  border-radius: 20px;
  padding: 15px;
}

.option-title {
  font-weight: bold;
  margin-bottom: 10px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  cursor: pointer;
}

.option-item:hover {
  background: rgba(0,0,0,0.05);
}

/* ===== TABBAR ===== */

.tabbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 60px;
  background: var(--glass);
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.tab {
  opacity: 0.6;
  cursor: pointer;
}

.tab.active {
  opacity: 1;
}

/* ===== SLIDER ===== */

.slider {
  width: 90%;
  margin: 20px auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.slides {
  display: flex;
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
}

.slide img {
  width: 100%;
  border-radius: 15px;
}

/* ===== QUICK SPIN ===== */

.quick-spin-box {
  width: 90%;
  max-width: 400px;
  margin: 20px auto 10px;
  padding: 15px;
  background: var(--glass);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quick-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 10px;
}

#quickValue {
  background: linear-gradient(135deg,#00c853,#00e676);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  box-shadow: 0 0 10px rgba(0,255,120,0.5);
}

/* Slider style */
#quickSlider {
  width: 100%;
  appearance: none;
  height: 8px;
  border-radius: 10px;
  background: linear-gradient(to right,#00c853,#00e676);
  outline: none;
}

/* Thumb */
#quickSlider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 3px solid #00c853;
  box-shadow: 0 0 10px rgba(0,255,120,0.7);
  cursor: pointer;
  transition: 0.2s;
}

#quickSlider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#quickSlider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 3px solid #00c853;
  box-shadow: 0 0 10px rgba(0,255,120,0.7);
  cursor: pointer;
}

/* ===== MULTI MODE x10 ===== */

.spin-btn.multi {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  box-shadow:
    0 0 12px rgba(255,215,0,0.8),
    0 0 25px rgba(255,165,0,0.6);
}

.spin-btn.multi::before {
  background: linear-gradient(90deg, #fff176, #ffd700, #fff176);
  filter: blur(8px);
}

.quick-spin-box.max-mode {
  box-shadow: 0 0 20px rgba(255,215,0,0.6);
}

/* ===== FLOAT SHOP BUTTON ===== */

.shop-float {
  position: fixed;
  right: 20px;
  bottom: 140px; /* cao hơn spin button */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg,#ff9800,#ff5722);
  color: white;

  box-shadow:
    0 6px 20px rgba(255,87,34,0.4),
    0 0 15px rgba(255,152,0,0.6);

  transition: 0.3s;
  z-index: 200;
}

.shop-float .material-icons {
  font-size: 28px;
}

.shop-float:hover {
  transform: scale(1.1);
}

.shop-float:active {
  transform: scale(0.95);
}