*{
    font-family: 'Anuphan';
}
  body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow-x: hidden;
    
  }

.header {
      position: sticky;
      top: 0;
      z-index: 1000;
      background: linear-gradient(90deg, #287837 -20.7%, #08A94C 66.86%);
      color: white;
      padding: 0px 15px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    /* Navbar style */
    .navbar-brand img {
      height: 70px;
    }

    .navbar-nav .nav-link {
      color: #fff !important;
      font-weight: 500;
      padding: 8px 15px;
    }

    .navbar-nav .nav-link:hover {
      color: #C4D94E !important;
    }

    /* Offcanvas (เมนูเลื่อนจากด้านข้างบนมือถือ) */
    .offcanvas {
    background: #e5ffe5;
    color: #004606 !important;
    }

    .offcanvas .nav-link {
      color: #004606 !important;
      padding: 10px 20px;
    }

    .offcanvas .nav-link:hover {
      /* background: #066500; */
      color: #C4D94E;
    }

#loadingScreen {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,93,7,0.5);
  display:flex;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

/* Spinner container */
.spinnerWrapper {
  position: relative;
  width: 70px;
  height: 70px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Spinner */
.spinner {
  width: 70px;
  height: 70px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #54ac33;
  border-radius: 50%;
  animation: spinx 1s linear infinite;
}

/* โลโก้อยู่ตรงกลาง spinner */
.spinnerLogo {
  position: absolute;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  width: 50px; /* ขนาดโลโก้ */
  height: 50px;
}

@keyframes spinx {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.xcontainer {
    position: relative;
    height: 240px; /* ต้องมีพื้นที่ให้ซ่อน */
    overflow: hidden;
}

  .xfooter {
    position: absolute;
    bottom: -200px; /* ซ่อนครึ่งล่างไว้ใต้จอ */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 100px);  /* ล้นข้างละ 30px */
    height: 350px;
    background: linear-gradient(90deg, rgba(9, 36, 9, 1) 0%, #16b000 100%);
    border: 3px solid #C4D94E;
    border-radius: 50%;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    z-index: 1;
  }

  /* ครึ่งวงกลมล้นออกซ้ายขวา */
  .footer {
    position: fixed;
    bottom: -50px; /* ซ่อนครึ่งล่างไว้ใต้จอ */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 70px); /* ล้นข้างละ 30px */
    height: 135px;
    background: linear-gradient(90deg, rgba(9, 36, 9, 1) 0%, #16b000 100%);
    border: 3px solid #C4D94E;
    border-radius: 50%;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.3);
    z-index: 1;
      
  -webkit-mask: radial-gradient(
    circle 40px at center top, /* ขนาดวงหลุม 45px */
    transparent 0, transparent 40px,
    black 41px, black 100%
  );
  mask: radial-gradient(
    circle 40px at center top,
    transparent 0, transparent 40px,
    black 41px, black 100%
  );
  }

  /* โลโก้ตรงกลาง */
  .footer-logo {
    position: fixed;
    bottom: 50px !important;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 3px solid #C4D94E;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 3;
  }

  .footer-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
  }

  /* เมนูไอคอน */
  .footer-menu {
    position: fixed;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 2;
    padding: 5px 0;
  }

  .footer-menu button {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    cursor: pointer;
    line-height: 15px;
  }

  .footer-menu button span {
    font-size: 12px;
  }

  /* ให้โลโก้ตรงกลางมีระยะห่าง */
  .footer-menu button:nth-child(3) {
    /* margin: 0 5px; เว้นช่องให้โลโก้ */
  }
    .icox{
        font-size: 28px;
    }
    .mhi{
      height: 40px !important; 
    }

@media (min-width: 768px) {
    .nshow {
        display: none;
    }
    .xcontainer {
        display: block !important;
    }
}
@media (max-width: 768px) {
    .xcontainer {
        display: none !important;
    }
}

  @media (max-width: 480px) {
      
    .footer {
      width: calc(100% + 80px);
      height: 130px;
      bottom: -45px;
    }

    .footer-logo {
      width: 70px;
      height: 70px;
      bottom: 60px;
    }

    .footer-menu button {
      font-size: 18px;
    }

    .footer-menu button span {
      font-size: 10px;
    }

    .footer-menu button:nth-child(3) {
      /* margin: 0 50px; */
    }

  }

.lottery-search-wrapper {
    margin: 40px auto;
    padding: 20px 0 20px 0;
    background: rgba(15,155,15,0.1);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    text-align: center;
    box-shadow: 0 1px 6px rgba(15,155,15,0.5);
    color: #045414;
}
.title { font-size: 26px; margin-bottom: 18px; }
.search-input {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap:wrap;
}

.digit {
    position: relative;
    width: 60px;
    height: 68px;
    text-align: center;
    font-size: 28px;
    border-radius: 12px;
    border: 0px solid rgba(255,255,255,0.08);
    outline: none;
    background: linear-gradient(45deg, #0f9b0f, #00b09b);
    color: #fff;
    transition: 0.15s;
    -webkit-appearance: none;
    box-shadow: 0 1px 6px rgba(15,155,15,0.5);
}

.digit:focus {
    background: linear-gradient(45deg, #1d976c, #93f9b9);
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}
.digit.error {
    border: 1px solid #ff4e4e !important;
    background: rgba(255,0,0,0.12);
}
@keyframes shakeX {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-3px); }
    50%  { transform: translateX(3px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}
.shake { animation: shakeX 0.22s; }
.result-box { margin-top: 20px; }
.result-card {
    background: rgba(255,255,255,0.06);
    padding: 18px;
    border-radius: 12px;
    margin: 10px auto;
    max-width: 420px;
    color:#fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    text-align: center;
}
.result-number { font-size: 28px; font-weight:700; color:#ffeb3b; }
.buy-btn {
    margin-top:10px;
    padding: 10px 15px;
    font-size: 18px;
    background: #ffca28;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.buy-btn:hover { background: #ffe082; }
/* responsive */
@media(max-width:540px){
    .digit { width: 44px; height:54px; font-size:20px; }
    .search-input {
     gap: 5px;   
    }
}

.bxzx {
  position: relative;
  background: linear-gradient(0deg, #00b09b 0%, #0f9b0f 50%, #00b09b 100%);
  box-shadow: 0px 0px 10px 0px rgba(15,155,15,0.5);
  border: 0px solid #cccccc;
  border-radius: 10px;
  height: 100px auto;
  text-align: center;
  color: aliceblue;
  padding: 5px 25px 5px 25px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.bxzx::before {
  content: "";
  position: absolute;
  inset: 1px;                 
  border: 1px solid #e8e8e8;   
  border-radius: 10px;
}
.bxzx:hover {
  box-shadow: 0 8px 18px rgba(15,155,15,0.5);
  transform: translateY(-4px);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 คอลัมน์ */
  gap: 12px; /* ช่องว่างระหว่างช่อง */
  max-width: 422px;
  margin: auto;
}

.radio-item {
  position: relative;
  padding: 12px;
  background: #CDE35A;
  /* border: 0px solid #ccc; */
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 1px 6px rgba(15,155,15,0.5);
}

.radio-item::before {
  content: "";
  position: absolute;
  inset: 1px;                 
  border: 1px solid #e8e8e8;   
  border-radius: 12px;
}

.radio-item:hover {
  border-color: #00a86b;
  background: #f4fff8;
}

.radio-item input[type="radio"] {
  display: none;
}

.radio-item.selected {
  border-color: #00a86b; 
  background: linear-gradient(180deg, #08A94C 0%, #08A048 30.5%, #056C30 74.5%, #03431E 100%);
  color: aliceblue;
  /* background: #e6ffe9; */
}

.sbo{
max-width: 422px; 
margin: auto;    
}
@media(max-width:540px){
    .radio-grid{
        padding: 0 20px 0 20px;
        font-size: 13px;
        gap: 5px;
    }
    .sbo{
      padding: 0 20px 0 20px;   
    }
}

.botton_search {
  position: relative;
  background: linear-gradient(0deg, #00b09b 0%, #0f9b0f 50%, #00b09b 100%);
  box-shadow: 0px 0px 10px 0px rgba(15,155,15,0.5);
  border-radius: 12px;
  text-align: center;
  color: aliceblue;
  padding: 12px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  border: none;
}
.botton_search::before {
  content: "";
  position: absolute;
  inset: 1px;                 
  border: 1px solid #e8e8e8;   
  border-radius: 12px;
}
.botton_search:hover {
  box-shadow: 0 8px 18px rgba(15,155,15,0.5);
  transform: translateY(-4px);
}
.box-parent {
    padding: 5px !important;
    /* border: 1px #BB1417 solid; */
    position: relative;
    height:  50px;
}
.lottery-footer {
    position: absolute;
    z-index: 9;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;

    margin: 0 auto;
    padding: 20px 0;
    background: #E7FFE5;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(15,155,15,0.5);
    color: #045414;
}

.btn-x{
  width: 30px;
  height: 30px;
  background: linear-gradient(0deg, #00b09b 0%, #0f9b0f 50%, #00b09b 100%);
  box-shadow: 0px 0px 10px 0px rgba(15,155,15,0.5); 
  border-radius: 50%;
  overflow: hidden;
  color: brown;
  border: none;
  font-size: 20px;
}
.navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 18px !important;
    color: #fff !important;
}