:root {
  --max: 1280px;
  --outside: #292929;
  --ink: #070708;
  --red: #ed003b;
  --red-bright: #ff1d55;
  --text: #05090f;
  --muted: #687180;
  --line: #e6dfd7;
  --paper: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--outside);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
}

.material-symbols-rounded {
  font-size: 20px;
  line-height: 1;
}

.page {
  width: var(--max);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.header {
  height: 64px;
  padding: 0 30px;
  display: grid;
  grid-template-columns: auto 1fr 360px auto;
  gap: 28px;
  align-items: center;
  color: #fff;
  background: #080809;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.logo {
  color: var(--red-bright);
  font-size: 28px;
  font-weight: 950;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 26px;
  font-size: 15px;
  font-weight: 850;
}

.nav a {
  position: relative;
  height: 64px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, .86);
}

.nav a:hover,
.nav .active {
  color: #fff;
}

.nav .active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--red);
}

.search {
  height: 40px;
  display: grid;
  grid-template-columns: 1fr 48px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.search input::placeholder {
  color: rgba(255, 255, 255, .48);
}

.search button {
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: var(--red);
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 18px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
}

.actions a {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.actions .active {
  color: #fff;
}

.auth-main {
  min-height: 930px;
  padding: 30px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, .98), rgba(5, 5, 6, .73) 52%, rgba(5, 5, 6, .96)),
    url("../update/update-hero-bg.png") center / cover no-repeat,
    #050506;
}

.crumb {
  display: flex;
  gap: 8px;
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
}

.auth-wrap {
  height: 758px;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 46px;
  align-items: center;
}

.auth-copy {
  padding-left: 18px;
}

.auth-copy h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 48px;
  font-weight: 950;
  line-height: 1.05;
}

.auth-copy p {
  width: 560px;
  max-width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, .74);
  font-size: 16px;
  line-height: 1.9;
}

.auth-points {
  width: 420px;
  margin-top: 34px;
  display: grid;
  gap: 12px;
}

.auth-points div {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  font-weight: 900;
}

.auth-points .material-symbols-rounded {
  color: var(--red-bright);
}

.auth-card {
  padding: 34px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 950;
  line-height: 1.1;
}

.auth-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.account-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #05090f;
  font-size: 13px;
  font-weight: 900;
}

.input {
  height: 44px;
  display: grid;
  grid-template-columns: 38px 1fr;
  background: #fff;
  border: 1px solid var(--line);
}

.input .material-symbols-rounded {
  display: grid;
  place-items: center;
  color: #68717d;
}

.input input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 10px;
  background: transparent;
  color: #263140;
  font: inherit;
}

.input input::placeholder {
  color: #7a8490;
}

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #66717e;
  font-size: 13px;
  line-height: 1.7;
}

.checkline input {
  margin-top: 5px;
}

.btn {
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: var(--red);
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  cursor: pointer;
}

.btn.dark {
  background: #111216;
}

.auth-meta {
  margin-top: 18px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  color: #626c78;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.auth-meta a {
  color: var(--red);
  font-weight: 950;
}

.auth-note {
  margin-top: 18px;
  padding: 14px 16px;
  color: #596371;
  background: #fff5f7;
  border-left: 4px solid var(--red);
  font-size: 13px;
  line-height: 1.7;
}

.profile-hero {
  height: 152px;
  padding: 24px 30px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, .98), rgba(5, 5, 6, .72) 50%, rgba(5, 5, 6, .9)),
    url("../update/update-hero-bg.png") center / cover no-repeat,
    #050506;
}

.profile-hero h1 {
  margin: 10px 0 7px;
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}

.profile-hero p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
}

.library-hero {
  height: 152px;
}

.library-hero h1 {
  margin-top: 10px;
}

.profile-main {
  padding: 24px 30px 36px;
  background: #fff;
}

.account-bar {
  display: grid;
  grid-template-columns: 310px repeat(4, 1fr);
  margin-bottom: 22px;
  border: 1px solid var(--line);
}

.identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #b60036, #ed003b);
  font-size: 30px;
  font-weight: 950;
}

.identity h2 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 950;
}

.identity p,
.metric span {
  margin: 0;
  color: var(--muted);
}

.metric {
  min-height: 104px;
  padding: 20px 18px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 28px;
  font-weight: 950;
  line-height: 1;
}

.guest-bar .avatar {
  background: linear-gradient(135deg, #3a3e46, #15171c);
}

.empty-state {
  min-height: 360px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 22px;
  align-items: center;
  padding: 46px;
  background:
    linear-gradient(135deg, #fff 0%, #fff 58%, #fff6f8 100%);
}

.empty-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  color: var(--red);
  background: #fff5f7;
  border: 1px solid #f3d7df;
}

.empty-icon .material-symbols-rounded {
  font-size: 42px;
}

.empty-state h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 30px;
  font-weight: 950;
  line-height: 1.1;
}

.empty-state p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.empty-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.link-btn {
  min-height: 38px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  color: var(--red);
  font-size: 14px;
  font-weight: 950;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.35fr .9fr;
  gap: 22px;
}

.profile-stack,
.profile-side {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

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

.section-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 950;
}

.section-head h2 .material-symbols-rounded {
  color: var(--red);
}

.section-head a {
  color: #596371;
  font-size: 13px;
  font-weight: 900;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.shelf-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111;
}

