.article-library {
  max-width: 1180px;
}

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

.article-list-card {
  min-width: 0;
}

.article-list-card > a {
  position: relative;
  height: 190px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(29, 49, 82, 0.1);
  border-radius: 14px;
  background: #243650;
  box-shadow: 0 12px 26px rgba(27, 47, 78, 0.11);
  color: #fff;
  transform: translateZ(0);
  transition: transform 0.22s, box-shadow 0.22s;
}

.article-list-card > a:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px rgba(25, 45, 76, 0.2);
}

.article-card-cover,
.article-card-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.article-card-cover {
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-list-card > a:hover .article-card-cover {
  transform: scale(1.045);
}

.article-card-shade {
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.12) 15%, rgba(7, 14, 27, 0.32) 48%, rgba(6, 12, 24, 0.9) 100%);
}

.article-card-content {
  position: absolute;
  z-index: 2;
  left: 15px;
  right: 15px;
  bottom: 13px;
  display: grid;
  gap: 11px;
}

.article-card-content > strong {
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  margin: 0 -9px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fff;
  background: rgba(8, 17, 31, 0.34);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  font-size: 17px;
  line-height: 1.3;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.28);
}

.article-card-content > strong > span:last-child {
  min-width: 0;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.article-card-content > small {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
}

.article-card-content > small > * {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-card-read {
  margin-left: auto;
  color: #fff;
}

.article-card-read i {
  transition: transform 0.2s;
}

.article-list-card > a:hover .article-card-read i {
  transform: translateX(3px);
}

.article-detail {
  max-width: 1080px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: start;
  gap: 22px;
}

.article-detail > article {
  overflow: hidden;
  border: 1px solid #e3e9f2;
  border-radius: 18px;
  background: #fff;
}

.article-detail > article > header {
  padding: 34px 38px 30px;
  border-bottom: 1px solid #edf1f6;
  background: linear-gradient(145deg, #f9fbff, #eef4ff);
}

.article-detail > article > header > small {
  color: #6790e9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.article-detail h1 {
  margin: 7px 0 9px;
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -1px;
}

.article-detail header p {
  margin: 0 0 14px;
  color: #69768b;
  font-size: 15px;
}

.article-detail time {
  color: #8c97a8;
  font-size: 12px;
}

.article-body {
  padding: 34px 38px;
  color: #3f4b5e;
  font-size: 15px;
  line-height: 2;
  word-break: break-word;
}

.article-body .ql-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em auto;
  border-radius: 12px;
}

.article-like-panel {
  margin: 0 38px 34px;
  padding: 25px 24px;
  border: 1px solid #dce7f8;
  border-radius: 16px;
  background: radial-gradient(circle at 15% 0, rgba(100, 153, 255, 0.16), transparent 34%), linear-gradient(145deg, #f8fbff, #eef4ff);
  text-align: center;
}

.article-like-panel > small {
  color: #6f96e7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.article-like-panel > strong {
  display: block;
  margin-top: 4px;
  color: #34425a;
  font-size: 18px;
}

.article-like-panel > p {
  margin: 4px 0 17px;
  color: #8591a4;
  font-size: 12px;
}

.article-like-button {
  min-width: 210px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid #9dbdf4;
  border-radius: 999px;
  background: #fff;
  color: #3976df;
  cursor: pointer;
  font-weight: 800;
  transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s;
}

.article-like-button > i {
  font-size: 18px;
}

.article-like-button em {
  padding-left: 8px;
  border-left: 1px solid #d7e3f7;
  color: #7890b7;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
}

.article-like-button:hover:not(:disabled) {
  border-color: #4c88eb;
  background: #3978e5;
  color: #fff;
  box-shadow: 0 10px 22px rgba(48, 108, 214, 0.2);
  transform: translateY(-2px);
}

.article-like-button:hover:not(:disabled) em {
  border-color: rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.84);
}

.article-like-button.is-liked {
  border-color: #a8c5f5;
  background: #eaf2ff;
  color: #3473db;
}

.article-like-button.is-loading {
  cursor: wait;
  opacity: .65;
}

.article-random-sidebar {
  position: sticky;
  top: 91px;
  overflow: hidden;
  border: 1px solid #e3e9f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(35, 54, 87, 0.06);
}

.article-random-sidebar > header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 17px 15px;
  border-bottom: 1px solid #edf1f5;
  background: linear-gradient(145deg, #f8fbff, #eef4ff);
}

.article-random-sidebar > header > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  border-radius: 11px;
  background: #dfeaff;
  color: #3974df;
}

.article-random-sidebar > header div {
  display: grid;
}

.article-random-sidebar > header strong {
  color: #263249;
  font-size: 15px;
}

.article-random-sidebar > header small {
  color: #929cab;
  font-size: 10px;
}

.article-random-list {
  padding: 4px 15px;
}

.article-random-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f4;
}

