body {
  background: #111;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 40px 0;
}

.container {
  width: 70%;
  margin: auto;
    padding: 50px;
}

.title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.subtitle {
  color: #ccc;
  margin-bottom: 30px;
}

.code-box {
  background: #1a1a1a;
  border-radius: 6px;
  padding: 25px;
  display: flex;
  align-items: center;
  font-size: 22px;
  gap: 10px;
  margin-bottom: 15px;
}

.keyword {
  color: #4db8ff;
}

.varname {
  color: #fff;
}

input {
  background: #222;
  border: 1px solid #444;
  padding: 8px 12px;
  font-size: 18px;
  border-radius: 4px;
  color: white;
  width: 150px;
}

input::placeholder {
  color: #666;
}

.error-msg {
  color: #ff4747;
  margin-top: -5px;
  height: 22px;
}

.buttons {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

button {
  cursor: pointer;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 16px;
}

.check {
  background: #ff7a00;
  color: white;
}

.solution {
  background: #444;
  color: white;
}

.solution-text {
  margin-top: 20px;
  font-size: 20px;
  color: gold;
  display: none;
}



/* Base responsive layout */
.container {
  max-width: 600px;
  width: 90%;
  margin: 80px auto;
  padding: 20px;
  text-align: center;
}

/* Title */
.title {
  font-size: 1.8rem;
  line-height: 1.3;
}

.title span {
  color: #ffb400;
}

/* Subtitle */
.subtitle {
  font-size: 1rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

/* Code box */
.code-box {
  font-size: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #1e1e1e;
  color: white;
}

/* Input field responsive */
#answerInput {
  width: 120px;
  max-width: 50%;
  padding: 10px;
  font-size: 1.1rem;
  border-radius: 6px;
  border: 1px solid #aaa;
  text-align: center;
}

/* Buttons */
.buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

button {
  padding: 12px 18px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Error + solution text */
.error-msg,
.solution-text {
  margin-top: 15px;
  font-size: 1.1rem;
}

/* ---------------------- */
/* MOBILE RESPONSIVE FIXES */
/* ---------------------- */

@media (max-width: 480px) {

  .title {
    font-size: 1.4rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .code-box {
    font-size: 1.1rem;
    padding: 12px;
  }

  #answerInput {
    width: 90%;
    max-width: 90%;
    font-size: 1rem;
  }

  .buttons {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}