/* style.css – Technical Minimalism */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #00ff88;
  --border: #222;
  --border-hover: #00ff88;
  --method-get: #58a6ff;
  --method-post: #00ff88;
  --method-put: #ffa657;
  --method-delete: #f85149;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
  padding: 1.5rem;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Header */
.header {
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.prompt {
  color: var(--accent);
  margin-right: 0.5rem;
}

.tagline {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* URL Bar */
.url-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.url {
  flex: 1;
  color: var(--accent);
  word-break: break-all;
}

.copy-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 3px;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Requests */
.request {
  background: var(--surface);
  border-left: 4px solid transparent;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
  overflow: hidden;
}

.request[data-method="GET"] {
  border-left-color: var(--method-get);
}

.request[data-method="POST"] {
  border-left-color: var(--method-post);
}

.request[data-method="PUT"] {
  border-left-color: var(--method-put);
}

.request[data-method="DELETE"] {
  border-left-color: var(--method-delete);
}

.req-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.9rem;
}

.method {
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

.method.GET {
  background: var(--method-get);
  color: #000;
}

.method.POST {
  background: var(--method-post);
  color: #000;
}

.method.PUT {
  background: var(--method-put);
  color: #000;
}

.method.DELETE {
  background: var(--method-delete);
  color: #fff;
}

.path {
  flex: 1;
  color: var(--text);
}

.time {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Payload */
.payload details {
  margin: 0.5rem 1rem 1rem;
}

.payload summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  user-select: none;
}

.payload summary::after {
  content: " ▼";
  font-size: 0.7rem;
  float: right;
}

.payload details[open] summary::after {
  content: " ▲";
}

.mono {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.mono td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

.mono td:first-child {
  color: var(--text-dim);
}

.json {
  background: #000;
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  white-space: pre;
}

/* Empty State */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
}

.empty code {
  display: block;
  margin-top: 1rem;
  color: var(--accent);
  font-size: 1rem;
}

/* Create Section */
.create {
  margin: 2rem 0;
}

.cta {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  text-transform: uppercase;
}

.cta:hover {
  background: #00cc66;
}

/* Result */
.result {
  background: var(--surface);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 1.5rem;
}

.hidden {
  display: none;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.url-group {
  margin-bottom: 1rem;
}

.url-group label {
  display: block;
  color: var(--text-dim);
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.url-group code {
  display: block;
  background: #000;
  padding: 0.75rem;
  border-radius: 4px;
  color: var(--accent);
  word-break: break-all;
  font-size: 0.9rem;
}

.url-group a {
  color: var(--accent);
  text-decoration: underline;
}

.hint {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .req-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .path {
    flex: none;
  }
}

/* Footer */
.footer {
  margin-top: 4rem;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

.footer .heart {
  color: var(--accent);
  animation: beat 1.5s infinite;
}

@keyframes beat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }
}