@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700&family=Work+Sans:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #1a1625;
  color: #f0ecf9;
  font-family: 'Work Sans', sans-serif;
}

.paw { fill: currentColor; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.header { margin-bottom: 28px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #5eead4;
  margin-bottom: 12px;
}

h1 {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 10px;
}

.subhead {
  font-size: 15px;
  color: #b8aed1;
  margin: 0;
  line-height: 1.5;
}

.form-card {
  background: #241f36;
  border: 1px solid #362f4d;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 8px;
}

.form-row {
  display: flex;
  gap: 10px;
}

@media (max-width: 560px) {
  .form-row { flex-direction: column; }
}

#url-input, #alias-input {
  min-width: 0;
  background: #1a1625;
  border: 1.5px solid #362f4d;
  border-radius: 10px;
  color: #f0ecf9;
  font-size: 14px;
  padding: 11px 14px;
  font-family: 'Work Sans', sans-serif;
}

#url-input { flex: 3; }
#alias-input { flex: 2; font-family: 'JetBrains Mono', monospace; }

#url-input:focus, #alias-input:focus {
  outline: none;
  border-color: #ff6fae;
  box-shadow: 0 0 0 3px rgba(255, 111, 174, 0.18);
}

#submit-btn {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #ff6fae, #ff8fc0);
  color: #3a0f26;
  font-weight: 600;
  font-family: 'Baloo 2', sans-serif;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

#submit-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
#submit-btn:active { transform: translateY(0) scale(0.98); }
#submit-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.error-text { color: #ff9d9d; font-size: 13px; margin-top: 10px; }

.badge-wrap {
  display: flex;
  justify-content: center;
  margin: 24px 0 0;
}

.badge {
  position: relative;
  width: 320px;
  background: #2d2640;
  border: 1px solid #443a63;
  border-radius: 18px;
  padding: 26px 22px 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
  overflow: hidden;
  animation: pop 0.5s cubic-bezier(.2, .8, .3, 1.2);
}

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.96) rotate(-2deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(-2deg); }
}

.badge-punch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 8px;
  border-radius: 6px;
  background: #1a1625;
  border: 1px solid #443a63;
}

.badge-holo-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, #ff6fae, #ffd166, #5eead4, #ff6fae);
}

.badge-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
}

.badge-eyebrow { font-size: 11px; color: #b8aed1; letter-spacing: 0.08em; }
.badge-number { font-size: 13px; color: #ffd166; font-weight: 600; }

.badge-short-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  margin-top: 10px;
  word-break: break-all;
}

.badge-dest {
  font-size: 13px;
  color: #5eead4;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-watermark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  fill: rgba(240, 236, 249, 0.06);
}

.badge-actions { display: flex; gap: 8px; margin-top: 18px; }

.badge-btn-primary, .badge-btn-ghost {
  flex: 1;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  transition: transform 0.15s, filter 0.15s, background 0.15s;
}

.badge-btn-primary { background: #5eead4; color: #0b3830; border: none; }
.badge-btn-primary:hover { filter: brightness(1.08); }

.badge-btn-ghost { background: transparent; color: #f0ecf9; border: 1.5px solid #443a63; }
.badge-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.badge-btn-danger { color: #ff9d9d; border-color: #5a3a3a; flex: 0 0 auto; padding: 9px 14px; }
.badge-btn-danger:hover { background: rgba(255, 157, 157, 0.1); }

.stats-row {
  text-align: center;
  font-size: 12px;
  color: #7a7196;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 20px;
}

.recent-section { margin-top: 34px; }

.recent-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #b8aed1;
  margin-bottom: 12px;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 600;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.tag {
  position: relative;
  display: flex;
  align-items: flex-start;
  background: #241f36;
  border: 1px solid #362f4d;
  border-radius: 10px;
  padding: 10px 12px;
  transition: transform 0.15s, border-color 0.15s;
  width: 100%;
}

.tag:hover { border-color: #5eead4; transform: translateY(-2px); }

.tag-visit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
  padding-right: 22px;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
  color: #f0ecf9;
  flex: 1;
  min-width: 0;
}

.tag-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: #6d6489;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.tag-delete:hover { color: #ff9d9d; background: rgba(255, 157, 157, 0.1); }

.tag-code { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #ff6fae; font-weight: 600; }
.tag-dest { font-size: 12px; color: #b8aed1; margin-top: 3px; }
.tag-meta { font-size: 11px; color: #6d6489; margin-top: 6px; }

.empty-state {
  margin-top: 34px;
  text-align: center;
  color: #6d6489;
  font-size: 13px;
}

.empty-state svg { fill: #4a4360; margin-bottom: 8px; }
