/* base.css —— reset + 布局 + 通用组件 */

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

html, body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body { padding-bottom: 24px; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

@media (max-width: 768px) {
  .main { padding: 16px; }
}

/* Header（Figma：60px 白条，Logo 居左，导航居中，头像居右） */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0 25px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  height: 28px;
  flex-shrink: 0;
  text-decoration: none;
}

.header-logo-svg {
  height: 24px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.header-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 63px;
}

.header-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: opacity var(--transition);
}

.header-nav a:hover { opacity: 0.6; }
.header-nav a.active { font-weight: 700; }

@media (max-width: 900px) {
  .header-nav { position: static; transform: none; gap: 20px; }
  .header-nav a { font-size: 14px; }
}

/* 移动端汉堡菜单（反馈#10，A 类纯界面）：三个横杠，点击展开/收起导航 */
.header-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.header-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.header-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header-menu-btn.open span:nth-child(2) { opacity: 0; }
.header-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .header-menu-btn { display: flex; order: -1; }
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    z-index: 99;
  }
  .header-nav.open { display: flex; }
  .header-nav a {
    font-size: 15px;
    padding: 12px 25px;
  }
  .header-nav a:hover { opacity: 1; background: var(--hover-gray); }
  .header-nav a.active { font-weight: 700; background: var(--hover-gray); }
}

@media (max-width: 640px) {
  .header-logo-text { display: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex-shrink: 0;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  cursor: pointer;
  padding: 6px 0;
}

.header-user.open .dropdown-menu { display: block; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 6px 0;
  z-index: 200;
}

.dropdown-menu a,
.dropdown-menu .logout-link {
  display: block;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--text);
  transition: background var(--transition);
  cursor: pointer;
}

.dropdown-menu a:hover { background: var(--hover-gray); }
.dropdown-menu .logout-link { color: var(--logout-red); }
.dropdown-menu .logout-link:hover { background: var(--hover-gray); }

.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-disabled);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  flex-shrink: 0;
}

.header-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 页脚（Figma：所有页底部） */
.site-footer {
  text-align: center;
  font-size: 14px;
  color: var(--footer-text);
  padding: 40px 0 24px;
}

/* Section */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title { font-size: 20px; font-weight: 700; }

.section-link {
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-link svg { width: 15px; height: 12px; }

/* 分类胶囊（Figma：高 40，16px，选中黑底白字） */
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 4px;
  margin-bottom: 20px;
}

.cat-tab {
  flex-shrink: 0;
  height: 40px;
  line-height: 40px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: var(--transition);
}

.cat-tab.active { background: var(--text); color: var(--bg-card); }
.cat-tab:hover:not(.active) { background: var(--border-light); }
.cat-tab.disabled, .cat-tab:disabled { opacity: 0.45; cursor: not-allowed; }
.cat-tab.disabled:hover, .cat-tab:disabled:hover { background: transparent; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card-grid.col4 { grid-template-columns: repeat(4, 1fr); }
.card-grid.col2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1100px) { .card-grid.col4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .card-grid.col4, .card-grid.col2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .card-grid, .card-grid.col4, .card-grid.col2 { grid-template-columns: 1fr; } }

/* Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
  overflow: hidden;
  background: var(--border-light);
}

.card-thumb img, .card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-thumb.figma::after {
  content: 'Figma';
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.65);
  color: var(--on-dark);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
}

.card-thumb-label {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 48px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--gold);
  color: var(--gold-text);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.card-body { padding: 14px; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.card-avatar img,
.detail-designer-avatar img,
.designer-profile-avatar img,
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.detail-designer-avatar,
.designer-profile-avatar,
.comment-avatar { overflow: hidden; }

.card-role {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
}

.card-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.card-title { font-size: 14px; font-weight: 600; line-height: 1.4; margin-bottom: 6px; }
.card-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-light);
}

.card-votes { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.card-score {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Buttons */
.btn {
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
}

.btn-primary { background: var(--text); color: var(--bg-card); }
.btn-primary:hover { background: var(--text); opacity: 0.85; }
.btn-secondary { background: var(--border-light); color: var(--text); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-danger:hover { background: var(--red-200); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Forms */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--bg-card);
  color: var(--text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px var(--green-100);
}

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

/* Detail page（Figma 作品展示帧） */
.detail-page { max-width: 1280px; margin: 0 auto; }
.designer-profile { max-width: 960px; margin: 0 auto; }
.detail-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; background: var(--border-light); }
.detail-hero-img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  font-size: 80px;
  cursor: zoom-in;
}

.detail-hero-img img,
.detail-hero-img video {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.detail-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.detail-title-lg { font-size: 26px; font-weight: 700; line-height: 1.3; }

.detail-goto-rating {
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.detail-designer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 20px;
}

.detail-designer-avatar {
  width: 69px;
  height: 69px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--green-700);
  flex-shrink: 0;
}

