/* ╔══════════════════════════════════════╗
   ║                                      ║
   ║          𝓜𝓪𝓱𝓾𝓪                  ║
   ║                                      ║
   ╚══════════════════════════════════════╝
   𝓜𝓪𝓱𝓾𝓪 𝕸𝖆𝖍𝖚𝖆 ℳ𝒶𝒽𝓊𝒶 ⓜⓐⓗⓤⓐ */

:root {
  --bg: #1a1a2e;
  --bg-2: #16213e;
  --bg-3: #0f3460;
  --fg: #e0e0e0;
  --fg-dim: #a0a0b0;
  --accent: #e94560;
  --accent-2: #0f3460;
  --success: #4ecca3;
  --warn: #f0a500;
  --danger: #e94560;
  --border: #2a2a4a;
  --input-bg: #1f1f38;
  --code-bg: #15152a;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}
/* ₥₳ⱧɄ₳ */
body.day {
  --bg: #f7f7f0;
  --bg-2: #ffffff;
  --bg-3: #e8eef5;
  --fg: #333333;
  --fg-dim: #666666;
  --accent: #0066cc;
  --accent-2: #0066cc;
  --success: #2e8b57;
  --warn: #cc8800;
  --danger: #cc3333;
  --border: #cccccc;
  --input-bg: #ffffff;
  --code-bg: #f0f0f0;
  --shadow: 0 2px 10px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}
/* ʍąհմą */

header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
header h1 {
  font-size: 18px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--accent), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.token-area {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 300px;
}
.token-area input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
}
.token-area input:focus { outline: none; border-color: var(--accent); }
.token-saved {
  font-size: 12px;
  color: var(--success);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.token-saved.show { opacity: 1; }
/* 𝔪𝔞𝔥𝔲𝔞 */

button {
  background: var(--bg-3);
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
button:hover { background: var(--accent-2); border-color: var(--accent); }
button:active { transform: scale(0.96); }
button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: bold;
}
button.primary:hover { opacity: 0.9; }
button.primary:disabled {
  background: var(--border);
  color: var(--fg-dim);
  cursor: not-allowed;
  border-color: var(--border);
}
button.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
button.small { padding: 3px 8px; font-size: 12px; }
button.icon-btn { padding: 4px 8px; font-size: 16px; }
/* ͓̽M͓͓̽̽a͓͓̽̽h͓͓̽̽u͓͓̽̽a͓̽ */

.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}
/* ̑̈M̑̈̑̈ȃ̈̑̈h̑̈̑̈ȗ̈̑̈ȃ̈ */