.shelf-grid h3 {
  margin: 8px 0 4px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.entry {
  min-height: 124px;
  padding: 16px;
  border: 1px solid var(--line);
}

.entry .material-symbols-rounded {
  color: var(--red);
  font-size: 28px;
}

.entry h3 {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 950;
}

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

.info-list {
  display: grid;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.info-list div:last-child {
  border-bottom: 0;
}

.info-list b {
  color: var(--text);
  font-weight: 950;
}

.toolbar {
  min-height: 58px;
  margin-bottom: 20px;
  padding: 10px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
}

.tabs,
.filters,
.actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs a,
.filters a {
  min-height: 32px;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2d3642;
  background: #f7f4ef;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.tabs .active,
.filters .active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #263140;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
}

.btn.inline {
  width: auto;
  min-width: 112px;
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  gap: 6px;
}

.shelf-tools {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.shelf-search {
  height: 38px;
  display: grid;
  grid-template-columns: 38px 1fr;
  background: #fff;
  border: 1px solid var(--line);
}

.shelf-search .material-symbols-rounded {
  display: grid;
  place-items: center;
  color: #687180;
}

.shelf-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: #263140;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.sort-box {
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #263140;
  background: #f7f4ef;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px 18px;
}

.book {
  min-width: 0;
}

.cover-box {
  position: relative;
  display: block;
  background: #111;
}

.cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111;
}

.mark {
  position: absolute;
  top: 0;
  left: 0;
  min-height: 24px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  font-weight: 950;
}

.book h3 {
  margin: 9px 0 5px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress {
  height: 6px;
  margin-top: 9px;
  background: #eee9e2;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--red);
}

.pager {
  min-height: 74px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.pager a,
.pager span {
  min-width: 32px;
  height: 30px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: #4f5966;
  background: #f7f4ef;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
}

.pager .active {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.history-layout {
  display: grid;
  grid-template-columns: 226px 1fr;
  gap: 22px;
}

.date-rail {
  align-self: start;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.date-rail h2 {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 950;
}

.date-rail h2 .material-symbols-rounded {
  color: var(--red);
}

.date-list {
  display: grid;
  gap: 8px;
}

.date-list a {
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2d3642;
  background: #f7f4ef;
  border: 1px solid var(--line);
  font-weight: 900;
}

.date-list .active {
  color: #fff;
  background: #111216;
  border-color: #111216;
}

.history-stack {
  display: grid;
  gap: 18px;
}

.history-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
}

.history-date {
  min-height: 30px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-weight: 950;
}

.history-date span {
  color: var(--muted);
  font-size: 13px;
}

.history-list {
  display: grid;
}

.history-item {
  padding: 14px 0;
  display: grid;
  grid-template-columns: 86px 1fr 140px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.history-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.history-item img {
  width: 86px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111;
}

.history-item h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

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

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #4f5966;
  font-size: 13px;
}

.history-op {
  display: grid;
  gap: 10px;
}

.read-time {
  color: var(--red);
  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.footer {
  height: 146px;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 44px;
  color: rgba(255, 255, 255, .68);
  background: #050506;
}

.footer-logo {
  color: var(--red-bright);
  font-size: 26px;
  font-weight: 950;
}

.footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.footer p {
  margin: 8px 0 0;
  line-height: 1.7;
}

.footer a {
  display: block;
  margin: 7px 0;
  color: rgba(255, 255, 255, .72);
}

@media (max-width: 980px) {
  .page {
    width: 100%;
  }

  .header {
    grid-template-columns: auto 1fr;
    padding: 0 18px;
  }

  .search,
  .actions {
    display: none;
  }

  .nav {
    gap: 18px;
  }

  .auth-wrap,
  .profile-grid,
  .account-bar,
  .toolbar,
  .shelf-tools,
  .empty-state,
  .history-layout {
    grid-template-columns: 1fr;
  }

  .auth-main,
  .profile-main {
    padding: 24px 18px;
  }

  .auth-wrap {
    height: auto;
    padding: 70px 0;
  }

  .identity,
  .metric {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .bookshelf-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer {
    height: auto;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .auth-copy h1,
  .profile-hero h1 {
    font-size: 36px;
  }

  .auth-points,
  .auth-card {
    width: 100%;
  }

  .shelf-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bookshelf-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .history-item {
    grid-template-columns: 72px 1fr;
  }

  .history-op {
    grid-column: 1 / -1;
  }

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


.form-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.6;
}

.form-alert.error {
  color: #b60036;
  background: #fff3f6;
  border-color: #f2cad5;
}

.form-alert.success {
  color: #0f6a38;
  background: #f0fbf5;
  border-color: #bee8cf;
}

.form-row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field select {
  height: 44px;
  width: 100%;
  padding: 0 12px;
  color: #263140;
  background: #fff;
  border: 1px solid var(--line);
  font: inherit;
  outline: 0;
}

.muted-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.compact-history .history-item {
  grid-template-columns: 72px 1fr 116px;
}

.compact-history .history-item img {
  width: 72px;
}

.profile-form {
  gap: 14px;
}

.book-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.book-actions .btn.inline {
  min-width: 0;
  width: 100%;
  height: 34px;
  justify-content: center;
  font-size: 13px;
}

.mini-form {
  margin: 0;
}

.mini-form button {
  height: 34px;
  padding: 0 10px;
  color: #4f5966;
  background: #f7f4ef;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.task-grid a.entry {
  display: block;
  color: inherit;
}

@media (max-width: 640px) {
  .form-row.two,
  .compact-history .history-item,
  .book-actions {
    grid-template-columns: 1fr;
  }
}
