html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: url('Silk_Road/background_nighthp.jpg') no-repeat center center fixed;
  background-size: cover;
}

/* jika layar <= 768px (umumnya HP) */
@media only screen and (max-width: 768px) {
  body {
    background: url('Silk_Road/background_nighthp.jpg') no-repeat center center fixed;
    background-size: cover;
  }
}
/* efek lampu bergerak */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.02) 0px,
    rgba(255,255,255,0.02) 2px,
    transparent 2px,
    transparent 6px
  );
  animation: bgMove 20s linear infinite;
  mix-blend-mode: screen;
  will-change: transform;
  z-index: 1;
}

@keyframes bgMove {
  from { transform: translate(0,0); }
  to { transform: translate(-200px,-200px); }
}


/* lapisan bintang acak */
#star-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0.5;
  animation: twinkle 2s infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.2; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1.2); }
}

/* SLOT AREA */
#slot-container {
  display:flex;
  justify-content:center;
  margin-top:5vh;
}


/* KHUSUS HP */
@media (max-width: 768px) {
  #slot-container {
    justify-content:center;
    margin-top: 10vh; /* 🔥 turunin dikit */
  }
}
/* SLOT WRAPPER */
#slot {
  display:flex;
  gap:1.5vw;
  padding:2vw;
  background: linear-gradient(145deg, #1a0033, #000);
  border-radius:25px;
  border: 4px solid gold;
  box-shadow:
    0 0 20px gold,
    inset 0 0 30px rgba(255,215,0,0.3),
    0 0 60px rgba(255,0,200,0.4);
  position: relative;
}

/* lampu pinggir */
#slot::before {
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:30px;
  background: linear-gradient(90deg, red, yellow, lime, cyan, magenta, red);
  background-size:400%;
  animation: borderRun 6s linear infinite;
  z-index:-1;
  filter: blur(8px);
}

@keyframes borderRun {
  0% { background-position:0% }
  100% { background-position:400% }
}

/* REEL RESPONSIVE */
.reel {
  width:12vw;
  max-width:90px;
  height:56vw;
  max-height:360px;
  overflow:hidden;
  border-radius:15px;
  background: linear-gradient(180deg,#111,#222);
  padding:0.5vw;
  box-shadow:
    inset 0 0 15px rgba(0,0,0,0.9),
    inset 0 0 30px rgba(255,255,255,0.05),
    0 0 15px rgba(0,0,0,0.8);
  position: relative;
}

/* efek kaca */
.reel::after {
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.15),
    transparent 40%
  );
  pointer-events:none;
}

/* CELL */
.cell {
  width:100%;
  aspect-ratio:1/1;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* SYMBOL */
.symbol {
  width:90%;
  height:90%;
  object-fit:contain;
}

/* BIG WIN */
/* BASE */
#bigWin {
  position: fixed;
  top: 30%;
  width: 100%;
  text-align: center;
  display: none;
  z-index: 9999;
}

/* TITLE */
#bigWinTitle {
  font-size: 6vw;
  font-weight: bold;
  animation: pop 0.6s ease infinite alternate;
}

/* AMOUNT */
#bigAmount {
  font-size: 5vw;
  margin-top: 10px;
}

/* LEVEL WARNA */
.big { color: #00ffcc; text-shadow: 0 0 20px cyan; }
.mega { color: gold; text-shadow: 0 0 30px orange; }
.sensational { color: #ff00ff; text-shadow: 0 0 40px magenta; }
.super { 
  color: #ff0000; 
  text-shadow: 0 0 50px red, 0 0 100px gold; 
}

/* ANIMASI */
@keyframes pop {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}
/* BIG WIN */
#bigWinTitle {
  margin-top:20vh;
  font-size:8vw;
}

#bigWinAmount {
  font-size:6vw;
}
/* 🎬 SCREEN OVERLAY */
#megaWinScreen {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  display:none;
  justify-content:center;
  align-items:center;
  flex-direction:column;
  background: radial-gradient(circle, rgba(0,0,0,0.6), rgba(0,0,0,0.95));
  z-index: 99999;
}

/* TEXT MEGA / SUPER */
.mega-text {
  font-size: 8vw;
  font-weight: bold;
  color: gold;
  text-shadow:
    0 0 20px gold,
    0 0 40px orange,
    0 0 80px red;
  animation: megaPop 0.8s ease infinite alternate;
}

/* NOMINAL */
.mega-amount {
  font-size: 6vw;
  color: #00ffcc;
  margin-top: 20px;
  text-shadow: 0 0 20px cyan;
}

/* ANIMASI TEXT */
@keyframes megaPop {
  from { transform: scale(1); }
  to { transform: scale(1.2); }
}

/* FLASH */
.flashMega {
  position:absolute;
  width:100%;
  height:100%;
  background:white;
  opacity:0;
  animation: flashMegaAnim 400ms ease;
}

