body {
  margin: 0;
  min-height: 100vh;
  color: #effff6;
  background-color: #061a12;
  background-image:
    radial-gradient(ellipse at 8% 0%, #28ed9855, transparent 45%),
    radial-gradient(ellipse at 95% 100%, #16b96a50, transparent 48%),
    repeating-linear-gradient(
      135deg,
      transparent 0 11px,
      #ffffff06 11px 12px
    ),
    linear-gradient(155deg, #0c3d29, #061a12 55%, #0a2d20);
  background-repeat: no-repeat;
}

.โลโก้ {
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 48px) 16px;
  background: radial-gradient(
    ellipse at center,
    #35f2a438,
    transparent 65%
  );
}

#โลโก้ {
  box-sizing: border-box;
  width: min(240px, 100%);
  padding: clamp(12px, 3vw, 20px);
  border: 1px solid transparent;
  border-radius: 24px;

  /* พื้นกระจกด้านใน + ขอบไล่สีทอง–มินต์ */
  background:
    linear-gradient(145deg, #154c39, #08241b) padding-box,
    linear-gradient(135deg, #ffe2a3, #36c892 45%, #a8ffd8) border-box;

  box-shadow:
    inset 0 1px 0 #ffffff26,
    0 12px 28px #0005,
    0 0 24px #30df9440;
}

#โลโก้ img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px #0006);
}

@media (hover: hover) {
  #โลโก้:hover {
    box-shadow:
      inset 0 1px 0 #ffffff40,
      0 16px 32px #0006,
      0 0 36px #30df9470;
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #โลโก้ {
    transition: transform 200ms ease, box-shadow 200ms ease;
  }

  #โลโก้:hover {
    transform: translateY(-3px);
  }
}

/* กรอบการ์ดเขียวมรกต ขอบไล่สีทอง–มินต์ */
.ผู้เล่น {
  box-sizing: border-box;
  width: min(380px, calc(100% - 32px));
  margin: 20px auto;
  padding: 24px 16px;
  border: 1px solid transparent;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 0%, #2b9f6655, transparent 70%) padding-box,
    linear-gradient(150deg, #123e2c, #071e16) padding-box,
    linear-gradient(130deg, #ffe1a3, #288a65 50%, #7af2ba) border-box;
  color: #effff6;
  text-align: center;
  box-shadow: 0 12px 28px #0005, 0 0 24px #31db8b26;
}

/* หัวข้อและจุดออนไลน์ */
.ผู้เล่น > p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 12px;
  color: #d0efdf;
  font-size: 0.95rem;
  font-weight: 600;
}

.ผู้เล่น > p::before {
  content: "";
  flex: 0 0 8px;
  height: 8px;
  border-radius: 50%;
  background: #65ffa8;
  box-shadow: 0 0 12px #65ffa8aa;
}

/* ช่องแสดงตัวเลข */
#ผู้เล่น {
  padding: 10px 12px;
  border: 1px solid #82ffbd33;
  border-radius: 14px;
  background: #041a12aa;
  color: #a1ffd0;
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-shadow: 0 0 18px #5affaa55;
}

/* แสดงขีดไว้ก่อนที่ JS จะใส่ตัวเลข */
#ผู้เล่น:empty::before {
  content: "—";
  color: #82a99a;
}

/* รองรับป้าย “คน • ข้อมูลจำลอง” จาก JS เดิม */
.ผู้เล่น > .ผู้เล่น-คำอธิบาย {
  display: block;
  margin-top: 8px;
  color: #b1d0c1;
  font-size: 0.8rem;
}

.กล่องปุ่ม {
  display: flex;
  justify-content: center;
  padding: 16px;
}

#สมัครสมาชิก1 {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  width: min(100%, 340px);
  min-height: 56px;
  padding: 14px 24px;
  overflow: hidden;

  border: 1px solid #fff1b9;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff1bc, #f0cb6c 48%, #dca43b);
  color: #302001;

  font: inherit;
  font-size: 1.125rem;
  font-weight: 800;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 #fff9df,
    0 4px 0 #97651f,
    0 10px 24px #0005,
    0 0 22px #ffd67840;

  transition: transform 180ms ease, box-shadow 180ms ease;
}

