:root {
  --bg: #0a1020;
  --card: #121b2e;
  --card-2: #0d1526;
  --text: #f8fafc;
  --muted: #98a6bd;
  --border: #2b3952;
  --primary: #2864e8;
  --primary-hover: #1e54cb;
  --success: #22c77a;
  --success-bg: rgba(34,199,122,.10);
  --error: #ff5d6c;
  --error-bg: rgba(255,93,108,.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(circle at 10% 0%, rgba(40,100,232,.18), transparent 32%),
    radial-gradient(circle at 100% 100%, rgba(34,199,122,.10), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.container { width: 100%; max-width: 650px; }

.card {
  padding: clamp(22px, 5vw, 36px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(18,27,46,.94);
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}

.header { margin-bottom: 28px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #bcd1ff;
  background: rgba(40,100,232,.12);
  border: 1px solid rgba(40,100,232,.25);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-bottom: 14px;
}

h1 { margin: 0 0 8px; font-size: clamp(27px, 7vw, 36px); line-height: 1.1; }
.description { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

form { display: flex; flex-direction: column; gap: 10px; }

label { font-size: 13px; font-weight: 800; color: #dce4f2; }

input {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: var(--card-2);
  font: inherit;
  font-size: 16px;
  transition: .2s;
}

input:focus {
  border-color: #4e7ff0;
  box-shadow: 0 0 0 4px rgba(40,100,232,.13);
}

button {
  min-height: 54px;
  margin-top: 8px;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  transition: .2s;
}

button:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
button:disabled { opacity: .65; cursor: wait; }

.status {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 650;
}
.status.success { color: #76e6ae; background: var(--success-bg); border: 1px solid rgba(34,199,122,.2); }
.status.error { color: #ff9da6; background: var(--error-bg); border: 1px solid rgba(255,93,108,.2); }
.hidden { display: none !important; }

.section-title {
  display: block;
  margin-top: 24px;
  margin-bottom: 9px;
}

.result {
  min-height: 92px;
  padding: 17px;
  border-radius: 15px;
  background: var(--card-2);
  border: 1px solid var(--border);
}

.result.response-success { border-color: rgba(34,199,122,.35); background: var(--success-bg); }
.result.response-error { border-color: rgba(255,93,108,.35); background: var(--error-bg); }

.response-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .4px;
}

.result-icon {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
}
.success-icon { color: #071b12; background: var(--success); }
.error-icon { color: #2a080d; background: var(--error); }

.response-message {
  margin-top: 9px;
  color: #c8d2e3;
  line-height: 1.55;
  word-break: break-word;
}

.token-box {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(13,21,38,.72);
}

.token-label {
  display: block;
  margin-bottom: 9px;
  color: #dce4f2;
  font-size: 13px;
  font-weight: 800;
}

.token-value {
  padding: 14px;
  border-radius: 12px;
  background: #080e1c;
  color: #a8edff;
  border: 1px solid #1d2b44;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.copy-btn { margin-top: 11px; width: auto; padding: 11px 18px; min-height: 45px; font-size: 14px; }

.footer {
  margin-top: 22px;
  text-align: center;
  color: #66748c;
  font-size: 12px;
}

@media (max-width: 480px) {
  body { padding: 12px; align-items: flex-start; }
  .card { margin-top: 8px; border-radius: 20px; }
  .copy-btn { width: 100%; }
}

.options {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}
.switch-row {
  position: relative;
  min-height: 62px;
  padding: 12px 58px 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(13,21,38,.55);
  cursor: pointer;
  display: block;
}
.switch-row strong {
  display: block;
  color: #e6edf8;
  font-size: 13px;
  line-height: 1.4;
}
.switch-row small {
  display: block;
  margin-top: 3px;
  color: #75839a;
  font-size: 11px;
  line-height: 1.4;
}
.switch-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 40px;
  height: 23px;
  transform: translateY(-50%);
  border-radius: 99px;
  background: #2a354b;
  transition: .2s;
}
.switch:after {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #9ba7ba;
  transition: .2s;
}
.switch-row input:checked + .switch {
  background: var(--primary);
}
.switch-row input:checked + .switch:after {
  transform: translateX(17px);
  background: #fff;
}
.raw-box {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #0a0f1c;
}
.raw-title {
  margin-bottom: 10px;
  color: #dce4f2;
  font-size: 13px;
  font-weight: 800;
}
.raw-box pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #b8c4d7;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.creator {
  margin-top: 24px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(13,21,38,.55);
}
.creator-title {
  color: #dce4f2;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}
.creator-name {
  color: #9eabc0;
  font-size: 13px;
  margin-bottom: 13px;
}
.creator-name strong {
  color: #f2f6fc;
}
.creator-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.creator-btn {
  min-height: 45px;
  padding: 10px 13px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid var(--border);
  background: #10192b;
  transition: .2s;
}
.creator-btn:hover {
  transform: translateY(-1px);
  border-color: #4a5a78;
  background: #172238;
}
.arrow {
  font-size: 17px;
  opacity: .8;
}
@media (max-width: 420px) {
  .creator-actions {
    grid-template-columns: 1fr;
  }
}

.usage-box {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(40,100,232,.08);
  border: 1px solid rgba(40,100,232,.18);
  color: #91b2ff;
  font-size: 12px;
  font-weight: 750;
}