@keyframes flashMegaAnim {
  0% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* SHAKE SCREEN */
.shake {
  animation: shake 0.4s;
}
/* 💥 WIN PECAH */
.cell.win {
box-shadow: 0 0 20px gold, 0 0 40px orange;
  animation: explodeCell 0.5s ease forwards;
  position: relative;
  z-index: 2;
}

@keyframes explodeCell {
  0% { transform: scale(1) rotate(0deg); filter: brightness(1); }
  40% { transform: scale(1.5) rotate(10deg); filter: brightness(2); }
  70% { transform: scale(0.9) rotate(-8deg); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* 💣 PARTICLE LEBIH KUAT */
.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #fff, gold);
  border-radius: 50%;
  pointer-events: none;
  animation: explode 800ms ease-out forwards;
}

@keyframes explode {
  from {
    transform: translate(0,0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(var(--x), var(--y)) scale(0.3);
    opacity: 0;
  }
}

/* 💫 SHOCKWAVE */
.wave {
  position: absolute;
  border: 2px solid gold;
  border-radius: 50%;
  pointer-events: none;
  animation: waveAnim 600ms ease-out forwards;
}

@keyframes waveAnim {
  from {
    width: 10px;
    height: 10px;
    opacity: 1;
  }
  to {
    width: 120px;
    height: 120px;
    opacity: 0;
  }
}
#fx-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* clone symbol */
.fx-symbol {
  position: absolute;
  width: 60px;
  height: 60px;
  animation: boom 600ms ease forwards;
}

@keyframes boom {
  0% { transform: scale(1) rotate(0deg); opacity:1; }
  40% { transform: scale(1.8) rotate(15deg); }
  70% { transform: scale(0.8) rotate(-10deg); }
  100% { transform: scale(0) rotate(25deg); opacity:0; }
}
/* 🎬 CINEMATIC SCREEN EFFECT */
#cinematic {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:9998;
}

.flash {
  position:absolute;
  width:100%;
  height:100%;
  background:white;
  opacity:0;
  animation: flashAnim 300ms ease;
}

@keyframes flashAnim {
  0% { opacity: 0.8; }
  100% { opacity: 0; }
}

/* 🌟 GLOW MENANG */
.cell.win {
  animation: winGlow 0.6s ease 2;
  z-index: 5;
}

@keyframes winGlow {
  from { filter: brightness(1) drop-shadow(0 0 5px gold); }
  to { filter: brightness(2) drop-shadow(0 0 20px orange); }
} 
@keyframes shake {
  0% { transform: translate(0,0); }
  25% { transform: translate(3px,-3px); }
  50% { transform: translate(-3px,3px); }
  75% { transform: translate(2px,-2px); }
  100% { transform: translate(0,0); }
  
}
#game {
  width: 100%;
  height: 100%;
}
#giftFx {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  z-index:9999;
}

.gift-box {
  position:absolute;
  width:120px;
  height:120px;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  animation: giftBoom 700ms ease forwards;
}

@keyframes giftBoom {
  0% { transform:translate(-50%,-50%) scale(0.5); opacity:0; }
  50% { transform:translate(-50%,-50%) scale(1.2); }
  100% { transform:translate(-50%,-50%) scale(0); opacity:0; }
}

.gift-text {
  position:absolute;
  top:40%;
  width:100%;
  text-align:center;
  font-size:40px;
  font-weight:bold;
  color:gold;
  animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
  0% { opacity:0; transform:translateY(30px); }
  100% { opacity:1; transform:translateY(0); }
}

@keyframes lightRun {
  0% { background-position:0; }
  100% { background-position:300px; }
}

/* MODE BAR */
#mode {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* DEFAULT = PC (desktop) */
/* DEFAULT = PC (desktop) */
/* ========================= */
/* DESKTOP */
/* ========================= */
#logo {
  position: fixed; /* 🔥 kunci: tidak ikut layout */
  top: 50%;
  left: 0%; /* posisi di kiri layar */
  transform: translateY(-50%);
  z-index: 10;
}

#logo img {
  width: 360px;   /* 2x */
  height: 126px;
  display: block;
}


/* ========================= */
/* 📱 HP */
/* ========================= */
@media (max-width: 768px) {

  #logo {
    position: absolute; /* kembali normal di HP */
    top: 2%; /* sudah kamu bilang ini oke */
    left: 50%;
    transform: translateX(-50%);
  }

  #logo img {
    width: 210px;
    height: 63px;
  }

}
/* ✨ IDLE GLOW */
#logo img {
  animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 5px gold);
  }
  to {
    filter: drop-shadow(0 0 20px orange);
  }
}
/* 🎰 SAAT SPIN */
#logo.spin img {
  animation: logoSpin 0.3s infinite;
}

@keyframes logoSpin {
  0% { transform: translateX(0); filter: brightness(1); }
  25% { transform: translateX(-2px); filter: brightness(1.3); }
  50% { transform: translateX(2px); filter: brightness(1.5); }
  75% { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}
/* 💥 WIN EFFECT */
#logo.win img {
  animation: logoWin 0.6s ease;
}

@keyframes logoWin {
  0%   { transform: scale(1); filter: brightness(1); }
  50%  { transform: scale(1.3); filter: brightness(2) drop-shadow(0 0 30px gold); }
  100% { transform: scale(1); }
}