/* แสงพาดผ่านด้านหลังตัวหนังสือ */
#สมัครสมาชิก1::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    transparent 35%,
    #ffffff99 50%,
    transparent 65%
  );
  transform: translateX(-100%);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #สมัครสมาชิก1:hover {
    transform: translateY(-2px);
  }

  #สมัครสมาชิก1:hover::after {
    transform: translateX(100%);
    transition: transform 650ms ease;
  }
}

#สมัครสมาชิก1:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 5px #80510f40, 0 1px 0 #97651f;
}

#สมัครสมาชิก1:focus-visible {
  outline: 3px solid #b0ffd1;
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  #สมัครสมาชิก1 {
    transition: none;
  }

  #สมัครสมาชิก1:active {
    transform: none;
  }
}

.แอดไลน์ {
  display: flex;
  justify-content: center;
  padding: 4px 16px 16px;
}

#แอดไลน์ {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 340px);
  min-height: 56px;
  padding: 12px 24px;

  border: 1px solid #b6ffd3;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 15% 0%, #e2ffdfb3, transparent 50%),
    linear-gradient(135deg, #a6ffc7, #42e68f 55%, #20c77d);
  color: #073521;

  font: inherit;
  font-size: 1.125rem;
  font-weight: 800;
  cursor: pointer;

  box-shadow:
    inset 0 1px 0 #ffffff9e,
    0 4px 0 #08764b,
    0 9px 22px #0005,
    0 0 20px #48f59d33;
}

/* ไอคอนกล่องแชต วาดด้วย CSS */
#แอดไลน์::before {
  content: "";
  flex: 0 0 20px;
  height: 20px;
  background:
    radial-gradient(circle at 28% 43%, #a6ffc7 1px, transparent 1.6px),
    radial-gradient(circle at 50% 43%, #a6ffc7 1px, transparent 1.6px),
    radial-gradient(circle at 72% 43%, #a6ffc7 1px, transparent 1.6px),
    currentColor;
  clip-path: polygon(
    15% 8%, 85% 8%, 100% 23%, 100% 65%, 85% 80%,
    45% 80%, 20% 100%, 20% 80%, 15% 80%, 0 65%, 0 23%
  );
}

@media (hover: hover) {
  #แอดไลน์:hover {
    box-shadow:
      inset 0 1px 0 #ffffffc0,
      0 4px 0 #08764b,
      0 10px 24px #0005,
      0 0 28px #48f59d80;
  }
}

#แอดไลน์:active {
  box-shadow: inset 0 2px 8px #08613c55, 0 1px 0 #08764b;
}

#แอดไลน์:focus-visible {
  outline: 3px solid #d4ffe5;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
  #แอดไลน์ {
    transition: transform 160ms ease, box-shadow 160ms ease;
  }

  #แอดไลน์:active {
    transform: translateY(3px);
  }
}

/* กรอบหลัก */
.รายการถอนเงิน {
  box-sizing: border-box;
  width: min(560px, calc(100% - 24px));
  margin: 24px auto;
  padding: clamp(14px, 4vw, 24px);
  border: 1px solid #d9bd7955;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at top right, #34d39929, transparent 65%),
    linear-gradient(145deg, #123c2e, #071c16);
  color: #f1fff8;
  box-shadow: inset 0 1px 0 #ffffff1a, 0 14px 32px #0005;
}

.รายการถอนเงิน > h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d9bd7933;
  color: #ffe7ae;
  font-size: 1.125rem;
}

.รายการถอนเงิน > h3::before {
  content: "";
  flex: 0 0 4px;
  height: 18px;
  border-radius: 4px;
  background: #e7c571;
  box-shadow: 0 0 10px #e7c57166;
}

#รายการถอนเงิน {
  display: grid;
  gap: 9px;
}

/* กรอบรายแถว: ตรงกับคลาสที่ JavaScript สร้าง */
#รายการถอนเงิน > .รายการถอนเงิน-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 11px 12px;
  border: 1px solid #86efac26;
  border-radius: 15px;
  background: linear-gradient(120deg, #153c30, #0a211a);
}

