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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.navbar {
  background: #1a1a2e;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: #e94560;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links .btn-sm {
  background: #e94560;
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
}

.container {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Auth forms */
.auth-card {
  max-width: 400px;
  margin: 4rem auto;
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #e94560;
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
}

.btn {
  display: inline-block;
  background: #e94560;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #c73650;
}

.btn-full {
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 1px solid #e94560;
  color: #e94560;
}

.btn-outline:hover {
  background: #e94560;
  color: #fff;
}

.btn-danger {
  background: #888;
}

.btn-danger:hover {
  background: #c0392b;
}

.auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.auth-footer a {
  color: #e94560;
  text-decoration: none;
}

.error-msg {
  background: #ffe0e0;
  color: #c0392b;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  display: none;
}

/* Prompt list */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

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

.prompt-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s;
}

.prompt-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.card-body {
  cursor: pointer;
}

.prompt-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.prompt-card .meta {
  font-size: 0.8rem;
  color: #888;
}

.prompt-card .preview {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #555;
  cursor: pointer;
  transition: all 0.15s;
}

.icon-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.icon-btn-danger:hover {
  background: #ffe0e0;
  color: #c0392b;
  border-color: #e0a0a0;
}

.icon-btn-ok {
  background: #d4edda;
  border-color: #a3d9b1;
  color: #28a745;
}

/* Detail page */
.detail-card {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.detail-card .meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
}

.detail-card .content {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 0.95rem;
}

.detail-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.empty-state {
  text-align: center;
  color: #999;
  padding: 4rem 0;
  font-size: 1rem;
}
