* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    /* background: url(../images/bg-all-2.webp) no-repeat #a47f49 top center; */
    background: url(../images/bg-all-2.webp) no-repeat top center;
    background-size: cover;
    overflow: hidden; 
    font-family: sans-serif; 
}
body.login_page {
  background: url(../images/bg-all-2.webp) no-repeat #a47f49 top center;
}
h2,h3,li,p,div {
    font-family: 'Bebas';
    
}

h2 {
    font-size: 10vw;
    line-height: 1.2;
    color: #fff;
    font-family: 'Bebas';
    text-align: center;
    margin: 2vw 0 6vw 0;
}
#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 2;
    background-color: #a47f49 ;
    
}

/* กล้อง video element - hidden, ใช้เป็น texture */
#camera-feed {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Three.js canvas อยู่ด้านบนสุด */
#three-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* UI Overlay */
#ui {
    position: absolute;
    top: 0; left: 0;
    width: 100%; 
    height: 100%;
    height: 100dvh;
    pointer-events: none;
    z-index: 10;
    /* padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); */
    padding-bottom: env(safe-area-inset-bottom);
}

#start-screen {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 20;
    padding: 4vw;
    gap: 0;
     background: url(../images/bg-all-2.webp) no-repeat top center;
    background-size: cover;
    z-index: 1;
    
}
#start-screen img {
  width: 45vw;
  width: 85vw;
}
#animation-pic {
  position: relative;
  top: -5vw;
}

#start-screen h1 {
  color: #fff;
  font-size: 10vw;
  text-align: center;
  font-family: 'DB Ozone X';
  font-family: 'Bebas';
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  margin-top: -10vw;
}

#start-screen p {
  color: #fff;
  font-size: 4vw;
  text-align: center;
  font-family: 'DB Ozone X';
  font-family: 'Bebas';
  line-height: 1.5;
  margin: 1vw 0 4vw 0;
  margin-top: -10vw;
}

#start-btn {
    margin-top: 2vw;
    padding: 1vw 5vw;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 2vw;
    font-size: 4vw;
    cursor: pointer;
    pointer-events: all;
    font-family: 'DB Ozone X';
    font-family: 'Bebas';
    margin: 0;
}

#start-btn:active { transform: scale(0.97); }
#search-hint .label {
  font-size: 5vw;
  font-family: 'Bebas';
  font-weight: bold;
  text-shadow: 2px 2px 10px #000;
  margin-top: -5vw;
}

#hud {
    position: absolute;
    bottom: 10vw;
    left: 0; right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    width: 40vw;
    margin-left: auto;
    margin-right: auto;
    /* padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); */
}
#hud img{
  filter: drop-shadow(5px 5px 5px rgb(0, 0, 0));
}

#frame-info {
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    font-variant-numeric: tabular-nums;
}

.controls {
    display: flex;
    gap: 12px;
}

.ctrl-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.ctrl-btn.active {
    background: rgba(255,255,255,0.85);
    color: #000;
}

 #error-msg {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.9);
  color: #ff6b6b;
  font-size: 6vw;
  text-align: center;
  padding: 24px;
  gap: 12px;
  z-index: 30;
  font-family: 'DB Ozone X';
}

#error-msg small {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  line-height: 1;
  font-size: 6vw;
}
.modal-btn {
  margin-top:8px; 
  border:1px solid #555; 
  padding: 0.7vw 12vw;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 2vw;
  font-size: 6vw;
  cursor: pointer;
  pointer-events: all;
  font-family: 'DB Ozone X';
  margin: 0;
  margin-top: 3vw;

}

