:root {
  --bg: #0e1116;
  --panel: #161b22;
  --panel-2: #1f262f;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #4f8cff;
  --accent-strong: #3a6df0;
  --border: #2a323d;
  --error: #ff6b6b;
  --success: #3ddc84;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(1200px 600px at 20% -10%, #1c2740 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
  letter-spacing: -0.5px;
}

.subtitle {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

code {
  background: #232b36;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 13px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

textarea:focus {
  border-color: var(--accent);
}

button {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--accent-strong);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 12px;
  transition: background 0.15s, transform 0.05s;
}

button:hover {
  background: var(--accent);
}

button:active {
  transform: translateY(1px);
}

button.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}

button.secondary:hover {
  background: #29313c;
}

button.small {
  padding: 6px 12px;
  font-size: 12px;
  margin-top: 0;
}

.result {
  margin-top: 18px;
  padding: 16px;
  background: var(--panel-2);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.result-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result .label {
  font-size: 12px;
  color: var(--muted);
}

.short-url {
  font-size: 18px;
  color: var(--accent);
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.result-actions button {
  margin-top: 0;
}

.copy-status {
  font-size: 13px;
  color: var(--success);
  opacity: 0;
  transition: opacity 0.2s;
}

.copy-status.show {
  opacity: 1;
}

.result-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.error {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: var(--error);
  border-radius: 10px;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

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

.list-header h2 {
  margin: 0;
  font-size: 16px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list li:last-child {
  border-bottom: 0;
}

.list .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.list .short {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}

.list .original {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  word-break: break-all;
}

.list .meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.footer {
  text-align: center;
  margin-top: 40px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 540px) {
  .wrap {
    padding: 30px 14px 60px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .list .row {
    flex-direction: column;
    align-items: flex-start;
  }
}