.detail-designer-name { font-size: 18px; font-weight: 700; }
.detail-designer-meta { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.detail-designer-link { margin-left: auto; }

.detail-desc-lg { font-size: 15px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; }

.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-tag {
  font-size: 14px;
  padding: 3px 14px;
  height: 26px;
  line-height: 20px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  color: var(--text-secondary);
}

.detail-tag-best { background: var(--gold-light); color: var(--gold-text); }
.detail-tag-figma { background: var(--figma-bg); color: var(--figma-text); }

.detail-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 600px) { .detail-stats-row { grid-template-columns: repeat(2, 1fr); } }

.detail-stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 16px;
  text-align: center;
}

.detail-stat-val { font-size: 28px; font-weight: 700; }
.detail-stat-lbl { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

/* Detail media gallery */
.detail-media-section { margin-bottom: 32px; }
.detail-media-frame {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border-light);
  margin-bottom: 16px;
}
.detail-media-frame:last-child { margin-bottom: 0; }
.detail-media-frame.empty {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-media-img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}
.detail-media-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  background: var(--video-bg);
}
.detail-media-frame.figma {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
}
.detail-media-frame.figma iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
}

/* 新品详情长图（反馈#49/#51）：渐变窗口 + 393×852 手机视口滚动浏览（设计稿 node 1180-1223：外框 1278×956，视口居中上下各约 52px） */
.longimg-window {
  position: relative;
  height: 956px;
  background: linear-gradient(135deg, var(--longimg-grad-start) 0%, var(--longimg-grad-end) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: var(--shadow);
}

.longimg-window:last-child { margin-bottom: 0; }

.longimg-viewport {
  width: 393px;
  max-width: 92%;
  height: 852px;
  max-height: calc(100% - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.45) rgba(255, 255, 255, 0.08);
}

.longimg-viewport::-webkit-scrollbar { width: 6px; }
.longimg-viewport::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.08); }
.longimg-viewport::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.45); border-radius: 3px; }

.longimg-img {
  width: 393px;
  max-width: 100%;
  display: block;
}

.longimg-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

@media (max-width: 560px) {
  .longimg-window { height: 720px; }
  .longimg-viewport { width: 92%; height: calc(100% - 100px); }
}

.detail-tag-longimg {
  background: linear-gradient(135deg, var(--longimg-grad-start), var(--longimg-grad-end));
  color: var(--on-dark);
}

/* Designer profile */
.designer-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.designer-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--green-700);
  flex-shrink: 0;
}

.designer-profile-meta { flex: 1; }
.designer-profile-name { font-size: 24px; font-weight: 700; }
.designer-profile-bio { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

.designer-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .designer-profile-stats { grid-template-columns: repeat(2, 1fr); }
  .designer-profile-header { flex-direction: column; text-align: center; }
}

.designer-mosaic {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  aspect-ratio: 16 / 10;
}

.designer-mosaic-main { grid-row: 1 / 3; overflow: hidden; }
.designer-mosaic-sub { overflow: hidden; }

.designer-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.designer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.designer-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  gap: 8px;
}

.designer-info-name { font-size: 15px; font-weight: 700; }

/* 头像在姓名前（反馈#59）：卡片马赛克区全部留给作品预览 */
.designer-info-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.designer-info-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.designer-info-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }
.designer-info-stat { display: flex; align-items: center; gap: 3px; }

/* Vote panel */
.vote-panel {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.vote-panel-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  width: 90vw;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-card);
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--border-light);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: var(--border); }

.modal-body { padding: 24px; }

.modal-title { font-size: 16px; font-weight: 700; }

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

.form-field { margin-bottom: 14px; }

.form-field .form-label { display: block; margin-bottom: 6px; }

.form-field select.form-input { width: 100%; }

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green-500);
}

/* Rating（Figma：10 星，39px，填充 #FFC700，未填充灰） */
.rating-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 28px;
}

.rating-stars {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rating-star {
  width: 39px;
  height: 39px;
  border: none;
  background: transparent;
  color: var(--gray-disabled);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
  padding: 0;
}

.rating-star:hover { transform: scale(1.12); }
.rating-star.active { color: var(--star); }
.rating-star.readonly { cursor: default; }
.rating-star.readonly:hover { transform: none; }

.rating-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* 赞 / 踩（Figma：39×39 双按钮组；赞已投=绿，票用完=灰 #D4D4D4；踩不限次数） */
.vote-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vote-act-btn {
  width: 39px;
  height: 39px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  padding: 0;
}

.vote-act-btn svg { width: 18px; height: 18px; }

.vote-act-btn.up:hover:not(:disabled) { border-color: var(--green-400); background: var(--green-50); }
.vote-act-btn.up.on {
  background: var(--green-400);
  border-color: var(--green-400);
  color: var(--on-dark);
}
.vote-act-btn.up:disabled {
  background: var(--gray-disabled);
  border-color: var(--gray-disabled);
  cursor: not-allowed;
  opacity: 0.7;
}

.vote-act-btn.down:hover { border-color: var(--red); background: var(--red-light); }
.vote-act-btn.down.on {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-dark);
}