#placement-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.crosshair {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    position: relative;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,0.5);
}
.crosshair::before {
    width: 1px; height: 24px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.crosshair::after {
    width: 24px; height: 1px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/******************************/
.hidden_popup {
  display: none !important; /* Overrides default styles */
}

.font-bebas {
    font-family: 'Bebas';
    font-size: 9vw;
}
.btn_style{
    padding: 3vw;
    line-height: 1.2;
    -webkit-border-radius: 2vw;
    -moz-border-radius: 2vw;
    border-radius: 2vw;
    background-color: #000;
    color: #fff;
    pointer-events: all;
    text-align: center;
    border: 0 none;
}
select,
input {
    pointer-events: all;
    height: 18vw;
    margin-top: 5vw;
    font-size: 7vw;
    border: 0 none !important;
    
}

.form-control,
.form-select {
    font-size: 7vw;
    color: #999;
}
input::placeholder {
  color: #999;
  opacity: 1; /* Ensures custom color is fully vibrant */
}

img {
    width: 100%;
    height: auto;
}
#logo {
    position: absolute;
    right: 4vw;
    top: 4vw;
    width: 15vw;
}
#logo img {
    width: 100%;
    height: auto;
}
#login {
    width: 100%;
    text-align: center;
}
#banner {
    /* width: 32vw;
    margin: 0 auto;
    margin-top: 20vw;
    margin-bottom: 10vw; */
    width: 30vw;
    margin: 0 auto;
    margin-top: 12vw;
    margin-bottom: 6vw;
}
#btn_start {
    position: absolute;
    bottom: 0;
    width: 90vw;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    bottom: 5vw;
    /* bottom: calc(70px + env(safe-area-inset-bottom, 0px)); */
}
p#alertmsg {
  color: #fff;
  font-size: 4vw;
  text-align: left;
  max-width: fit-content;
  line-height: 1.5;
  margin-top: 2vw;
  margin-bottom: 0;
  font-size: 4vw;
  font-family: 'Bebas', 'DB Ozone X', Arial, sans-serif;
  filter: drop-shadow(0px 0px 10px rgb(0, 0, 0));
  position: relative;
  padding-left: 7vw;
}
p#alertmsg img {
  width: 5vw;
  margin-top: 1vw;
}
p#alertmsg svg {
  width: 5vw;
  height: 5vw;
  position: absolute;
  left: 0;
  top: 0.8vw;
}
#popup {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 100;
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 20vw;
    /* display: none; */
}
#popup_content {
    background: url(../images/bg-all-2.webp) no-repeat top center;
    background-size: cover;
    overflow: hidden;
    width: 90vw;
    height: 50vh; 
    /* position: absolute;
    inset: 0; */
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#textpopup {
    font-size: 10vw;
    color: #fff;
    text-align: center;
    margin-bottom: 5vw;
    line-height: 1.2;
}
.btn_popup {
    width: 40vw; 
}
#popup_button{
  display: flex;
  gap: 3vw; /* Optional spacing between columns */
}
#modal-caught {
    padding: 0;
}
.modal {
  background: url(../images/bg-all-2.webp) no-repeat top center;
  background-size: cover;
  overflow: hidden;
  width: 90vw;
  height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -4vw;
}
.modal button {
    width: 80vw;
    margin-top: 7vw;
}

#btn_no,
#btn_yes {
  flex: 1; /* Distributes space equally among children */
}

#top-screen,
#topbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
     font-family: 'Bebas'; 
}
#top-screen #user-profile img,
#topbar #user-profile img {
    width: 7vw;
    margin-right: 5px;
}
#user-profile {
    font-size: 4.5vw;
    color: #fff;
    padding-top: 2.7vw;
    font-family: 'Bebas', 'DB Ozone X', Arial, sans-serif;
    text-decoration: none;
    text-overflow: ellipsis;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    width: 35vw;
    text-shadow: 2px 2px 10px #000;
}
#content-score {
    width: 51vw;
    position: absolute;
    right: 3vw;
    top:3vw;
}
#content-score div {
    display: table-cell;
    margin-left: 5vw;
    border-left: 5px solid transparent
}
#user-score{
    width: 20vw;
    position: relative;
    right: 0
}
#countdown {
    width: 31vw;
    position: relative;
}
#user-score p,
#countdown p {
    position: absolute;
    top: 2vw;
    right: 3vw;
    font-size: 4.5vw;
    font-family: 'Bebas';
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

