/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Inter", sans-serif;
}

body {
  background: #0d0d0d;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 10%;
}

/* Card */
.card {
  width: 100%;
  max-width: 500px;
  padding: 5%;
  background: #0d0d0d;
  border-radius: 18px;
  box-shadow: 0 0 25px rgba(255, 0, 80, 0.25);
  border: 1px solid #222;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

/* Heading */
.card h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  margin-bottom: 5%;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Buttons */
button {
  width: 100%;
  border-radius: 10px;
  border: none;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  background: #ffc800;
  color: black;
}

button:hover {
  transform: translateY(-2px);
  background: #ffe91f;
}

.button-sub {
  width: 50%;
  background: #ff0044;
  padding: 3% 0;
}

.button-sub:hover {
  transform: translateY(-2px);
  background: #ff1f5c;
}

/* Input */
input {
  width: 70%;
  padding: clamp(10px, 2.8vw, 14px);
  border-radius: 10px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  outline: none;
  transition: 0.2s ease;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  margin-bottom: 5%;
}

input:focus {
  border-color: #ff0044;
  box-shadow: 0 0 8px rgba(255, 0, 80, 0.4);
}

/* Output box */
#output {
  padding: 5%;
  border-radius: 12px;
  text-align: left;
  background: #1a1a1a;
  border: 1px solid #222;
  overflow-y: scroll;
  min-height: 100px;
  max-height: 100px;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.view-all,
.view-random,
.view-submit {
  margin-bottom: 6%;
}

.view-random button {
  padding: 5% 5%;
}

.view-submit {
  box-shadow: 0 0 25px rgba(255, 0, 80, 0.25);
  padding: 5% 3%;
  border-radius: 18px;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tablets (below 768px) */
@media (max-width: 768px) {
  body {
    padding: 5%;
  }

  .card {
    padding: 6%;
  }

  .button-sub {
    width: 60%;
  }

  input {
    width: 85%;
  }
}

/* Small Phones (below 430px) */
@media (max-width: 430px) {
  body {
    padding: 4%;
  }

  .card {
    padding: 6%;
    border-radius: 14px;
  }

  .button-sub {
    width: 70%;
  }

  #output {
    max-height: 130px;
  }
}
