:root {
  --color1: #ff00cc;
  --color2: #333399;
  --color3: #000000;
  --color4: #00ffee;
}

body {
  height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Press Start 2P', cursive;
  overflow: hidden;
  background: linear-gradient(-45deg, var(--color1), var(--color2), var(--color3), var(--color4));
  background-size: 600% 600%;
  animation: gradientBG 15s ease infinite;
  flex-direction: column;
  text-align: center;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

h1 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 20px;
}

/* Modal styling */
#settingsModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.modal-content {
  background: #222;
  color: #fff;
  padding: 40px;
  border-radius: 10px;
  width: 90%; 
  max-width: 600px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
  position: relative;
  height: auto; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.modal-content label {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 10px;
}

.modal-content input {
  padding: 10px;
  font-size: 1rem;
  width: 100%; 
  border: 2px solid #444;
  border-radius: 5px;
  background-color: #333;
  color: white;
  margin-top: 10px;
  transition: border-color 0.3s;
  margin-bottom: 20px;
}

.modal-content input:focus {
  border-color: #6b6b6b;
  outline: none;
}

.color-preview {
  width: 50px;
  height: 20px;
  margin-left: 10px;
  display: inline-block;
  border-radius: 5px;
}

.modal-content button {
  background-color: #444;
  color: #fff;
  padding: 10px 20px;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.3s;
  align-self: flex-end;
  margin-top: 20px;
}

.modal-content button:hover {
  background-color: #555;
}

.close-btn {
  color: white;
  font-size: 2rem;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .modal-content {
    width: 90%; 
    padding: 15px;
    font-size: 14px; 
    max-width: none;
  }

  .modal-content input {
    width: 100%;
    font-size: 14px; 
    padding: 12px;
  }

  .modal-content button {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
  }

  h1 {
    font-size: 1.5rem; 
  }
}
