:root {
  --bg: #fff3f8;
  --panel: rgba(255, 246, 251, 0.88);
  --text: #3a2030;
  --muted: #7d5a6b;
  --line: rgba(182, 97, 144, 0.16);
  --gold: #ff77b7;
  --gold-deep: #d94f93;
  --berry: #d14c92;
  --green: #b54f88;
  --shadow: 0 20px 50px rgba(190, 94, 143, 0.16);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 119, 183, 0.2), transparent 22%),
    linear-gradient(135deg, #fff4fa 0%, #ffd4e9 45%, #ffc0df 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding: 36px;
  background:
    linear-gradient(120deg, rgba(255, 247, 251, 0.94), rgba(255, 196, 226, 0.82)),
    #fff;
  border: 1px solid rgba(209, 76, 146, 0.14);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  position: relative;
}

.hero__logo-mark {
  width: 98px;
  height: 98px;
  display: block;
  filter: drop-shadow(0 22px 36px rgba(209, 76, 146, 0.18));
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--berry);
}

.hero h1,
.panel__heading h2,
.item-card__name {
  margin: 0;
  font-family: "STZhongsong", "Songti SC", "SimSun", serif;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
}

.hero__text,
.panel__heading p,
.item-card__meta,
.item-card__description,
.ranking-item__meta,
.login-card__role,
.login-card__username,
.tips-card p,
.action-note,
.avatar-row__text p {
  color: var(--muted);
}

.hero__badge {
  min-width: 260px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 253, 0.82);
  border: 1px solid rgba(209, 76, 146, 0.14);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 248, 252, 0.88);
  border: 1px solid rgba(209, 76, 146, 0.16);
  color: var(--berry);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-members {
  margin-top: 18px;
}

.hero-members__label {
  display: block;
  margin-bottom: 10px;
  color: var(--berry);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-members__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-member {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 250, 253, 0.88);
  border: 1px solid rgba(209, 76, 146, 0.12);
  box-shadow: 0 10px 24px rgba(209, 76, 146, 0.08);
}

.hero-member__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff7eb;
  font-weight: 700;
  font-size: 0.92rem;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-member__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-member__text strong,
.hero-member__text small {
  display: block;
}

.hero-member__text strong {
  font-size: 0.92rem;
}

.hero-member__text small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.hero__badge span,
.hero__badge small {
  display: block;
}

.hero__badge span {
  margin-bottom: 6px;
  font-size: 0.92rem;
  color: var(--berry);
}

.hero__badge small {
  margin-top: 6px;
}

.session-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.session-profile__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #fff7eb;
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 10px 22px rgba(209, 76, 146, 0.18);
}

.session-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.session-profile__content {
  min-width: 0;
}

.session-profile__content strong {
  display: block;
  font-size: 1.12rem;
}

.session-profile__role {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 119, 183, 0.14);
  color: var(--gold-deep);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(10px);
}

.panel__heading {
  margin-bottom: 18px;
}

.panel__heading p {
  margin: 8px 0 0;
}

.panel__heading--compact {
  margin: 24px 0 14px;
}

.login-form,
.item-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-grid,
.avatar-manager,
.ranking-list,
.item-list {
  display: grid;
  gap: 14px;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.password-panel {
  margin-top: 24px;
  padding-top: 2px;
}

.settings-group {
  margin-top: 14px;
  border: 1px solid rgba(209, 76, 146, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 249, 252, 0.8);
  overflow: hidden;
}

.settings-group[open] {
  background: rgba(255, 248, 252, 0.92);
}

.settings-group__summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--berry);
}

.settings-group__summary::-webkit-details-marker {
  display: none;
}

.settings-group__summary::after {
  content: "+";
  float: right;
  font-size: 1.1rem;
}

.settings-group[open] .settings-group__summary::after {
  content: "-";
}

.settings-group__body {
  padding: 0 16px 16px;
}

.settings-group__hint {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.login-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 249, 252, 0.96), rgba(255, 213, 234, 0.72));
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.login-card:hover,
.login-card.is-active {
  transform: translateY(-2px);
  border-color: rgba(217, 79, 147, 0.35);
  box-shadow: 0 14px 28px rgba(190, 94, 143, 0.18);
}

.login-card__copy {
  min-width: 0;
}

.login-card__name {
  display: block;
  font-size: 1rem;
}

.login-card__username {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
}

.login-card__role {
  margin: 4px 0 0;
  font-size: 0.86rem;
}

.login-card--locked {
  cursor: default;
}

.login-card--locked:hover {
  transform: none;
}

.login-card__avatar,
.avatar-badge,
.avatar-chip {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff7eb;
  font-weight: 700;
  font-size: 0.98rem;
  overflow: hidden;
}

.avatar-badge {
  margin: 0 auto;
}

.login-card__avatar img,
.avatar-badge img,
.avatar-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: rgba(255, 248, 252, 0.88);
  border: 1px solid rgba(209, 76, 146, 0.1);
}

