body {
  margin:0;
  height:100vh;
  overflow:hidden;
  font-family:'Dancing Script', cursive;

  background: linear-gradient(135deg,#0f0c29,#302b63,#ff4fd8);
  background-size:400% 400%;
  animation:bgMove 12s ease infinite;

  display:flex;
  justify-content:center;
  align-items:center;
    touch-action: manipulation;

    
    
}

@keyframes bgMove {
  0%{background-position:0% 50%}
  50%{background-position:100% 50%}
  100%{background-position:0% 50%}
}

/* background image */
.bg-image{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;

  background-image:url("BG-BTS.jpg");
  background-size:cover;
  background-position:center;

  opacity:0.25;
  filter:blur(1px) brightness(0.9);
}

/* canvas */
canvas {
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:0;
    pointer-events: none;
}

/* card */
.card {

  height: 92dvh;
  max-height: 650px;
  position: relative;
  z-index: 2;

  width: min(92vw, 420px);
  height: min(92vh, 600px); /* ⬅ diperpanjang */

  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(15px);

  border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  overflow: hidden;

  display: flex;
  flex-direction: column;
  
}

/* slide */
.slide {
  position:absolute;
  inset:0;
  opacity:0;
  transform:scale(1.05);
  transition:all 0.6s ease;
  pointer-events:none;

  display:flex;
  flex-direction:column;
}

.slide.active {
  opacity:1;
  transform:scale(1);
  pointer-events:auto;
}

/* content */
.content {
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;

  padding:20px;
  color:white;
  overflow-y:auto;
}

h1 { color:#ffd1ff; font-size:35px; }
p { font-size:18px; color:#f5f5f5; }

img {
  max-width:80%;
  border-radius:18px;
  margin:10px 0;
  box-shadow:0 8px 25px rgba(255,79,216,0.4);
  border:2px solid rgba(255,255,255,0.2);
}

/* PIN */
.pin-box input {
  width:50px;
  height:60px;
  text-align:center;
  font-size:26px;
  border-radius:10px;
  border:2px solid #9dc183;
  background:rgba(255,255,255,0.2);
  color:white;
}

/* keyboard */
.keyboard button {
  width:60px;
  height:60px;
  margin:5px;
  border:none;
  border-radius:12px;
  background:#9dc183;
  color:white;
  font-size:18px;
}

/* NAV FIX (biar lurus & simetris) */
.nav-btns {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;

  padding: 14px;

  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);

  box-sizing: border-box;
}

/* BUTTON FIX */
.btn {
flex: 1 1 120px;

  max-width: 160px;

  height: 44px;

  display: flex;
  justify-content: center;
  align-items: center;

  border: none;
  border-radius: 14px;

  font-size: 16px;
  font-weight: 600;

  color: white;
  background: linear-gradient(135deg,#ff4fd8,#7a5cff);

  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover { transform:scale(1.05); }
.btn:active { transform:scale(0.92); }

#musicToggle {
  position:fixed;
  top:18px;
  right:18px;
  z-index:20;

  width:58px;
  height:58px;

  border:none;
  border-radius:50%;

  display:flex;
  justify-content:center;
  align-items:center;

  background:rgba(0,0,0,0.25);
  backdrop-filter:blur(10px);

  cursor:pointer;

  transition:0.3s ease;

  box-shadow:
    0 0 10px rgba(255,79,216,0.3),
    0 0 25px rgba(122,92,255,0.2);

  animation:floatBtn 3s ease-in-out infinite;

  padding:0; /* penting */
  overflow:hidden; /* cegah distorsi visual */

  box-sizing:border-box;
  
}

/* FLOATING BUTTON */
@keyframes floatBtn {
  0%,100% { transform:translateY(0) scale(1); }
  50% { transform:translateY(-6px) scale(1); }
}

/* VINYL */
.vinyl {
  width:40px;
  height:40px;
  aspect-ratio:1/1;   /* penting biar selalu kotak */
  flex-shrink:0;      /* cegah mengecil aneh */
  border-radius:50%;

  background:
    radial-gradient(circle at center,
      #111 0 18%,
      #333 19% 24%,
      #111 25% 40%,
      #000 41% 100%);

  position:relative;
}

/* CENTER LABEL */
.vinyl::after {
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:10px;
  height:10px;
  transform:translate(-50%,-50%);
  background:#ff4fd8;
  border-radius:50%;
  box-shadow:0 0 12px #ff4fd8;
}

/* PLAYING ANIMATION */
.playing .vinyl {
  animation:spin 1.2s linear infinite;
  box-shadow:
    0 0 15px #ff4fd8,
    0 0 30px rgba(255,79,216,0.6);
}

/* SPIN */
@keyframes spin {
  from { transform:rotate(0deg); }
  to { transform:rotate(360deg); }
}

/* HOVER EFFECT */
#musicToggle:hover {
  transform:scale(1.1);
  box-shadow:
    0 0 20px rgba(255,79,216,0.6),
    0 0 40px rgba(122,92,255,0.4);
}



/* ===== RESPONSIVE FIX ===== */
@media (max-width: 480px) {

  .card {
    height: 90vh;
  }

  h1 {
  color: #ffd1ff;
  font-size: 28px;

  text-shadow:
    0 0 8px rgba(255,79,216,0.6),
    0 0 18px rgba(122,92,255,0.6),
    0 0 30px rgba(255,255,255,0.3);

  animation: glowText 2.5s ease-in-out infinite;
}

p {
  font-size: 18px;
  color: #f5f5f5;

  text-shadow:
    0 0 6px rgba(255,255,255,0.3),
    0 0 12px rgba(255,79,216,0.3);

  animation: fadeText 3s ease-in-out infinite;
}

  .pin-box input {
    width: 45px;
    height: 55px;
    font-size: 22px;
  }

  .keyboard button {
    width: 52px;
    height: 52px;
    font-size: 16px;
    margin: 3px;
  }

img {
  width: min(90%, 320px);
  height: auto;
}

  #musicToggle {
    width: 140px;
    height: 44px;
    font-size: 14px;
  }
}

/* Glow Text*/
@keyframes glowText {
  0%,100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.3);
  }
}

