* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px;
}

.panel {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.intro {
  color: #475569;
}

.form {
  display: grid;
  gap: 12px;
}

.auth-form {
  max-width: 420px;
}

label {
  font-weight: 600;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 220px;
}

button {
  width: fit-content;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.message {
  min-height: 24px;
  margin-bottom: 0;
  color: #0f766e;
  word-break: break-all;
}

.message.error {
  color: #b91c1c;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.list {
  display: grid;
  gap: 12px;
}

.list.empty {
  color: #64748b;
}

.item {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  overflow: hidden;
}

.item h3 {
  margin-bottom: 0;
  line-height: 1.4;
  word-break: break-word;
}

.preview {
  color: #334155;
  margin-bottom: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta {
  margin-bottom: 0;
  color: #64748b;
  font-size: 14px;
}

.item a {
  display: block;
  color: #2563eb;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.copy-button {
  padding: 8px 14px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .panel {
    padding: 18px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .item-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .item a,
  .preview {
    white-space: normal;
    word-break: break-all;
  }
}
