/* Base Styles (Desktop-first as you have) */

/* General UI */
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

#app {
  width: 90%;
  max-width: 800px;
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid #22c55e55;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.4);
}

header {
  text-align: center;
  margin-bottom: 20px;
}

#status {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  font-size: 0.9rem;
}

#timerBar {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 8px;
  overflow: hidden;
}

#timerFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, #22c55e, #16a34a);
  transition: width 1s linear;
}

/* Scenario Box */
#scenarioBox {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  margin-bottom: 20px;
}

#scenarioTitle {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #22c55e;
}

#scenarioText {
  font-size: 0.95rem;
  color: #cbd5e1;
}

/* Options */
.optionBtn {
  display: block;
  width: 100%;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #22c55e55;
  border-radius: 10px;
  background: #0f172a;
  color: #f1f5f9;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

.optionBtn:hover {
  background: #14532d;
  transform: scale(1.02);
}

/* Feedback popup */
#feedback {
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  background: #1e293b;
  margin-top: 10px;
  font-size: 0.9rem;
}

.success { color: #22c55e; }
.failure { color: #ef4444; }
.partial { color: #facc15; }

/* Summary */
#summary {
  text-align: center;
}

#summary h2 {
  color: #22c55e;
}

#summary ul {
  list-style: none;
  padding: 0;
}

#summary li {
  margin: 6px 0;
  font-size: 0.9rem;
}

/* ========================= */
/* 📱 Mobile Responsiveness */
/* ========================= */
@media (max-width: 600px) {
  #app {
    padding: 12px;
    border-radius: 12px;
  }

  #status {
    flex-direction: column;
    align-items: flex-start;
    font-size: 0.8rem;
    gap: 4px;
  }

  #scenarioBox {
    padding: 12px;
  }

  #scenarioTitle {
    font-size: 1rem;
  }

  #scenarioText {
    font-size: 0.85rem;
  }

  .optionBtn {
    padding: 12px;
    font-size: 0.9rem;
  }

  #feedback {
    font-size: 0.85rem;
    padding: 12px;
  }

  #summary li {
    font-size: 0.85rem;
  }
}

/* Even smaller devices */
@media (max-width: 350px) {
  body {
    align-items: flex-start; /* avoid squished layout */
    padding-top: 10px;
  }

  #app {
    width: 100%;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .optionBtn {
    font-size: 0.85rem;
    padding: 10px;
  }

  #scenarioTitle {
    font-size: 0.95rem;
  }
}