nav.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 8px 0;
}
nav .tag-group { margin-bottom: 4px; }
nav .tag-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-dim);
  font-weight: bold;
}
nav .nav-item {
  display: flex;
  align-items: center;
  padding: 7px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.1s;
  gap: 8px;
}
nav .nav-item:hover { background: var(--bg-3); }
nav .nav-item.active {
  background: var(--bg-3);
  border-left-color: var(--accent);
}
nav .method-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 3px;
  min-width: 36px;
  text-align: center;
  flex-shrink: 0;
}
nav .method-badge.GET { background: #2d6a4f; color: #d8f3dc; }
nav .method-badge.POST { background: #b5651d; color: #fff; }
nav .nav-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
nav .nav-summary {
  font-size: 13px;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
nav .nav-path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
  color: var(--fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 🅼🅰🅷🆄🅰 */

main.workspace {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
/* 𝓶𝓪𝓱𝓾𝓪 */

.ep-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ep-header .method-badge { font-size: 13px; padding: 4px 10px; min-width: 50px; }
.ep-header .ep-path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  font-weight: bold;
}
.ep-header .ep-summary { color: var(--fg-dim); font-size: 14px; }
.cost-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 12px;
}
.cost-0 { background: var(--border); color: var(--fg-dim); }
.cost-low { background: #2d6a4f; color: #d8f3dc; }
.cost-mid { background: #b5651d; color: #fff; }
.cost-high { background: var(--danger); color: #fff; }
/* ⓜⓐⓗⓤⓐ */

.ep-desc {
  background: var(--bg-2);
  border-left: 3px solid var(--accent-2);
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: var(--fg-dim);
  white-space: pre-line;
}
/* ɱαԋυα */

.risk-warning {
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid var(--danger);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.risk-warning .risk-icon {
  font-size: 24px;
  color: var(--danger);
  line-height: 1;
}
.risk-warning .risk-body { flex: 1; }
.risk-warning .risk-title {
  color: var(--danger);
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 4px;
}
.risk-warning .risk-text {
  font-size: 13px;
  color: var(--fg);
}
.risk-confirm {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
}
.risk-confirm input { width: 16px; height: 16px; cursor: pointer; }
/* ṁäḧüä */

.form-section { display: flex; flex-direction: column; gap: 14px; }
.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-field label {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-field .required-mark { color: var(--danger); }
.form-field .field-desc {
  font-size: 11px;
  color: var(--fg-dim);
}
.form-field input[type="text"],
.form-field input[type="number"],
.form-field textarea,
.form-field select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea {
  min-height: 60px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
}
.form-field input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.form-field .checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
/* ͎M͎͎a͎͎h͎͎u͎͎a͎ */

.array-field {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: var(--bg-2);
}
.array-field .array-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.array-field .array-title { font-weight: 600; font-size: 13px; }
.array-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
  position: relative;
}
.array-item .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--fg-dim);
}
.array-item .item-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
}
.array-item .item-fields .form-field { gap: 2px; }
.array-item .item-fields .form-field label { font-size: 11px; }
.array-item .item-fields .form-field input,
.array-item .item-fields .form-field select {
  padding: 5px 8px;
  font-size: 12px;
}
/* 𝒎𝒂𝒉𝒖𝒶 */

.send-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.send-area .loading {
  display: none;
  font-size: 13px;
  color: var(--fg-dim);
}
.send-area .loading.active { display: inline; }
.send-area .loading .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* 𝐌𝐚𝐡𝐮𝐚 */

.response-area {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  flex-shrink: 0;
}
.response-header .status-pill {
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 12px;
}
.status-ok { background: #2d6a4f; color: #d8f3dc; }
.status-err { background: var(--danger); color: #fff; }
.status-warn { background: var(--warn); color: #000; }
.response-header .elapsed { color: var(--fg-dim); }
.response-header .return-code { font-family: Consolas, monospace; }
.response-body {
  padding: 14px;
  overflow: auto;
  max-height: 60vh;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}
.json-key { color: #6cb6ff; }
.json-string { color: #4ecca3; }
.json-number { color: #f0a500; }
.json-bool { color: #e94560; }
.json-null { color: var(--fg-dim); }
/* 🄼🄰🄷🅄🄰 */

.history-panel {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  max-height: 200px;
  overflow-y: auto;
}
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  position: sticky;
  top: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.history-header .title { font-weight: bold; font-size: 13px; }
.history-list { padding: 4px 0; }
.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.history-item:hover { background: var(--bg-3); }
.history-item .h-method { font-weight: bold; min-width: 44px; }
.history-item .h-path { font-family: Consolas, monospace; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item .h-status { font-weight: bold; min-width: 40px; text-align: right; }
.history-item .h-time { color: var(--fg-dim); font-size: 11px; }
.history-empty { padding: 20px; text-align: center; color: var(--fg-dim); font-size: 13px; }
/* Ⓜⓐⓗⓤⓐ */

footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 12px;
  flex-wrap: wrap;
}
footer .setting { display: flex; align-items: center; gap: 6px; }
footer input[type="number"] {
  width: 60px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 3px 6px;
  border-radius: 3px;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
/* 𝐦𝐚𝐡𝐮𝐚 */

.toast {
  position: fixed;
  top: 70px;
  right: 20px;
  background: var(--bg-3);
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 10px 16px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  z-index: 1000;
  font-size: 13px;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
/* 𝓂𝒶𝒽𝓊𝒶 */

.menu-btn,
.token-icon-btn,
.token-dropdown,
.drawer-overlay,
.history-fab,
.history-modal,
.mobile-settings { display: none; }
/* 𝖒𝖆𝖍𝖚𝖆 */

@media (max-width: 768px) {
  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--fg);
    font-size: 22px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
  }
  .menu-btn:active { background: var(--bg-3); }
  .token-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--fg);
    font-size: 18px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
  }
  /* 🅜🅐🅗🅤🅐 */
  header {
    padding: 8px 10px;
    gap: 8px;
  }
  header h1 {
    font-size: 16px;
    flex: 1;
    margin: 0;
  }
  .token-area { display: none; }
  .token-dropdown {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    z-index: 500;
    display: none;
    box-shadow: var(--shadow);
  }
  .token-dropdown.show { display: flex; gap: 8px; align-items: center; }
  .token-dropdown input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 16px;
    min-height: 44px;
  }
  .token-dropdown input:focus { outline: none; border-color: var(--accent); }
  .token-dropdown .token-saved {
    font-size: 12px;
    color: var(--success);
    white-space: nowrap;
    opacity: 0;
  }
  .token-dropdown .token-saved.show { opacity: 1; }
  /* 𝔐𝔞𝔥𝔲𝔞 */
  .drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
  }
  .drawer-overlay.show { display: block; }

  .layout { flex-direction: column; }
  nav.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 85%;
    max-width: 320px;
    min-width: 0;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 8px 0 140px;
  }
  nav.sidebar.open {
    transform: translateX(0);
  }
  nav .nav-item {
    padding: 12px 16px;
    min-height: 44px;
  }
  nav .nav-summary { font-size: 15px; }
  nav .nav-path { font-size: 11px; }
  nav .tag-label {
    padding: 12px 16px 6px;
    font-size: 12px;
  }
  /* ҅M҅҅a҅҅h҅҅u҅҅a҅ */
  .mobile-settings {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 85%;
    max-width: 320px;
    background: var(--bg-3);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .mobile-settings.open { transform: translateX(0); }
  .mobile-settings .setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-settings .setting:last-child { border-bottom: none; }
  .mobile-settings input[type="number"] {
    width: 70px;
    min-height: 36px;
    font-size: 14px;
  }
  .mobile-settings input[type="checkbox"] { width: 20px; height: 20px; }
  /* 𝓜𝓪𝓱𝓾𝓪 */
  main.workspace {
    flex: 1;
    padding: 12px;
    padding-bottom: 70px;
  }
  .ep-header {
    gap: 8px;
  }
  .ep-header .ep-path {
    font-size: 14px;
    word-break: break-all;
  }
  .ep-header .ep-summary {
    font-size: 13px;
    width: 100%;
  }
  .ep-desc {
    font-size: 13px;
    padding: 10px;
  }
  /* 𝑴𝒂𝒉𝒖𝒂 */
  .form-field input[type="text"],
  .form-field input[type="number"],
  .form-field textarea,
  .form-field select {
    min-height: 44px;
    font-size: 16px;
    padding: 10px 12px;
  }
  .form-field label { font-size: 14px; }
  .form-field .field-desc { font-size: 12px; }

  .array-item {
    padding: 10px;
  }
  .array-item .item-fields {
    grid-template-columns: 1fr;
  }
  .array-item .item-fields .form-field input,
  .array-item .item-fields .form-field select {
    min-height: 40px;
    font-size: 16px;
  }
  .array-field .add-row {
    min-height: 40px;
    width: 100%;
    margin-top: 4px;
  }
  /* ℳ𝒶𝒽𝓊𝒶 */
  .risk-warning {
    padding: 12px;
  }
  .risk-warning .risk-title { font-size: 14px; }
  .risk-warning .risk-text { font-size: 13px; }
  .risk-confirm {
    min-height: 44px;
    font-size: 14px;
  }

  .send-area {
    flex-direction: column;
    gap: 8px;
  }
  .send-area .primary {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }
  /* 𝕸𝖆𝖍𝖚𝖆 */
  .response-body {
    max-height: none;
    overflow: visible;
    font-size: 12px;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-all;
  }
  .response-header {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }

  html, body { height: auto; min-height: 100%; }
  body { display: block; }
  .layout {
    flex: none;
    overflow: visible;
    display: block;
  }
  main.workspace {
    overflow: visible;
    padding-bottom: 80px;
  }
  /* ⓜⓐⓗⓤⓐ */
  .history-panel { display: none; }
  .footer-desktop { display: none; }

  .history-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 800;
    cursor: pointer;
  }
  .history-fab:active { transform: scale(0.92); }
  /* ʍąհմą */
  .history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 1100;
    flex-direction: column;
  }
  .history-modal.show {
    display: flex;
  }
  .history-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    min-height: 52px;
  }
  .history-modal-header .title { font-size: 16px; font-weight: bold; }
  .history-modal-header .icon-btn {
    min-width: 40px;
    min-height: 40px;
    font-size: 18px;
  }
  .history-modal .history-list {
    flex: 1;
    overflow-y: auto;
  }
  .history-modal .history-item {
    min-height: 48px;
    padding: 12px 16px;
  }
}

@media (max-width: 380px) {
  header h1 { font-size: 14px; }
  .ep-header .ep-path { font-size: 12px; }
  main.workspace { padding: 10px; }
}
/* ₥₳ⱧɄ₳ */