.รายการถอนเงิน .ข้อมูลผู้ถอน {
  display: flex;
  flex: 1 1 160px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* โลโก้ธนาคารขนาด 40px โดยไม่ตัดขอบรูป */
.รายการถอนเงิน .รูปธนาคาร {
  box-sizing: border-box;
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 4px;
  border: 1px solid #b7eccd;
  border-radius: 11px;
  background: #f4fff8;
  object-fit: contain;
}

.รายการถอนเงิน .ข้อมูลผู้ถอน strong,
.รายการถอนเงิน .ข้อมูลผู้ถอน small {
  display: block;
}

.รายการถอนเงิน .ข้อมูลผู้ถอน strong {
  font-size: 0.9rem;
}

.รายการถอนเงิน .ข้อมูลผู้ถอน small {
  margin-top: 3px;
  color: #b1d7c7;
  font-size: 0.75rem;
}

.รายการถอนเงิน .ยอดถอน {
  margin-inline-start: auto;
  text-align: end;
}

.รายการถอนเงิน .จำนวนเงินถอน {
  display: block;
  color: #9dffca;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.รายการถอนเงิน .โอนสำเร็จ {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border: 1px solid #e7c57155;
  border-radius: 999px;
  background: #e7c57114;
  color: #ffe7ae;
  font-size: 0.72rem;
}

/* ให้แถวใหม่เลื่อนเข้ามาเบา ๆ */
@media (prefers-reduced-motion: no-preference) {
  #รายการถอนเงิน > .รายการถอนเงิน-item {
    animation: withdrawal-enter 250ms ease-out both;
  }
}

@keyframes withdrawal-enter {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.แจ็กพอตแตก {
  box-sizing: border-box;
  width: min(540px, calc(100% - 24px));
  margin: 24px auto;
  padding: clamp(16px, 5vw, 28px);

  border: 1px solid transparent;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at top, #49db922e, transparent 65%) padding-box,
    linear-gradient(155deg, #153f30, #061910) padding-box,
    linear-gradient(130deg, #fff0b1, #9b7436 55%, #eac77e) border-box;

  color: #f0fff7;
  text-align: center;
  box-shadow: 0 12px 32px #0006, 0 0 24px #ffda7626;
}

.แจ็กพอตแตก > h2 {
  margin: 0;
  color: #ffe7a6;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
}

.แจ็กพอตแตก > .ป้ายแจ็กพอตจำลอง {
  display: inline-block;
  margin: 8px 0 16px;
  padding: 3px 10px;
  border: 1px solid #8dffc74d;
  border-radius: 999px;
  background: #8dffc714;
  color: #c1ffdb;
  font-size: 0.8rem;
}

/* ยอดรางวัลหลัก */
.แจ็กพอตแตก .รางวัลแจ็กพอตแตก {
  padding: 16px 12px;
  border: 1px solid #f0cd7355;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at center, #c8943329, transparent 78%),
    #071b13;
}

.แจ็กพอตแตก .รางวัลแจ็กพอตแตก > span {
  display: block;
  color: #dae9df;
  font-size: 0.9rem;
}

.แจ็กพอตแตก #ยอดรางวัลแจ็กพอตแตก {
  display: block;
  margin-top: 4px;
  color: #ffdc83;
  font-size: clamp(1.8rem, 8vw, 3.4rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-shadow: 0 0 20px #ffcf6359;
}

/* ช่องชื่อผู้ชนะและชื่อเกม */
.แจ็กพอตแตก .รายละเอียดแจ็กพอตแตก {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 10px;
  margin-top: 12px;
}

.แจ็กพอตแตก .รายละเอียดแจ็กพอตแตก > p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #b4ffd426;
  border-radius: 12px;
  background: #ffffff09;
  color: #c4e1d1;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.แจ็กพอตแตก .รายละเอียดแจ็กพอตแตก strong {
  display: block;
  margin-top: 4px;
  color: #f0fff7;
  font-size: 1rem;
}