* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: min(100%, 560px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
  padding: 34px;
  backdrop-filter: blur(16px);
}

.admin-card {
  width: min(100%, 760px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.subtitle {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.admin-entry,
.text-button {
  border: 0;
  color: #6366f1;
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 12px;
}

.links {
  display: grid;
  gap: 12px;
}

.link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 18px;
  color: #111827;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.link:hover {
  transform: translateY(-2px);
  border-color: #6366f1;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.16);
}

.link span:first-child {
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrow {
  color: #6366f1;
  font-size: 20px;
  line-height: 1;
}

.note {
  margin: 24px 0 0;
  color: #94a3b8;
  font-size: 13px;
  text-align: center;
}

.form {
  display: grid;
  gap: 14px;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  font: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input {
  height: 48px;
  padding: 0 16px;
}

.textarea {
  resize: vertical;
  min-height: 180px;
  padding: 16px;
  line-height: 1.7;
}

.input:focus,
.textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.button {
  height: 48px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: #6366f1;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.24);
}

.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.success {
  color: #166534;
  background: #dcfce7;
}

.error {
  color: #991b1b;
  background: #fee2e2;
}

.empty {
  padding: 20px;
  color: #94a3b8;
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
}

.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 12px;
}

.admin-link-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.danger {
  color: #ef4444;
}

@media (max-width: 640px) {
  body {
    align-items: flex-start;
    padding: 16px;
  }

  .card {
    padding: 24px;
  }

  .topbar,
  .admin-link-item,
  .admin-list-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    justify-content: flex-start;
  }
}