.avatar-row__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-row__text p {
  margin: 4px 0 0;
  font-size: 0.88rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-actions,
.item-card__actions {
  display: flex;
  gap: 12px;
}

.form-actions--stack {
  flex-direction: column;
}

#changePasswordBtn {
  width: 100%;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(209, 76, 146, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 252, 254, 0.96);
  color: var(--text);
}

input[readonly] {
  background: rgba(255, 230, 241, 0.75);
}

textarea {
  resize: vertical;
}

.tips-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(209, 76, 146, 0.08), rgba(255, 119, 183, 0.1));
  border: 1px dashed rgba(209, 76, 146, 0.24);
}

.tips-card--soft {
  background: rgba(255, 247, 251, 0.92);
  border-style: solid;
}

.tips-card span {
  font-weight: 700;
}

.tips-card p {
  margin: 0;
  font-size: 0.94rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold), #f0bf56);
  color: #2a1d08;
  font-weight: 700;
}

.btn--ghost {
  background: rgba(255, 248, 252, 0.92);
  border: 1px solid rgba(209, 76, 146, 0.18);
  color: var(--text);
}

.ranking-item,
.item-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 253, 0.92);
  border: 1px solid rgba(209, 76, 146, 0.12);
}

.ranking-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.ranking-item__index {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 119, 183, 0.96), rgba(217, 79, 147, 0.94));
  color: #fff9ef;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.ranking-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.ranking-item__type,
.item-card__type {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(46, 106, 79, 0.12);
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 700;
}

.ranking-item__score {
  font-weight: 700;
  color: var(--gold-deep);
}

.item-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.item-card--editing {
  border-color: rgba(217, 79, 147, 0.42);
  box-shadow: 0 18px 38px rgba(209, 76, 146, 0.22);
}

.item-card__media {
  min-height: 220px;
  background:
    linear-gradient(135deg, rgba(255, 119, 183, 0.22), rgba(209, 76, 146, 0.18)),
    #ffe7f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-card__placeholder {
  padding: 16px;
  text-align: center;
  color: var(--muted);
}

.inline-editor-input,
.inline-editor-select,
.inline-editor-textarea {
  width: 100%;
}

.inline-editor-textarea {
  min-height: 110px;
}

.inline-editor-notice {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 119, 183, 0.12);
  border: 1px solid rgba(217, 79, 147, 0.16);
  color: var(--gold-deep);
  font-size: 0.92rem;
  line-height: 1.5;
}

.inline-editor-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 16px;
}

.inline-editor-media__preview {
  width: 100%;
  min-height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(209, 76, 146, 0.14);
}

.inline-editor-media__controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-editor-file {
  margin-top: 8px;
}

.item-card__content {
  padding: 20px;
}

.item-card__editing-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 119, 183, 0.14);
  color: var(--gold-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.item-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.item-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.item-card__meta,
.item-card__description {
  margin: 8px 0 0;
}

.item-card__totals {
  min-width: 120px;
  text-align: right;
}

.item-card__sum {
  display: block;
  font-size: 1.28rem;
  color: var(--gold-deep);
}

.item-card__average {
  color: var(--muted);
  font-size: 0.92rem;
}

.rating-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(209, 76, 146, 0.12);
}

.rating-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.rating-grid--editor {
  margin-top: 0;
}

.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 235, 245, 0.8);
}

.rating-row select {
  width: auto;
  min-width: 86px;
  padding-right: 34px;
}

.like-toggle {
  min-width: 96px;
  font-weight: 700;
}

.like-toggle--active {
  background: linear-gradient(135deg, var(--gold), #f0bf56);
  color: #2a1d08;
  border-color: transparent;
}

.empty-state {
  padding: 18px;
  text-align: center;
  border: 1px dashed rgba(209, 76, 146, 0.22);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.site-footer {
  margin-top: 24px;
}

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

.footer-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 253, 0.94);
  border: 1px solid rgba(209, 76, 146, 0.14);
}

.footer-card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.footer-card p,
.footer-card span,
.site-footer__bottom span {
  color: var(--muted);
}

.footer-card p {
  margin: 0 0 8px;
}

.footer-card span {
  display: block;
  line-height: 1.6;
  font-size: 0.94rem;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(209, 76, 146, 0.14);
  font-size: 0.92rem;
}

@media (max-width: 1180px) {
  .layout,
  .content-grid,
  .footer-grid,
  .item-card {
    grid-template-columns: 1fr;
  }

  .item-card__media {
    min-height: 260px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

  .hero {
    flex-direction: column;
    padding: 24px;
  }

  .hero__logo {
    min-width: auto;
  }

  .hero__badge {
    min-width: auto;
    width: 100%;
  }

  .form-row,
  .rating-grid,
  .edit-media {
    grid-template-columns: 1fr;
  }

  .item-card__header {
    flex-direction: column;
  }

  .item-card__totals {
    text-align: left;
  }

  .form-actions,
  .item-card__actions {
    flex-direction: column;
  }

  .site-footer__bottom {
    flex-direction: column;
  }
}