/*********** TimeOut ************/
#timeout {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    /* pointer-events: all; */
    gap: 0; 
    padding: 0 6vw;
    padding-bottom: 20vw;
}
#timeout h2 {
  text-decoration: none;
  text-overflow: ellipsis;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  font-family: 'Bebas', 'DB Ozone X', Arial, sans-serif;
}
#logo-person {
    width: 20vw;
    margin: 0 auto;
}
#total-score {
    width: 100%;
    min-height: 44vw;
    background: url(../images/bg-person-board.png) no-repeat top center;
    background-size: contain;
    display: flex;
    gap: 0;
    padding: 24vw 6vw 0 7vw;
    padding: 24vw 5.5vw 0 6.5vw;
}

.flex-container {
  display: flex; /* Establishes the flex context */
  gap: 20px;     /* Optional spacing between columns */
}

.column {
  flex: 1; /* Evenly distributes available horizontal space */
  text-align: center;
  font-size: 12vw;
  color: #fff;
  font-family: 'Bebas';
}


/********* Board **********/
#score-board {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    gap: 3%;
    flex-wrap: wrap;
    justify-content: center;  /* Centers columns horizontally */
    align-items: center; 
    padding: 1vw;
}
#board-left,
#board-right {
  flex: 1;
  width: 48%;
  overflow: hidden;
  position: relative;
}
#board-left {
  min-height: 31.5vw;
}

#top-board {
  width: 100%;
  margin: 0 auto;
   
}
#top-board img {
  width: 100%;
  position: absolute;
  top: 0;
   left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  z-index: -1;
}
#top-board-score {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
    gap: 0; /* Spacing between columns */
    position: relative;
    z-index: 2;
    text-align: center;
    min-height: 18vw;

}


#top-board-2{
    /* width: 30%; */
}
#top-board-3{
    /* width: 30%; */
}
#top-board-1,
#top-board-2,
#top-board-3 {
    padding-top: 11.5vw;
}
#top-board-1{
    padding-top: 10.5vw;
}

#top-board h2 {
    font-size: 1.7vw;
    color: #000;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.2;
}
#top-board p {
    color: #4d4d4d;
    font-size: 1vw;
    margin: 0 0 0.3vw 0;
    text-transform: uppercase;
    line-height: 1.1;
}
.top_score {
    color: #000;
    font-size: 1.5vw;
    line-height: 1;
}
#gold-board,
#sliver-board,
#copper-board {
    padding-top: 0;
    /* width: 84vw; */
    margin: 0 auto;
}
#copper-board {
    margin-top: 2vw;
}
#score-board ul {
    margin: 0;
    padding: 0;
}
/*#gold-board li {*/
#score-board li {
    margin: 0;
    margin-top: 1vw;
    padding: 0.8vw 0;
    width: 100%;
    background: url(../images/gold-board.png) no-repeat top center;
    background-size: contain;
    display: grid;
    /*grid-template-columns: 200px 1fr 2fr 15%; */
    grid-template-columns: 7% 25% 37% 15%;
    gap: 5%;
    font-size: 1.4vw;
}
.board_order {
    text-align: right;
}
.board_identity{
    color: #826d42;
    padding-right: 2vw;
    text-decoration: none;
    text-overflow: ellipsis;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}
.board_score{
    color: #fff;
    text-align: right;
    padding-right: 48%;
}