.article-random-item:last-child {
  border-bottom: 0;
}

.article-random-item img {
  width: 66px;
  height: 47px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.article-random-item > span {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.article-random-item b {
  display: block;
  overflow: hidden;
  color: #3a4559;
  font-size: 12px;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.article-random-item > span > small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: #a0a8b4;
  font-size: 9px;
}

.article-random-item em {
  font-style: normal;
}

.article-random-item:hover b {
  color: #2867e8;
}

.article-random-item:hover img {
  filter: brightness(1.07);
}

.article-random-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 15px 15px;
  padding: 9px;
  border-radius: 9px;
  background: #f0f5ff;
  color: #4f72b1;
  font-size: 11px;
}

.article-random-more:hover {
  background: #e4eeff;
  color: #2865e6;
}

.article-form .article-content-input {
  min-height: 360px;
}

.article-form textarea[name="summary"] {
  min-height: 86px;
}

.article-form textarea[name="description"] {
  min-height: 90px;
}

.article-cover-picker {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #e1e7f0;
  border-radius: 12px;
  background: #f8faff;
}

.article-cover-picker > p {
  margin: 0;
  color: #7b8799;
  font-size: 12px;
}

.article-cover-picker > p i {
  margin-right: 5px;
  color: #4c7ed8;
}

.article-cover-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.article-cover-option {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  aspect-ratio: 16 / 10;
}

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

.article-cover-option:hover {
  border-color: #8eaff4;
}

.article-cover-option.is-selected {
  border-color: #2767ed;
  box-shadow: 0 0 0 3px #dfe9ff;
}

.article-cover-option span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: none;
  padding: 3px 7px;
  border-radius: 6px;
  color: #fff;
  background: #2767ed;
  font-size: 11px;
  font-weight: 700;
}

.article-cover-option.is-selected span {
  display: block;
}

.article-cover-picker.has-images .article-cover-empty,
.article-cover-picker:not(.has-images) .article-cover-options,
.article-cover-picker:not(.has-images) .article-cover-hint {
  display: none;
}

@media (max-width: 920px) {
  .article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-list-card > a {
    height: 210px;
  }
}

@media (max-width: 760px) {
  .article-detail {
    grid-template-columns: 1fr;
  }

  .article-random-sidebar {
    position: static;
  }

  .article-random-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
  }

  .article-random-item:nth-last-child(2) {
    border-bottom: 0;
  }

  .article-detail > article > header,
  .article-body {
    padding: 24px;
  }

  .article-like-panel {
    margin: 0 24px 24px;
  }

  .article-detail h1 {
    font-size: 26px;
  }
}

@media (max-width: 620px) {
  .article-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .article-list-card > a {
    height: 206px;
  }

  .article-card-content > strong {
    font-size: 18px;
  }

  .article-cover-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-random-list {
    grid-template-columns: 1fr;
  }

  .article-random-item:nth-last-child(2) {
    border-bottom: 1px solid #edf0f4;
  }

  .article-random-item:last-child {
    border-bottom: 0;
  }

  .article-like-panel {
    margin: 0 16px 20px;
    padding: 22px 15px;
  }

  .article-like-button {
    width: 100%;
    min-width: 0;
  }
}
