:root {
  --bg-1: #6e2b8f;
  --bg-2: #df5f77;
  --panel: #171c2b;
  --panel-2: #0f1220;
  --text: #f5f7ff;
  --muted: #a6acc2;
  --accent: #ff3d94;
  --line: #2a3148;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, #ba5d73 0, transparent 45%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  display: flex;
  justify-content: center;
  padding: 18px 10px;
}

.app {
  width: 100%;
  max-width: 430px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-bottom: 10px;
  backdrop-filter: blur(8px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.tab-btn {
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
  opacity: 0.85;
}

.tab-btn.active {
  opacity: 1;
  outline: 2px solid #ff5ea8;
}

.tab-img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

.list-view {
  margin-top: 10px;
  display: block;
}

.masonry {
  column-count: 2;
  column-gap: 10px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.masonry.switching {
  opacity: 0.2;
  transform: translateX(10px);
}

.card {
  break-inside: avoid;
  margin-bottom: 10px;
  background: var(--panel);
  border: 1px solid #3d4563;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.card:active {
  transform: scale(0.98);
}

.thumb {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #31374d;
}

.meta {
  padding: 10px;
}

.name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.row {
  display: flex;
  justify-content: space-between;
  color: #d8dcf2;
  font-size: 12px;
  margin-bottom: 10px;
}

.view-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #2ec4ff, #d45fff);
}

.detail-view {
  display: none;
  margin-top: 6px;
  background: var(--panel-2);
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: #232a3d;
}

.detail-body {
  padding: 14px 12px 14px;
}

.detail-title {
  font-size: 20px;
  margin-bottom: 8px;
}

.detail-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 12px 8px;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.btn-back {
  background: #2b324a;
}