#sliver-board li {
    background: url(../images/sliver-board.png) no-repeat top center;
    background-size: contain;
}
#sliver-board li:first-child {
  margin-top: 0;
}
#sliver-board .board_identity{
    color: #666;
    color: #826d42;
}
#copper-board {
    position: relative;
    min-height: 12vw;
}
#copper-board ul {
    /* background: url(../images/copper-board.png) no-repeat top center;
    background-size: contain; */
    position: relative;
    z-index: 10;
    min-height: 12vw;
}
#copper-board li {
    background: none;
    margin: 0;
    padding: 0.77vw 0 0 0;
    font-size: 1.25vw;
    line-height: 1.2;

}
#copper-board .board_identity{
    color: #835242;
}
#bg-list{
    position: absolute;
    top: 0;
    z-index: -1;
}

/* For one column*/
#score-board.one_column {
    display: block;
}
#score-board.one_column  #board-left{
    margin: 0 auto;
}
#score-board.one_column  #board-right {
    display: none;
    height: 0;
}

/********* Leader Board *********/
/* ===== Podium (Top 3) ===== */
  .podium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
    z-index: 2;
    text-align: center;
    min-height: 19vw;
    width: 100%;
    margin: 0 auto;
  }
  .podium .slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 0;
    padding-top: 20.5vw;
  }
  /* อันดับ 1 ตรงกลาง ใหญ่กว่า */
  .podium .slot.first { 
    order: 2;
    padding-top: 19vw;
  }
  .podium .slot.second { order: 1; }
  .podium .slot.third { order: 3; }

  .slot .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-size: 2.5vw;
    color: #000;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.2;
    text-decoration: none;
    display: block;
    width: 95%;
    font-family: 'Bebas', 'DB Ozone X', Arial, sans-serif;
  }
  .slot.first .name { 
    font-size: 2vw;
    font-size: 3.2vw
  }
  .slot .identity {
    color: #4d4d4d;
    font-size: 1.5vw;
    margin: 0 0 0.3vw 0;
    text-transform: uppercase;
    line-height: 1.1;
    text-decoration: none;
    text-overflow: ellipsis;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
  }
  .slot .score { 
    color: #000;
    font-size: 2.6vw;
    line-height: 1; 
  }
  .slot.first .score {  }

  /* ===== List (4-10) ===== */
  .list { 
    display: flex; 
    flex-direction: column; 
  }
  .row {
    margin: 0;
    margin-top: 0.5vw;
    padding: 0.9vw 0;
    width: 100%;
    background: url(../images/gold-board.png) no-repeat top center;
    background-size: contain;
    display: grid;
    grid-template-columns: 7% 25% 37% 15%;
    gap: 5%;
    font-size: 1.4vw;
  }
  .board_name {
    text-decoration: none;
    text-overflow: ellipsis;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    font-family: 'Bebas', 'DB Ozone X', Arial, sans-serif;
  }
  #sliver-board .row {
    background: url(../images/gold-board-update.png) no-repeat top center;
    background-size: contain;
  }
  #copper-board .row {
    background: url(../images/copper-board-list.jpg) no-repeat top right;
    background-size: 8.5vw;
    background-position: 94% 57%;
    margin: 0;
    padding: 0.3vw 0 0 0;
    font-size: 1.25vw;
    line-height: 1.2;
    margin-top: 0.3vw;
  }
  #copper-board .list{
    justify-content: center;
    align-items: center;
    min-height: 12vw;
  }
  #copper-board .board_identity,
  #copper-board .board_score {
    font-size: 1vw;
  }
 

  .empty { 
    text-align: center;
    color: #bbb;
    padding: 40px 0;
    font-size: 14px;
  }


#none_display {
  position: absolute;
  width: 100%;
  height: 100dvh;
  top: 0;
  z-index: 200;
  text-align: center;
  background-color: #000;
  color: #fff;
  text-align: center;
  font-family: 'DB Ozone X';
  font-weight: bold;
  font-size: 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#countdown-start {
  width: 100%;
  text-align: center;
  font-size: 17vw;
  color: #fff;
  margin-top: 0;
}

