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

body {
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #0f0f0f;
  color: #fff;
}

/* 左侧导航栏 */
.sidebar {
  width: 240px;
  height: 100vh;
  background: #141414;
  padding: 25px 20px;
  box-shadow: inset -1px 0 0 #1e1e1e;
}

.sidebar h2 {
  font-size: 20px;
  margin-bottom: 25px;
  color: #ff77b2;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin-bottom: 15px;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 15px;
  color: #eee;
  background: #1e1e1e;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar ul li a:hover {
  background: #333;
}

/* 主体区域 */
.main {
  flex: 1;
  padding: 30px 40px;
}

/* 顶部搜索栏 */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  padding: 15px 30px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.search-input {
  width: 350px;
  padding: 10px 16px 10px 40px;
  border-radius: 12px;
  background: #1e1e1e url("https://cdn-icons-png.flaticon.com/512/622/622669.png") no-repeat 12px center;
  background-size: 16px;
  color: #fff;
  border: 1px solid #333;
  font-size: 14px;
}

.search-input::placeholder {
  color: #888;
}

.auth-buttons a {
  color: #66b0ff;
  margin-left: 15px;
  font-size: 14px;
  text-decoration: none;
}

.auth-buttons a:hover {
  text-decoration: underline;
}

/* 标签区域 */
.tags {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(255, 255, 255, 0.04);
}

.tags button {
  background: #2a2a2a;
  color: #ccc;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tags button:hover {
  background: #444;
  color: #fff;
}

/* 卡片区域 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 每行两张卡片 */
  gap: 20px;
  padding: 0 16px 100px 16px; /* 两侧留边，底部预留空间 */
}

.card {
  background: #1e1e1e;
  color: white;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  padding: 14px;
  width: 100%;
  text-align: center;
  transition: transform 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card:hover {
  transform: scale(1.03);
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.card h4 {
  font-size: 15px;
  color: #eee;
  margin: 0;
}

/* 删除按钮 */
.card .delete-btn {
  position: absolute;
  right: 10px;
  top: 10px;
  background: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: red;
  cursor: pointer;
}
