* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 20% 20%, #111927, #0b1220 40%, #04070f 80%);
  color: #e7ecf3;
  overflow: hidden;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  pointer-events: none;
  z-index: 2;
}

.panel {
  max-width: 420px;
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 16px 12px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 0.3px;
}

.subtitle {
  margin: 0 0 12px;
  color: #a6b6d6;
  font-size: 13px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

label {
  font-size: 12px;
  color: #9eb3d5;
}

select,
textarea,
button {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e7ecf3;
  padding: 10px 12px;
  font-size: 14px;
}

textarea:focus,
select:focus,
button:focus {
  outline: 2px solid #6cf0c2;
  outline-offset: 1px;
}

button {
  cursor: pointer;
  margin-top: 4px;
  background: linear-gradient(120deg, #26d1f3, #6cf0c2);
  color: #04122b;
  font-weight: 600;
  border: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(38, 209, 243, 0.25);
}

.status {
  margin: 10px 0 6px;
  font-size: 12px;
  color: #9eb3d5;
}

.agent-reply {
  min-height: 72px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  line-height: 1.4;
  color: #d4e4ff;
  white-space: pre-wrap;
}

.sim-block {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.sim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #c8d6f2;
  margin-bottom: 8px;
}

.sim-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.sim-controls button {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #e7ecf3;
}

.sim-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.sim-choice {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  color: #e7ecf3;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.1s ease;
}

.sim-choice:hover {
  background: rgba(108, 240, 194, 0.08);
  border-color: rgba(108, 240, 194, 0.6);
  transform: translateY(-1px);
}

#strategy-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 4;
}

#strategy-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 16px;
  z-index: 5;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.hidden {
  display: none;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.modal-sub {
  font-size: 12px;
  color: #9eb3d5;
}

#strategy-timer {
  font-size: 18px;
  font-weight: 700;
  color: #ffc94d;
}

#strategy-text {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #e7ecf3;
  padding: 12px;
  resize: vertical;
  min-height: 130px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.modal-actions button {
  flex: 1;
  background: linear-gradient(120deg, #26d1f3, #6cf0c2);
  border: none;
  color: #04122b;
  font-weight: 700;
}

#strategy-cancel {
  background: rgba(255, 255, 255, 0.08);
  color: #e7ecf3;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.modal-status {
  margin-top: 8px;
  font-size: 12px;
  color: #c8d6f2;
}

@media (max-width: 600px) {
  .panel {
    max-width: 100%;
    margin-right: 8px;
  }
}

.challenge-box {
  margin: 12px 0;
  padding: 12px;
  background: rgba(255, 201, 77, 0.1); 
  border-left: 3px solid #ffc94d;
  color: #e7ecf3;
  font-size: 13px;
  line-height: 1.4;
  border-radius: 4px;
}
