:root {
  --bg: #f7faff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --line: #dfe8f7;
  --text: #172033;
  --muted: #66758c;
  --faint: #8c9bb2;
  --blue: #2f7cff;
  --blue-2: #5a72ff;
  --violet: #8257f7;
  --green: #32b57a;
  --amber: #f4a62a;
  --rose: #f25f73;
  --shadow: 0 20px 60px rgba(53, 91, 154, 0.13);
  --soft-shadow: 0 10px 30px rgba(53, 91, 154, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 30% 6%, rgba(91, 125, 255, 0.14), transparent 32rem),
    radial-gradient(circle at 78% 14%, rgba(138, 97, 248, 0.12), transparent 28rem),
    linear-gradient(180deg, #fbfdff 0%, #f5f8ff 48%, #ffffff 100%);
  min-width: 1180px;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: grid;
  grid-template-columns: 270px minmax(320px, 680px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(221, 230, 246, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #24a7ff, #7955ff);
  box-shadow: 0 12px 24px rgba(47, 124, 255, 0.24);
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.search {
  height: 42px;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px rgba(66, 103, 161, 0.06);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search span {
  min-width: 36px;
  padding: 3px 6px;
  border-radius: 7px;
  color: #9aa8bd;
  background: #f2f5fb;
  font-size: 12px;
  text-align: center;
}

.user-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.login-button,
.ghost,
.avatar {
  border: 1px solid var(--line);
  background: white;
  color: #21304a;
  border-radius: 11px;
  height: 40px;
  padding: 0 16px;
  cursor: pointer;
}

.avatar {
  width: 40px;
  padding: 0;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

main {
  padding: 0 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 342px;
  max-width: 1900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(430px, 0.9fr) minmax(520px, 1.2fr) 370px;
  gap: 26px;
  align-items: center;
  padding: 34px 38px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background:
    radial-gradient(circle at 52% 30%, rgba(47, 124, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 72% 54%, rgba(130, 87, 247, 0.16), transparent 22rem),
    linear-gradient(113deg, #fbfdff 0%, #eef6ff 49%, #f7f2ff 100%);
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 18px 31% 28px 34%;
  border: 2px solid rgba(47, 124, 255, 0.12);
  border-left-color: rgba(47, 124, 255, 0.32);
  border-radius: 50%;
  transform: rotate(-11deg);
}

.hero-copy,
.hero-stage,
.hero-stats {
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 9px 14px;
  color: var(--blue);
  font-weight: 800;
  border-radius: 999px;
  background: rgba(47, 124, 255, 0.1);
}

.hero h1 {
  max-width: 560px;
  margin: 0;
  font-size: 54px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 span {
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(135deg, #2379ff 12%, #8755ff 68%, #b14cff);
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  max-width: 520px;
  margin: 18px 0 26px;
  color: #536176;
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.primary,
.secondary,
.wide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 26px;
  font-weight: 800;
  cursor: pointer;
}

.primary {
  color: white;
  background: linear-gradient(135deg, #7d4fff, #1e9bff);
  box-shadow: 0 14px 28px rgba(47, 124, 255, 0.26);
}

.secondary {
  color: #2d4a78;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(53, 91, 154, 0.08);
}

.hero-stage {
  min-height: 270px;
}

.floating-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(214, 226, 246, 0.85);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 44px rgba(38, 65, 124, 0.15);
  backdrop-filter: blur(16px);
}

.floating-card span {
  color: #5b6d88;
  font-size: 13px;
  font-weight: 800;
}

.floating-card strong {
  color: #15223c;
  font-size: 18px;
}

.card-bot {
  left: 30px;
  top: 12px;
  width: 238px;
  height: 120px;
  padding: 22px;
  transform: rotate(-5deg);
}

.card-data {
  right: 52px;
  top: 0;
  width: 250px;
  height: 150px;
  padding: 22px;
  color: white;
  background:
    linear-gradient(135deg, rgba(16, 26, 49, 0.98), rgba(24, 42, 76, 0.96)),
    radial-gradient(circle, rgba(91, 125, 255, 0.3), transparent);
  transform: rotate(5deg);
}

.card-data span,
.card-data strong {
  color: white;
}

.card-data::after {
  content: "";
  height: 46px;
  margin-top: 14px;
  border-radius: 12px;
  background:
    linear-gradient(120deg, transparent 7%, rgba(72, 172, 255, 0.9) 10%, transparent 14%),
    linear-gradient(140deg, transparent 37%, rgba(241, 94, 255, 0.9) 40%, transparent 45%),
    linear-gradient(120deg, transparent 63%, rgba(50, 181, 122, 0.9) 66%, transparent 72%),
    rgba(255, 255, 255, 0.08);
}

.card-game {
  left: 8px;
  bottom: 12px;
  width: 310px;
  height: 126px;
  padding: 22px;
  color: white;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 220, 80, 0.8), transparent 24%),
    linear-gradient(135deg, #2e2b83, #5862f0 48%, #182656);
}

.card-game span,
.card-game strong {
  color: white;
}

.card-task {
  right: 18px;
  bottom: 8px;
  width: 300px;
  height: 118px;
  padding: 20px;
}

.hero-stats {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(218, 228, 246, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(223, 232, 247, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.stat-card span:not(.stat-icon) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  color: #172033;
  font-size: 28px;
  line-height: 1;
}

.stat-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  color: var(--muted);
}

.stat-row strong {
  color: #172033;
  font-size: 24px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.tone-0 {
  background: linear-gradient(135deg, #4e78ff, #74c6ff);
}

.tone-1 {
  background: linear-gradient(135deg, #2dbd82, #9bdc8f);
}

.tone-2 {
  background: linear-gradient(135deg, #ff7a59, #ffd166);
}

.tone-3 {
  background: linear-gradient(135deg, #745bff, #b276ff);
}

.chart-card {
  padding: 14px;
  border: 1px solid rgba(223, 232, 247, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.chart-head,
.rank-row,
.bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chart-head {
  margin-bottom: 12px;
}

.chart-head strong {
  font-size: 14px;
}

.chart-head span {
  color: var(--faint);
  font-size: 12px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row span {
  width: 72px;
  color: #51627b;
  font-size: 12px;
  font-weight: 800;
}

.bar-row div {
  flex: 1;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3ff;
}

.bar-row i {
  display: block;
  height: 100%;
  min-width: 12px;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7cff, #8257f7);
}

.bar-row strong,
.rank-row strong {
  width: 20px;
  color: #172033;
  font-size: 13px;
  text-align: right;
}

.mini-rank {
  display: grid;
  gap: 8px;
}

.rank-row span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: white;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  background: linear-gradient(135deg, #4e78ff, #8257f7);
}

.rank-row em {
  flex: 1;
  overflow: hidden;
  color: #51627b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout {
  max-width: 1860px;
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: minmax(820px, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.panel,
.work-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(53, 91, 154, 0.07);
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 88px;
  padding: 18px;
  border-radius: 14px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef8;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
}

.section-head span {
  color: var(--faint);
  font-size: 13px;
}

.compact-list,
.activity-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.compact-list button,
.activity-list button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.compact-list button:hover,
.activity-list button:hover {
  background: rgba(47, 124, 255, 0.06);
}

.rank,
.mini-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-weight: 900;
  background: #eef4ff;
}

.compact-list strong,
.activity-list strong {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.compact-list small,
.activity-list small,
.activity-list time {
  color: var(--faint);
  font-size: 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tabs button,
.filter-row select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 18px;
  color: #253653;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.tabs button.active {
  color: #245dff;
  border-color: #a9c0ff;
  background: #eef4ff;
  box-shadow: 0 8px 20px rgba(47, 124, 255, 0.12);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(230px, 1fr));
  gap: 16px;
}

.work-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 472px;
  border-radius: 14px;
  background: var(--panel-strong);
}

.bookmark {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 10px;
  color: white;
  background: rgba(11, 18, 33, 0.34);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.thumb {
  position: relative;
  width: 100%;
  height: 148px;
  display: block;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #e7edf8;
  padding: 0;
  background: #edf3ff;
  cursor: pointer;
}

.thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.accent-violet .thumb {
  background: linear-gradient(135deg, #31266c, #6e6dff);
}

.accent-blue .thumb {
  background: linear-gradient(135deg, #214a86, #76b7ff);
}

.accent-amber .thumb {
  background: linear-gradient(135deg, #9d5c16, #ffd166);
}

.accent-green .thumb {
  background: linear-gradient(135deg, #116149, #7bd88f);
}

.accent-slate .thumb {
  background: linear-gradient(135deg, #40536f, #9db6d8);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 16px;
}

.card-kicker,
.card-foot {
  margin-top: auto;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-size: 12px;
}

.card-kicker span:first-child {
  color: #466189;
  font-weight: 800;
}

.work-card h3 {
  min-height: 46px;
  display: -webkit-box;
  margin: 10px 0 6px;
  overflow: hidden;
  font-size: 17px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.work-card p {
  min-height: 84px;
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.edit-description {
  align-self: flex-start;
  height: 30px;
  margin: -2px 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
  color: #245dff;
  background: #f7faff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.author {
  max-width: 84px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #253653;
  font-weight: 800;
}

.like {
  min-width: 76px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #dfe8f7;
  border-radius: 999px;
  color: #40516b;
  background: #f7faff;
  cursor: pointer;
}

.like.liked {
  border-color: rgba(255, 63, 118, 0.26);
  color: #ff3f76;
  font-weight: 900;
  background: #fff0f5;
}

.like span {
  font-size: 19px;
  line-height: 1;
}

.like strong {
  font-size: 15px;
}

.like:disabled {
  opacity: 0.62;
  cursor: wait;
}

.wide-link {
  width: 100%;
  margin-top: 16px;
  color: #245dff;
  border: 1px solid var(--line);
  background: white;
}

.ghost-wide {
  color: #40516b;
  background: #f7faff;
}

.discussion-panel {
  display: grid;
  gap: 14px;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.comment-form label {
  display: grid;
  gap: 6px;
  color: #40516b;
  font-size: 13px;
  font-weight: 800;
}

.comment-form select,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: white;
}

.comment-form select {
  height: 40px;
  padding: 0 10px;
}

.comment-form textarea {
  min-height: 86px;
  padding: 10px;
  line-height: 1.5;
  resize: vertical;
}

.comment-error {
  min-height: 20px;
  margin: 0;
  color: #e03a5f;
  font-size: 12px;
  font-weight: 800;
}

.comment-list {
  display: grid;
  gap: 10px;
}

.comment-item,
.comment-empty {
  border: 1px solid #e8eef8;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.comment-item {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.comment-item div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.comment-item strong {
  color: #253653;
  font-size: 13px;
}

.comment-item time {
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
}

.comment-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.comment-item p span {
  color: #245dff;
  font-weight: 900;
}

.comment-empty {
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.footer {
  max-width: 1860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding: 28px 44px 36px;
  color: var(--muted);
  border-top: 1px solid #e8eef8;
}

.footer strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}

.footer span,
.footer a {
  display: block;
  margin-bottom: 8px;
}

.footer span {
  color: var(--text);
  font-weight: 800;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 100px rgba(20, 37, 70, 0.28);
}

dialog::backdrop {
  background: rgba(21, 32, 56, 0.34);
  backdrop-filter: blur(5px);
}

.login-dialog {
  width: 420px;
  padding: 0;
}

.login-dialog form,
.description-dialog form {
  display: grid;
  gap: 16px;
  padding: 26px;
}

.login-dialog h2,
.description-dialog h2 {
  margin: 0;
}

.login-dialog p,
.description-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-dialog .login-error {
  min-height: 22px;
  color: #e03a5f;
  font-weight: 800;
}

.login-dialog label {
  display: grid;
  gap: 7px;
  color: #40516b;
  font-weight: 800;
}

.login-dialog input,
.login-dialog select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
}

.description-dialog {
  width: min(620px, 92vw);
  padding: 0;
}

.description-dialog textarea {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  line-height: 1.7;
  resize: vertical;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-actions button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 18px;
  background: white;
  cursor: pointer;
}

.dialog-actions .primary {
  border: 0;
}

.preview-dialog {
  width: min(1500px, 92vw);
  height: min(930px, 88vh);
  padding: 0;
  overflow: hidden;
}

.preview-head {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 0 24px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.preview-head h2 {
  margin: 0;
  font-size: 18px;
}

.preview-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-head > div:last-child {
  display: flex;
  gap: 10px;
}

.preview-head button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 18px;
  background: white;
  cursor: pointer;
}

.preview-dialog iframe {
  width: 100%;
  height: calc(100% - 72px);
  border: 0;
  background: white;
}

.empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed #cbd8eb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1300px) {
  body {
    min-width: 0;
  }

  .topbar {
    grid-template-columns: 1fr minmax(280px, 420px) auto;
    height: 72px;
    padding: 0 18px;
  }

  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: minmax(340px, 0.86fr) minmax(430px, 1fr);
    grid-template-areas:
      "copy stage"
      "stats stats";
  }

  .hero-copy {
    grid-area: copy;
  }

  .hero-stage {
    grid-area: stage;
  }

  .hero-stats {
    grid-area: stats;
    grid-template-columns: 1.05fr 1fr 1fr;
    align-items: stretch;
  }

  .hero {
    padding: 28px 22px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-stage {
    min-height: 250px;
  }

  .sidebar {
    position: static;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar,
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    gap: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .search {
    grid-column: 1 / -1;
  }

  .hero-stage {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "stats";
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }

  .cards,
  .footer {
    grid-template-columns: 1fr;
  }
}
