body {
  font-family: "Poppins", sans-serif;
  background: #101820;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90vh;
  text-align: center;
}

h1 {
  margin-bottom: 40px;
  color: #00e676;
  font-size: 2rem;
}

.towers {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 60px;
  height: 250px;
  flex-wrap: nowrap;
}

.tower {
  width: 100px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #555;
  border-radius: 10px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  position: relative;
  z-index: 1;
}

.rod {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 180px;
  background: #aaa;
  border-radius: 3px;
  z-index: 0;
}

.disk {
  height: 20px;
  border-radius: 5px;
  margin-top: 0.1px;
  color: #000;
  padding: 5px 0 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 2;
  cursor: default;
  user-select: none;
}

.disk1 {
  width: 40px;
  background: #ff1744;
}
.disk2 {
  width: 55px;
  background: #ff9100;
}
.disk3 {
  width: 65px;
  background: #ffee58;
}
.disk4 {
  width: 80px;
  background: #69f0ae;
}
.disk5 {
  width: 100px;
  background: #7069f0;
}

.tower_card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.tower_card p {
  border-radius: 50%;
  background-color: #00e676;
  padding: 16px 20px;
  transition: all 0.5s;
  cursor: default;
  user-select: none;
}

.tower_card p:hover {
  background-color: #ffffff;
  color: #00e676;
}

.controls {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  padding: 10px 20px;
  margin: 5px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  background: #00e676;
  color: #000;
  transition: 0.3s;
}

button:hover {
  background: #1de9b6;
}

button:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
}

#diskCountDisplay {
  font-weight: bolder;
  padding-top: 4px;
}

#increaseDisk,
#decreaseDisk {
  display: flex;
  justify-content: center;
  align-items: center;
}

.disk-control {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  gap: 10px;
}

.disk-control button {
  background: #00e676;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.disk-control button:hover {
  background: #1de9b6;
}

#diskCountDisplay {
  color: #ffea00;
  font-size: 18px;
  min-width: 80px;
  text-align: center;
}

.message {
  margin-top: 20px;
  font-size: 18px;
  color: #ffea00;
  min-height: 24px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  overflow: hidden;
}

.modal-content {
  background-color: #1b1f24;
  color: #00e676;
  border-radius: 12px;
  width: 85%;
  height: 90vh;
  margin: 5vh auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 20px #00e676;
  overflow: hidden;
  position: relative;
}

.modal-content h2 {
  text-align: center;
  margin: 10px 0;
  margin-top: 50px;
  color: #00e676;
}

.close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: 0.3s;
}

.close:hover {
  color: #ff1744;
}

.code-section {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  margin-top: 10px;
}

.code-section h3 {
  color: #1de9b6;
  text-align: left;
}

pre {
  background: #282c34;
  color: #00e676;
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  text-align: left;
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.3);
}

.code-section {
  flex: 1;
  overflow-y: scroll;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.code-section::-webkit-scrollbar {
  display: none;
}

.code-section pre::-webkit-scrollbar {
  height: 8px;
  background-color: #101820;
  border-radius: 4px;
}

.code-section pre::-webkit-scrollbar-thumb {
  background-color: #00e676;
  border-radius: 4px;
  border: 2px solid #101820;
}

.code-section pre::-webkit-scrollbar-thumb:hover {
  background-color: #1de9b6;
}
.code-section pre {
  scrollbar-width: thin;
  scrollbar-color: #00e676 #101820;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }

  .towers {
    gap: 25px;
    height: 200px;
  }

  .tower {
    width: 70px;
    height: 160px;
  }

  .rod {
    height: 140px;
  }

  .disk {
    font-size: 10px;
    height: 16px;
  }

  .disk1 {
    width: 30px;
  }
  .disk2 {
    width: 40px;
  }
  .disk3 {
    width: 50px;
  }
  .disk4 {
    width: 60px;
  }
  .disk5 {
    width: 70px;
  }

  .tower_card p {
    padding: 12px 16px;
    font-size: 14px;
  }

  .controls {
    margin-top: 20px;
    justify-content: center;
  }

  button {
    font-size: 14px;
    padding: 8px 14px;
  }

  .message {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.1rem;
  }

  .towers {
    gap: 18px;
    height: 160px;
  }

  .tower {
    width: 60px;
    height: 130px;
  }

  .rod {
    height: 110px;
  }

  .disk {
    font-size: 9px;
    height: 14px;
    padding: 5px 0 0 0;
  }
  .disk1 {
    width: 30px;
  }
  .disk2 {
    width: 40px;
  }
  .disk3 {
    width: 45px;
  }
  .disk4 {
    width: 55px;
  }
  .disk5 {
    width: 62px;
  }
  .controls {
    margin-top: 18px;
  }

  button {
    font-size: 13px;
    padding: 7px 12px;
    margin: 3px;
  }

  .tower_card p {
    padding: 10px 14px;
    font-size: 13px;
  }
  .modal-content h2 {
    margin-bottom: 0;
    font-size: 1.1rem;
  }
  .code-section {
    margin-top: 0;
  }
}
