* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 15px;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f6f8;
}

/* ===== Layout ===== */
.layout {
  display: grid;
  grid-template-columns: 1fr 420px 1fr;
  gap: 20px;
}

.center {
  text-align: center;
}

/* ===== Wheel Wrapper ===== */
.wheel-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
  margin: auto;
}

/* Arrow */
.pointer {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid #e5533d;
  z-index: 10;
}

#wheel {
  border-radius: 50%;
  background: #111;
}

/* ===== Spin Button ===== */
#spinBtn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: none;
  background: #1f6feb;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 5;
}

#spinBtn:disabled {
  background: #9aa4b2;
  cursor: not-allowed;
}

/* ===== Panels ===== */
#contributors, #winners {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

ul {
  list-style: none;
  padding: 0;
}

li {
  padding: 8px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: #eef2f7;
}

/* ===== Buttons ===== */
/*.bottom-buttons {*/
/*  position: fixed;*/
/*  bottom: 20px;*/
/*  right: 20px;*/
/*  margin: 50px auto;*/
/*  display: flex;*/
/*  gap: 16px; */
/*}*/

/* ===== Buttons ===== */
.bottom-buttons {
  display: flex;           /* Enables flexbox layout */
  justify-content: center;  /* Centers the buttons horizontally */
  align-items: center;      /* Centers the buttons vertically (if height exists) */
  gap: 16px;               /* Space between the two buttons */
  margin: 30px 0;          /* 50px spacing top/bottom, 0 for sides */
  width: 100%;             /* Ensures the container stretches across the screen */
}

#demoBtn {
  background: #f59e0b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}

#refreshBtn {
  background: #10b981;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
}


/* ===== Popup ===== */
#popup {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#popup .box {
  background: #fff;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  animation: pop .5s ease-out;
}

@keyframes pop {
  0% { transform: scale(.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .wheel-wrapper {
    width: 300px;
    height: 300px;
  }

  #wheel {
    width: 300px;
    height: 300px;
  }

  #spinBtn {
    width: 70px;
    height: 70px;
  }
}
