:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1d2129;
  --text-2: #4e5969;
  --text-3: #86909c;
  --line: #e5e6eb;
  --primary: #fe2c55;
  --primary-dark: #e81f4c;
  --cyan: #25f4ee;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(17, 24, 39, 0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* 顶部 */
.header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-text h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-text p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-2);
}

/* 卡片 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.hidden {
  display: none !important;
}

/* 输入区 */
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
  min-height: 84px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.12);
}

.input-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: flex-end;
}

.hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 12px;
}

/* 按钮 */
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
  font-family: inherit;
  font-weight: 500;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--line);
}

.btn.ghost:hover {
  background: #f2f3f5;
}

.btn.big {
  padding: 13px 30px;
  font-size: 16px;
}

/* 加载 */
.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  color: var(--text-2);
  font-size: 14px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(254, 44, 85, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 错误 */
.error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #c0392b;
  background: #fff5f5;
  border-color: #f3c1c1;
  font-size: 14px;
}

.error svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* 媒体预览 */
.media-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  margin-bottom: 16px;
}

video {
  width: 100%;
  max-height: 420px;
  display: block;
  background: #000;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #eef0f3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item .dl {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.gallery-item .dl:hover {
  background: var(--primary);
}

/* 元信息 */
.meta {
  margin-bottom: 18px;
}

.author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eef0f3;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.author-name {
  font-size: 15px;
  font-weight: 600;
}

.music {
  font-size: 12px;
  color: var(--text-3);
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  word-break: break-word;
}

/* 操作区 */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-actions {
  margin-top: 12px;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
  padding: 8px 24px;
}

/* 响应式 */
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .header-text h1 {
    font-size: 18px;
  }
}