/*********** Loading *********/
#loader-content {
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba(0,0,0,0.9);
  background-color: rgba(0,0,0,1);
  position: absolute;
  top: 0;
  z-index: -1;
}
#loader-content.loadpage {
  z-index: 100;
}
.hide_load{
  display: none !important;
}
.zindex_load{
  z-index: 100;
}
.loader {
  width:35vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: 
    radial-gradient(farthest-side,#ffa516 94%,#0000) top/8px 8px no-repeat,
    conic-gradient(#0000 30%,#ffa516);
  -webkit-mask: radial-gradient(farthest-side,#0000 calc(100% - 8px),#000 0);
  animation: l13 1s infinite linear;
}
@keyframes l13{ 
  100%{transform: rotate(1turn)}
}

/* Optional: Make it responsive */

@media (max-width: 768px) {
    #top-board-score {
        /*grid-template-columns: 1fr; /* Stacks vertically on mobile */
    }
}
@media (max-width: 600px) {
  .modal {
    height: 50vh; 
    top: -10vw;
  }
  #banner {
    width: 32vw;
    margin-top: 20vw;
    margin-bottom: 10vw;
  }
  #start-screen img {
    width: 50vw;
    width: 100vw;
  }
  #start-screen h1 {
    font-size: 12vw;
  }
  #start-screen p,
  #start-btn {
    font-size: 6vw;
  }
  
}
@media (max-width: 500px) {
  #user-profile {
    padding-top: 1vw;
  }
}
@media (max-width: 390px) {
  #user-profile {
    padding-top: 0.6vw;
  }
}







