* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #333;
  line-height: 1.6;
}

.navbar {
  background: #1e1e2e;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.navbar h1 { font-size: 20px; }
.navbar a {
  color: #fff;
  text-decoration: none;
  margin-left: 16px;
  opacity: .85;
  transition: opacity .2s;
}
.navbar a:hover { opacity: 1; }

.container { max-width: 1200px; margin: 0 auto; padding: 24px; }

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.toolbar input, .toolbar select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.toolbar input { flex: 1; min-width: 200px; }
.toolbar input:focus, .toolbar select:focus { border-color: #6c5ce7; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.card-cover {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #eee;
  display: block;
}
.card-cover.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 14px;
}
.card-body { padding: 12px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-cat {
  display: inline-block;
  font-size: 12px;
  background: #6c5ce7;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}

.detail {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.detail-cover {
  width: 300px;
  max-width: 100%;
  border-radius: 8px;
  flex-shrink: 0;
}
.detail-info { flex: 1; min-width: 260px; }
.detail-info h2 { margin-bottom: 12px; }
.detail-info .cat {
  display: inline-block;
  background: #6c5ce7;
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}
.detail-desc {
  margin: 16px 0;
  white-space: pre-wrap;
  color: #555;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #6c5ce7;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: #5b4cdb; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.login-box h2 { margin-bottom: 20px; text-align: center; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: #6c5ce7; }
.btn-block { width: 100%; }

.admin-list { margin-top: 24px; }
.admin-item {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.admin-item img {
  width: 60px; height: 80px; object-fit: cover;
  border-radius: 6px; background: #eee;
}
.admin-item .info { flex: 1; }
.admin-item .info h4 { margin-bottom: 4px; }
.admin-item .actions { display: flex; gap: 8px; }

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.hidden { display: none !important; }