@import url("https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

body {
  font-family: "Kanit", sans-serif;
}
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.glass-card img {
  max-width: 280px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.gradient-text {
  /* background: linear-gradient(135deg, #006d3e 0%, #a43073 100%); */
  background: linear-gradient(145deg, #006d3e 0%, #ad2675 50%);
  /* background: linear-gradient(135deg, #76cf22 0%, #a43073 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-glow {
  box-shadow: 0 0 20px rgba(134, 239, 172, 0.4);
}

.btn-glow:hover {
  box-shadow: 0 0 30px rgba(134, 239, 172, 0.6);
}

.modal-overlay {
  background: rgba(25, 28, 30, 0.4);
  backdrop-filter: blur(8px);
}

.scroll-hide::-webkit-scrollbar {
  display: none;
}

.img-hero {
  display: flex;
  justify-content: center;
  align-items: center;
}

.img-hero img {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 820px;
  height: auto;
  border-radius: 1.5rem;
  transform: scale(1);
  transition: transform 0.5s ease;
}

/* Header */
/* class="fixed top-0 w-full z-50 bg-white/10 dark:bg-black/10 backdrop-blur-xl border-b border-white/20 shadow-xl shadow-primary/5" */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* flex justify-between items-center max-w-container-max mx-auto px-md h-20 */
header .header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 20px;
}

/* font-display-lg text-headline-md tracking-tighter text-primary dark:text-primary-fixed */
.header-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  /* color: #006d3e; */
  color: #48860e;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sponsor-bg {
  /* background: #c67290 !important; */
  background: #e887aa !important;
  /* backdrop-filter: blur(30px); */
}

/* .text-outline {
  color: #fff !important;
} */

.hero-details {
  font-size: 1.125rem;
}

.hero-details p {
  font-size: 22px;
}

.space-y-md h1 {
  font-size: 48px;
  font-weight: 500;
}

.desc {
  margin-bottom: 30px;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 1.5em; /* ระยะห่างระหว่างย่อหน้า */
  text-align: justify; /* จัดเนื้อหาให้เท่ากันสองด้าน */
  text-indent: 1em;
}

.rules-detail {
  text-align: left !important;
}

#rules {
  /* background-color: #b1cd56; */
  /* background-color: #f3fece; */
  background-color: #f2f9dd;
}

.s-size-x {
  display: unset;
}

.s-size-y {
  display: none;
}

section {
  padding: 2rem 1rem;
}

.glass-card-contant {
  display: flex;
  justify-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.contact_content {
  display: flex;
  /* flex-direction: row; */
  flex-wrap: wrap;

  justify-content: space-around;
  align-items: center;
}

/* .btn-join {
  background: linear-gradient(to right, #86efac, #fc79bd);
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
} */

.btn-join {
  /* background: #fd94b9; */
  /* background: #86cc44; */
  background: linear-gradient(to right, #76cf22, #48860e);
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-join:hover {
  transform: translateY(-4px);
}

/* เพิ่มเติมสำหรับ btn-glow (สามารถปรับค่าสีและระยะการกระจายแสงได้ตามต้องการ) */
.btn-glow {
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 0 15px rgba(#86efac, 0.5);
}

.leading-none {
  line-height: 1.3 !important;
}

/* Login/Register Form */
/* การจัดการระยะห่างแนวตั้ง (Space-y) */
.form-login-register-container {
  display: flex;
  flex-direction: column;
  gap: 16px; /* md = 1rem */
}

.form-login-register-container form .input-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px; /* xs = 0.5rem */
}

/* สไตล์ของ Label */
.form-login-register-container form .form-label {
  font-family: sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280; /* สีเทาอมเข้ม (outline) */
}

/* สไตล์ของกล่องข้อความ (Input Text / Password) */
.form-login-register-container form .form-input {
  width: 100%;
  background-color: #f3f4f6; /* สีเทาอ่อน (surface-container-low) */
  border: 1px solid transparent;
  border-radius: 12px; /* xl = 0.75rem */
  padding: 12px 16px; /* p-md */
  box-sizing: border-box;
  outline: none;
  font-size: 16px;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.form-login-register-container form .form-input:focus {
  border-color: #3b82f6; /* สีน้ำเงิน (primary) */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); /* ring-2 */
}

/* การจัดแถวเครื่องมือ (Remember me & Forgot?) */
.form-login-register-container form .form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-login-register-container form .form-options .checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

/* สไตล์ของ Checkbox */
.form-login-register-container form .form-options .form-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background-color: #f3f4f6;
  cursor: pointer;
}

/* ลิงก์ลืมรหัสผ่าน */
.form-login-register-container form .form-options .forgot-link {
  font-size: 14px;
  color: #2563eb; /* สีน้ำเงินรอง (secondary) */
  text-decoration: none;
}

.form-login-register-container form .form-options .forgot-link:hover {
  text-decoration: underline;
}

/* ปุ่มกด Sign In */
.form-login-register-container form .btn-submit {
  width: 100%;
  /* background: linear-gradient(to right, #86efac, #fc79bd); */
  background: #48860e;
  color: #ffffff; /* ตัวหนังสือสีขาว */
  padding: 12px 0;
  border-radius: 9999px; /* rounded-full */
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  /* shadow-lg พร้อมเงาสีฟุ้ง 20% */
}

.form-login-register-container form .btn-submit:hover {
  filter: brightness(1.1); /* hover:brightness-110 */
}

.form-login-register-container form .btn-submit:active {
  transform: scale(0.95); /* active:scale-95 */
}

/* Add For Registration */
/* สำหรับซ่อนฟอร์มเริ่มต้น */
.hidden {
  display: none !important;
}

/* เลย์เอาต์แบ่ง 2 คอลัมน์สำหรับชื่อ-นามสกุล */
.form-login-register-container .form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; /* gap-sm = 0.75rem */
}

/* ปุ่มกด Create Account (bg-gradient-to-r + btn-glow) */
.btn-register-submit {
  width: 100%;
  /* ไล่เฉดสีจากสีฟ้าอ่อนไปสีม่วง/น้ำเงินตามคอนเซปต์ primary/secondary container */
  /* background: linear-gradient(to right, #dbeafe, #e0e7ff); */
  background: #de569a;
  color: #ffffff; /* สีตัวหนังสือ text-on-primary (ปรับสีเข้มให้อ่านง่าย) */
  padding: 12px 0; /* py-md */
  border-radius: 9999px; /* rounded-full */
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;

  /* สไตล์ btn-glow เอฟเฟกต์เรืองแสง */
  /* box-shadow:
    0 0 15px rgba(59, 130, 246, 0.5),
    0 4px 6px -1px rgba(0, 0, 0, 0.1); */
}

.form-login-register-container.btn-register-submit:hover {
  background-color: #f75eaa;
}

.form-login-register-container .btn-register-submit:active {
  transform: scale(0.95); /* active:scale-95 */
}
/* End Login/Register Form */

@media (max-width: 480px) {
  .form-grid-2 {
    grid-template-columns: 1fr; /* บนมือถือให้เรียงต่อกันเป็นแนวตั้ง */
  }
}

@media (max-width: 767px) {
  .header-title h1 {
    display: none;
  }
  .hero-container {
    text-align: center;
  }

  .btn-join {
    width: 100%;
    justify-content: center;
  }

  .img-hero img {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 1.5rem;
    transform: scale(1);
    transition: transform 0.5s ease;
  }
}

.flash-message {
  width: 100%;
  border-radius: 0.75rem;
  padding: 14px 18px;
  font-weight: 700;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.flash-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.user-menu {
  position: relative;
}

.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #006d3e;
  border: 1px solid #bdcabe;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}

.user-menu-panel a {
  display: block;
  padding: 12px 16px;
  color: #191c1e;
  font-weight: 600;
}

.user-menu-panel a:hover {
  background: #f2f4f6;
  color: #006d3e;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.page-shell.narrow {
  max-width: 760px;
}

.page-title {
  margin-bottom: 24px;
}

.page-title.with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-title h1 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
  color: #006d3e;
}

.page-title p {
  margin-top: 6px;
  color: #3e4a40;
}

.content-card,
.wizard-card,
.team-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 24px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.wizard-step {
  border: 1px solid #bdcabe;
  border-radius: 0.75rem;
  padding: 12px;
  font-weight: 800;
  color: #3e4a40;
  background: #f7f9fb;
}

.wizard-step.active {
  background: #006d3e;
  border-color: #006d3e;
  color: #ffffff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid.compact {
  gap: 12px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 13px;
  font-weight: 800;
  color: #3e4a40;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #bdcabe;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 10px 12px;
  font-size: 16px;
}

.field input[readonly] {
  background: #f2f4f6;
  color: #3e4a40;
}

.field-hint {
  font-size: 13px;
  font-weight: 700;
}

.field-hint.error {
  color: #b91c1c;
}

.wizard-actions,
.team-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-pink {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
}

.btn-primary {
  background: #006d3e;
  color: #ffffff;
}

.btn-secondary {
  background: #f2f4f6;
  color: #006d3e;
  border: 1px solid #bdcabe;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
}

.btn-pink {
  background: #d63384;
  color: #ffffff;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-pink:disabled,
.wizard-step:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.wizard-step.complete::after {
  content: " ✓";
  color: #006d3e;
  font-weight: 900;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-join-pink {
  background: linear-gradient(135deg, #d63384, #f06595);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.summary-grid > div,
.payment-total,
.pickup-note {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fbfcfd;
  padding: 16px;
}

.summary-grid span,
.payment-total span {
  display: block;
  color: #3e4a40;
  font-weight: 700;
}

.summary-grid strong,
.payment-total strong {
  display: block;
  color: #191c1e;
  font-size: 22px;
  font-weight: 900;
}

.summary-grid small,
.payment-note {
  color: #647067;
}

.pending-section {
  margin-top: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-heading h2 {
  color: #191c1e;
  font-size: 24px;
  font-weight: 900;
}

.section-heading span {
  color: #a43073;
  font-weight: 800;
}

.shirt-order-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.shirt-size-row {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 12px;
  background: #fbfcfd;
}

.shirt-size-row span {
  display: block;
  color: #a43073;
  font-weight: 900;
  margin-bottom: 8px;
}

.shirt-size-row input {
  width: 100%;
  border: 1px solid #bdcabe;
  border-radius: 0.5rem;
  min-height: 42px;
  padding: 8px;
}

.shirt-size-col {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  box-sizing: border-box;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 12px;
  background: #fbfcfd;
}

.shirt-size-col span {
  display: block;
  color: #a43073;
  font-weight: 900;
  margin-bottom: 8px;
}

.shirt-size-col input {
  width: 100%;
  border: 1px solid #bdcabe;
  border-radius: 0.5rem;
  min-height: 42px;
  padding: 8px;
}

.shirt-detail-panel {
  margin-top: 18px;
}

.shirt-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.shirt-chip-list span {
  border-radius: 999px;
  background: #fde7f1;
  color: #a43073;
  font-weight: 800;
  padding: 6px 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  padding: 18px;
}

.admin-card span {
  color: #647067;
  font-weight: 700;
}

.admin-card strong {
  display: block;
  font-size: 30px;
  font-weight: 900;
  color: #006d3e;
}

.chart-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 180px;
}

.chart-bars div {
  flex: 1;
  background: #a43073;
  border-radius: 0.5rem 0.5rem 0 0;
  min-height: 8px;
}

.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.qr-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.player-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fbfcfd;
}

.player-card h2 {
  font-weight: 800;
  color: #a43073;
}

.team-list {
  display: grid;
  gap: 16px;
}

.team-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.team-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: #191c1e;
}

.team-card p {
  color: #3e4a40;
}

.team-type {
  color: #a43073;
  font-size: 16px;
  font-weight: 800;
}

.details-card {
  display: block;
}

.details-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.details-card summary::-webkit-details-marker {
  display: none;
}

.details-card strong,
.details-card small {
  display: block;
}

.details-card small {
  margin-top: 4px;
  color: #3e4a40;
}

.member-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.member-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.member-table th,
.member-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.member-table th {
  background: #f2f4f6;
  font-weight: 800;
}

@media (max-width: 820px) {
  .s-size-x {
    display: none;
  }

  .s-size-y {
    display: unset;
  }
}

@media (max-width: 900px) {
  .players-grid {
    grid-template-columns: 1fr;
  }

  .team-card,
  .page-title.with-action {
    flex-direction: column;
    align-items: stretch;
  }

  .team-actions {
    justify-content: flex-start;
  }

  .glass-card-contant {
    flex-direction: column;
    align-items: center;
  }

  .glass-card img {
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 24px 16px 64px;
  }

  .page-title h1 {
    font-size: 26px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .wizard-actions,
  .team-actions,
  .summary-header,
  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .btn-pink {
    width: 100%;
  }

  .summary-grid,
  .shirt-order-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .user-menu-panel {
    right: -8px;
    width: min(280px, calc(100vw - 24px));
  }
}