/********* Animate **********/
.fade-in-fwd {
	-webkit-animation: fade-in-fwd 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
	animation: fade-in-fwd 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
.jello-vertical {
	-webkit-animation: jello-vertical 0.9s both;
	animation: jello-vertical 0.9s both;
}
.heartbeat {
	-webkit-animation: heartbeat 1.5s ease-in-out infinite both;
	animation: heartbeat 1.5s ease-in-out infinite both;
}

@-webkit-keyframes fade-in-fwd {
  0% {
    -webkit-transform: translateZ(-80px);
            transform: translateZ(-80px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    opacity: 1;
  }
}
@keyframes fade-in-fwd {
  0% {
    -webkit-transform: translateZ(-80px);
            transform: translateZ(-80px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    opacity: 1;
  }
}

.bounce-top {
	-webkit-animation: bounce-top 0.9s both;
	        animation: bounce-top 0.9s both;
}
@-webkit-keyframes bounce-top {
  0% {
    -webkit-transform: translateY(-45px);
            transform: translateY(-45px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
    opacity: 1;
  }
  24% {
    opacity: 1;
  }
  40% {
    -webkit-transform: translateY(-22px);
            transform: translateY(-22px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  65% {
    -webkit-transform: translateY(-10px);
            transform: translateY(-10px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  82% {
    -webkit-transform: translateY(-4px);
            transform: translateY(-4px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  93% {
    -webkit-transform: translateY(-2px);
            transform: translateY(-2px);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  25%,
  55%,
  75%,
  87% {
    -webkit-transform: translateY(0px);
            transform: translateY(0px);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  100% {
    -webkit-transform: translateY(0px);
            transform: translateY(0px);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
    opacity: 1;
  }
}
@keyframes bounce-top {
  0% {
    transform: translateY(-16px); /* ลดจาก -40px */
    animation-timing-function: ease-in;
    opacity: 1;
  }
  24% {
    opacity: 1;
  }
  40% {
    transform: translateY(-9px); /* ลดจาก -22px */
    animation-timing-function: ease-in;
  }
  65% {
    transform: translateY(-4px); /* ลดจาก -10px */
    animation-timing-function: ease-in;
  }
  82% {
    transform: translateY(-2px); /* ลดจาก -4px */
    animation-timing-function: ease-in;
  }
  93% {
    transform: translateY(-1px); /* ลดจาก -2px */
    animation-timing-function: ease-in;
  }
  25%,
  55%,
  75%,
  87% {
    transform: translateY(0px);
    animation-timing-function: ease-out;
  }
  100% {
    transform: translateY(0px);
    animation-timing-function: ease-out;
    opacity: 1;
  }
}
@-webkit-keyframes jello-vertical {
  0% {
    transform: scale3d(1, 1, 1);
  }
  30% {
    /* เดิม 0.75, 1.25 -> ปรับให้บีบและยืดน้อยลง */
    transform: scale3d(0.88, 1.12, 1);
  }
  40% {
    /* เดิม 1.25, 0.75 -> ปรับลดความเด้งสวนกลับ */
    transform: scale3d(1.12, 0.88, 1);
  }
  50% {
    /* เดิม 0.85, 1.15 */
    transform: scale3d(0.93, 1.07, 1);
  }
  65% {
    /* เดิม 1.05, 0.95 */
    transform: scale3d(1.02, 0.98, 1);
  }
  75% {
    /* เดิม 0.95, 1.05 */
    transform: scale3d(0.98, 1.02, 1);
  }
  100% {
    transform: scale3d(1, 1, 1);
  }
}
@keyframes jello-vertical {
  0% {
    transform: scale3d(1, 1, 1);
  }
  30% {
    /* เดิม 0.75, 1.25 -> ปรับให้บีบและยืดน้อยลง */
    transform: scale3d(0.88, 1.12, 1);
  }
  40% {
    /* เดิม 1.25, 0.75 -> ปรับลดความเด้งสวนกลับ */
    transform: scale3d(1.12, 0.88, 1);
  }
  50% {
    /* เดิม 0.85, 1.15 */
    transform: scale3d(0.93, 1.07, 1);
  }
  65% {
    /* เดิม 1.05, 0.95 */
    transform: scale3d(1.02, 0.98, 1);
  }
  75% {
    /* เดิม 0.95, 1.05 */
    transform: scale3d(0.98, 1.02, 1);
  }
  100% {
    transform: scale3d(1, 1, 1);
  }
}
@-webkit-keyframes heartbeat {
  from {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-transform-origin: center center;
            transform-origin: center center;
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  10% {
    -webkit-transform: scale(0.91);
            transform: scale(0.91);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  17% {
    -webkit-transform: scale(0.98);
            transform: scale(0.98);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  33% {
    -webkit-transform: scale(0.87);
            transform: scale(0.87);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  45% {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
}
@keyframes heartbeat {
  from {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-transform-origin: center center;
            transform-origin: center center;
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  10% {
    -webkit-transform: scale(0.91);
            transform: scale(0.91);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  17% {
    -webkit-transform: scale(0.98);
            transform: scale(0.98);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
  33% {
    -webkit-transform: scale(0.87);
            transform: scale(0.87);
    -webkit-animation-timing-function: ease-in;
            animation-timing-function: ease-in;
  }
  45% {
    -webkit-transform: scale(1);
            transform: scale(1);
    -webkit-animation-timing-function: ease-out;
            animation-timing-function: ease-out;
  }
}

/* กำหนดค่าเริ่มต้นให้กับตัวรูปภาพ */
.shake-horizontal img{
  /*display: inline-block;*/
  /* เรียกใช้งาน animation ชื่อ slideLeftRight ทำงานนาน 2 วินาที แบบนุ่มนวล (ease-in-out) และวนลูปไม่สิ้นสุด */
  /*animation: slideLeftRight 2s ease-in-out infinite;*/
  width: 40vw;
}

/* สร้างสถานะการขยับ ซ้าย-ขวา */
@keyframes slideLeftRight {
  0%, 100% {
    transform: translateX(0); /* อยู่ตำแหน่งตรงกลาง */
  }
  50% {
    transform: translateX(15px); /* ขยับไปทางขวา 15px (ปรับตัวเลขเพิ่ม-ลดความแรงได้) */
  }
}