@keyframes fadeText {
  0%,100% {
    opacity: 0.9;
    transform: translateY(0px);
  }
  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.typewriter {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;

  border-right: 2px solid rgba(255,255,255,0.8);

  animation: typing 2.5s steps(30, end) forwards,
             blink 0.8s infinite;
}

@keyframes typing {
  from { max-width: 0 }
  to { max-width: 100% }
}

@keyframes blink {
  50% { border-color: transparent; }
}

#errorMsg{
  opacity:0;
  transition:0.3s;
  color:#ff9db5;
}

#errorMsg.show{
  opacity:1;
}

.back-home{
  position:fixed;
  top:20px;
  left:20px;
  z-index:200;

  padding:10px 16px;
  border-radius:12px;

  text-decoration:none;
  color:white;
  font-size:14px;
  font-weight:bold;

  background:rgba(255,255,255,0.12);
  backdrop-filter:blur(10px);

  border:1px solid rgba(255,255,255,0.2);

  box-shadow:
    0 0 15px rgba(255,79,216,0.3),
    0 0 25px rgba(122,92,255,0.2);

  transition:0.3s;
}

.back-home:hover{
  transform:scale(1.08);

  background:linear-gradient(
    135deg,
    #ff4fd8,
    #7a5cff
  );

  box-shadow:
    0 0 20px rgba(255,79,216,0.5),
    0 0 40px rgba(122,92,255,0.4);
}

/* HIDE DEFAULT CURSOR */
body{
  cursor:none;
}

/* CUSTOM CURSOR */
.custom-cursor{
  position:fixed;
  top:0;
  left:0;

  width:32px;
  height:32px;

  border-radius:50%;

  pointer-events:none;
  z-index:99999;

  display:flex;
  justify-content:center;
  align-items:center;

  transform:translate(-50%,-50%);

  transition:
    transform 0.08s linear,
    opacity 0.3s;

  mix-blend-mode:screen;
}

.custom-cursor::before{
  content:"💜";
  font-size:26px;

  filter:
    drop-shadow(0 0 6px #ff4fd8)
    drop-shadow(0 0 12px #ff9cf5);

  animation:cursorPulse 1.2s infinite ease-in-out;
}

/* TRAIL */
.cursor-trail{
  position:fixed;
  top:0;
  left:0;

  width:12px;
  height:12px;

  border-radius:50%;

  background:rgba(255,79,216,0.45);

  pointer-events:none;
  z-index:99998;

  transform:translate(-50%,-50%);

  filter:blur(3px);

  transition:
    transform 0.18s ease-out,
    opacity 0.4s;
}

/* HOVER EFFECT */
a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor{
  transform:translate(-50%,-50%) scale(1.5);
}

/* ANIMATION */
@keyframes cursorPulse{
  0%,100%{
    transform:scale(1);
  }

  50%{
    transform:scale(1.25);
  }
}

/* HIDE ALL DEFAULT CURSORS */
*{
  cursor:none !important;
}

/* MOBILE DISABLE */
@media(max-width:768px){

  body{
    cursor:auto;
  }

  .custom-cursor,
  .cursor-trail{
    display:none;
  }
}

@media(max-width:768px){

  *{
    cursor:auto !important;
  }

  .custom-cursor,
  .cursor-trail{
    display:none;
  }
}


