:root {
  --color-tetsu-guro-black: #281414;
  --color-bittersweet-chocolate: #502814;
  --color-amberglow: #dc783c;
  --color-peach-nirvana: #f0b48c;
  --color-grass-daisy: #c8b428;
}

body {
  background-color: var(--color-grass-daisy);
  font-family: Arial Black;
  background: url("2.avif") no-repeat center center;
  background-size: cover;
}

#quiz {
  text-align: center;
  color: white;
}

.container {
  background-color: rgb(231, 127, 231);
  width: 65vw;       
  height: 70vh;   
  border-radius: 27px; 
  box-shadow: 25px 25px 20px rgb(152, 67, 158);
  text-align: center;
  padding: 10px 20px;
  margin: 0 auto;
  position: relative;
}

#timer {
  background-color: rgb(239, 197, 248);
  height: 30px;
  width: 150px;
  border-radius: 27px;
  text-align: center;
  box-shadow: 15px 15px 15px var(--color-tetsu-guro-black);
  position: absolute;
  top: 20px;         
  right: 20px;
}

#question {
  font-size: larger;
  padding-top: 6%;
  padding-left: 9%;
  width: 70%;
  height: 20%;
  color: #281414;
}

.pop {
  animation: pop 0.3s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#ans-btns {
  display: flex;
  justify-content: space-between;
  gap: 50px;
  padding-left: 10%;
  padding-right: 10%;
}

#mark-sms {
  animation: popIn 0.6s ease-out forwards;
  opacity: 0;
}

#remarks {
  animation: popIn 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

#marks {
  animation: popIn 0.6s ease-out 0.6s forwards;
  opacity: 0;
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.button {
  font-family: Arial Black;
  font-size: smaller;
  text-align: center;
  width: 110px;
  height: 80px;
  border-radius: 20px;
  background-color: rgb(239, 197, 248);
  color: #281414;
  box-shadow: 15px 15px 15px var(--color-tetsu-guro-black);
  overflow-wrap: break-word;
}

.button:hover {
  background-color: #c8b428;
  transform: translate(10px,5px) scale(1.15);
}

.button:active {
  background-color: #502814;
}

.next {
  position: absolute;
  right: 20px;
  bottom: 20px;
}

.back {
  position: absolute;
  left: 20px;
  bottom: 20px;
}

.st {
  padding-bottom: 2%;
  text-align: center;
  font-size: larger;
}

#table {
  width: 100%;
  border-collapse: collapse; 
  margin: auto;
  font-size: 16px;
  box-shadow: 0 5px 15px var(--color-tetsu-guro-black); 
  border-radius: 8px;
  overflow: hidden; 
  background-color: rgb(177, 101, 177);
}

#table th {
  text-align: left;
  padding: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom: 4px solid var(--color-grass-daisy);
  background-color: rgb(178, 56, 202);
}

#table td {
  padding: 12px 14px;
  border-bottom: 2px solid var(--color-grass-daisy);
}

/* 📱 Mobile Responsive Fixes */
@media (max-width: 768px) {
  .container {
    width: 90vw;
    height: auto;
    padding: 15px;
    padding-bottom: 120px; /* space for nav buttons */
  }

  #timer {
    top: 5px;       
    right: 10px;    
    width: 90px;   
    height: 22px;   
    font-size: 12px;
  }

  #question {
    font-size: medium;
    width: 100%;
    padding: 55px 10px 10px; /* push down below timer */
    height: auto;
  }

  #ans-btns {
    flex-direction: column;
    align-items: center;   /* ✅ center align */
    gap: 12px;
    padding: 0;
  }

  .button {
    width: auto;
    min-width: 120px;
    max-width: 200px;
    height: auto;
    font-size: small;
    padding: 10px 12px;
    background-color: rgb(239, 197, 248); /* keep background */
    text-align: center;
    white-space: normal;
  }

  .next, .back {
    width: 50px;
    height: 32px;
    font-size: 11px;
    bottom: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    width: 95vw;
    padding-bottom: 130px;
  }

  #question {
    font-size: small;
    padding-top: 65px;
  }

  .button {
    font-size: small;
    padding: 8px 10px;
    min-width: 100px;
    max-width: 160px;
    background-color: rgb(239, 197, 248);
  }

  .next, .back {
    width: 40px;
    height: 28px;
    font-size: 9px;
    bottom: 10px;
  }

  #timer {
    width: 80px;
    height: 20px;
    font-size: 10px;
    top: 5px;
    right: 5px;
  }
}
