*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:20px;
  font-family:Arial, sans-serif;
  background:#111827;
  transition:0.3s;
}

/* CONTAINER */

.container{
  width:100%;
  max-width:500px;
  background:#1f2937;
  padding:30px 20px;
  border-radius:20px;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,0.4);
}

/* TITLE */

h1{
  color:white;
  margin-bottom:25px;
  font-size:2rem;
}

/* THEME BUTTONS */

.theme-switcher{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-bottom:30px;
}

.theme-switcher button{
  border:none;
  padding:10px 18px;
  border-radius:10px;
  color:white;
  cursor:pointer;
  font-weight:bold;
  transition:0.3s;
}

.theme-switcher button:hover{
  transform:scale(1.05);
}

button[data-theme="gold"]{
  background:#f59e0b;
}

button[data-theme="blue"]{
  background:#2563eb;
}

button[data-theme="purple"]{
  background:#9333ea;
}

button[data-theme="green"]{
  background:#16a34a;
}

/* COIN */

.coin-container{
  perspective:1000px;
  display:flex;
  justify-content:center;
  margin-bottom:25px;
}

.coin{
  width:180px;
  height:180px;
  position:relative;
  transform-style:preserve-3d;
}

.side{
  position:absolute;
  width:100%;
  height:100%;
  border-radius:50%;
  display:flex;
  justify-content:center;
  align-items:center;
  font-size:2rem;
  font-weight:bold;
  color:white;
  backface-visibility:hidden;
  border:8px solid rgba(255,255,255,0.2);
}

.front{
  background:linear-gradient(135deg,#ffd700,#f59e0b);
}

.back{
  background:linear-gradient(135deg,#c0c0c0,#6b7280);
  transform:rotateY(180deg);
}

/* RESULT */

#result{
  color:white;
  margin-bottom:20px;
  font-size:1.5rem;
}

/* BUTTON */

.flip-btn{
  border:none;
  background:#ffffff;
  color:#111827;
  padding:14px 28px;
  border-radius:12px;
  cursor:pointer;
  font-size:1rem;
  font-weight:bold;
  transition:0.3s;
}

.flip-btn:hover{
  transform:translateY(-2px);
}

/* RESPONSIVE */

@media(max-width:600px){

  .coin{
    width:140px;
    height:140px;
  }

  .side{
    font-size:1.5rem;
  }

  h1{
    font-size:1.6rem;
  }

  #result{
    font-size:1.2rem;
  }

}


/* BURST PARTICLES */

.burst-container{
  position:fixed;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}

/* PARTICLE */

.particle{
  position:absolute;

  width:12px;
  height:12px;

  border-radius:50%;

  animation:burst 1s ease-out forwards;
}

/* ANIMATION */

@keyframes burst{

  0%{
    transform:translate(0,0) scale(1);
    opacity:1;
  }

  100%{
    transform:
      translate(var(--x),var(--y))
      scale(0);

    opacity:0;
  }

}

/* RESULT EFFECT */

#result{
  color:white;
  margin-bottom:20px;
  font-size:1.8rem;
  font-weight:bold;

  transition:0.3s;

  text-shadow:
    0 0 10px rgba(255,255,255,0.3);
}