/* Results table */
.results-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.results-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--border-light);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
}
.results-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); }
.results-table tr:hover td { background: var(--green-50); }

.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  background: var(--border-light);
  color: var(--text-secondary);
}

.rank-1 { background: var(--gold-light); color: var(--gold-text); }
.rank-2 { background: var(--rank-2-bg); color: var(--rank-2-text); }
.rank-3 { background: var(--rank-3-bg); color: var(--rank-3-text); }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  color: var(--text-secondary);
}

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.6; }

.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-500); }
.breadcrumb-sep { margin: 0 6px; }

.cond-user-list {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 4px 12px;
}

.status-active { background: var(--green-100); color: var(--badge-green); }
.status-ended { background: var(--border-light); color: var(--text-muted); }
.status-pending { background: var(--gold-light); color: var(--gold-text); }

/* Vote row */
.vote-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.vote-row-thumb {
  width: 60px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border-light);
}

.vote-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vote-row-info { flex: 1; min-width: 0; }
.vote-row-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-row-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.vote-row-votes { font-weight: 600; flex-shrink: 0; }

/* Vote option */
.vote-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.vote-option:hover { border-color: var(--green-400); background: var(--green-50); }
.vote-option.selected { border-color: var(--neon); background: var(--green-50); }

.vote-option-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.vote-option.selected .vote-option-check { border-color: var(--neon); background: var(--neon); }

/* Admin */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; }
.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.admin-card-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

/* Admin Dashboard 左右布局（反馈#23） */
.dash {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.dash-main { min-width: 0; }

.dash-side {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  position: sticky;
  top: 80px;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 10px;
}

.dash-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--green-500);
  color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex: none;
}

.dash-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-user-name { font-size: 15px; font-weight: 700; }

.dash-user-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-menu { display: flex; flex-direction: column; }

.dash-menu-item {
  display: block;
  padding: 13px 12px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.dash-menu-item:hover { background: var(--border-light); }

.dash-menu-item.active {
  color: var(--green-500);
  font-weight: 700;
  background: var(--green-50);
}

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; }
}

/* Auth */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
}

.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  background: var(--text);
  color: var(--on-dark);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); grid-column: 1 / -1; }
.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

/* Comment list */
.comment-list { margin-top: 24px; }
.comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.comment-content { font-size: 14px; color: var(--text); line-height: 1.6; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.pagination a { background: var(--border-light); color: var(--text); }
.pagination a:hover { background: var(--border); }
.pagination span.active { background: var(--text); color: var(--bg-card); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.lightbox img {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  transition: transform 0.1s ease;
  cursor: grab;
}

.lightbox img:active { cursor: grabbing; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.15);
  color: var(--on-dark);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--on-dark);
  font-size: 13px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* Utility */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.section-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* ··· more 菜单（反馈#42：作品管理 / 我的分享 / 作品库通用；#47：hover 样式对齐导航下拉菜单） */
.manage-item { position: relative; }

.manage-more {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.15s;
}

.manage-item:hover .manage-more,
.method-card:hover .manage-more,
.manage-more.open { opacity: 1; }

.more-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg-card);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  padding: 0 0 4px;
}

.more-menu {
  position: absolute;
  top: 36px;
  right: 0;
  min-width: 140px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  display: none;
  z-index: 200;
}

.manage-more.open .more-menu { display: block; }

.more-item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--text);
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}

.more-item:hover { background: var(--hover-gray); }

.more-item.more-danger { color: var(--logout-red); }

.more-item.more-danger:hover { background: var(--hover-gray); }

/* 个人主页五卡（反馈#44） */
.score-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 900px) { .score-cards { grid-template-columns: repeat(2, 1fr); } }

.score-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.score-card-val { font-size: 26px; font-weight: 700; }

.score-card-lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.score-card-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  padding: 2px 6px;
  background: var(--bg-card);
  color: var(--text);
}

/* 右下角悬浮 Bug 反馈入口（反馈#57 设计稿 44×44 圆形白底；反馈#58 位置：距底部 80px、右侧 40px，移动端 16px） */
.bug-float-btn {
  position: fixed;
  right: 40px;
  bottom: 80px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--bug-float-border);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bug-float-btn:hover { transform: scale(1.06); }
.bug-float-btn svg { width: 24px; height: 24px; display: block; }
@media (max-width: 720px) {
  .bug-float-btn { right: 16px; bottom: 16px; }
}
