/* ================================
   全局基础样式
================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f5f5f5;
  color: #202124;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}


/* ================================
   顶部固定打开栏
================================ */

.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #eeeeee;
}

.app-header-inner {
  width: min(100%, 760px);
  min-height: 72px;

  margin: 0 auto;
  padding: 12px 16px;

  display: flex;
  align-items: center;
  gap: 12px;
}

.app-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;

  border-radius: 10px;
  object-fit: contain;

  background: #ffffff;
}

.app-slogan {
  min-width: 0;
  flex: 1;

  display: flex;
  align-items: center;
  gap: 8px;

  color: #222222;

  white-space: nowrap;
  overflow: hidden;
}

.app-slogan strong,
.app-slogan span {
  display: inline;

  margin: 0;

  font-size: 17px;
  line-height: 1.4;
  font-weight: 500;

  white-space: nowrap;
}

.open-button {
  flex: 0 0 auto;

  min-width: 72px;
  padding: 10px 18px;

  border-radius: 999px;

  background: #ff3b20;
  color: #ffffff;

  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}


/* ================================
   橙红色导航栏
================================ */

.news-nav {
  background: linear-gradient(
    90deg,
    #ff512f,
    #f20d0d
  );

  color: #ffffff;
}

.news-nav-inner {
  width: min(100%, 760px);
  height: 68px;

  margin: 0 auto;
  padding: 0 16px;

  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 18px;
}

.nav-logo-link {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  text-decoration: none;
}

.nav-logo {
  display: block;

  width: 62px;
  height: 46px;

  object-fit: contain;
}

.nav-text-link {
  color: #ffffff;

  text-decoration: none;
  white-space: nowrap;
}

.nav-text-link:hover {
  opacity: 0.85;
}

.brand-name {
  font-weight: 500;
}

.nav-arrow {
  color: rgba(255, 255, 255, 0.8);

  font-size: 27px;
  line-height: 1;
}

.nav-icons {
  margin-left: auto;

  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-icon-link {
  width: 40px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
  text-decoration: none;
}

.nav-icon-link:active,
.nav-logo-link:active,
.nav-text-link:active {
  opacity: 0.65;
}

.user-icon {
  position: relative;

  display: block;

  width: 31px;
  height: 38px;
}

.user-icon::before {
  content: "";

  position: absolute;
  top: 1px;
  left: 50%;

  width: 12px;
  height: 12px;

  border: 2px solid #ffffff;
  border-radius: 50%;

  transform: translateX(-50%);
}

.user-icon::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: 1px;

  width: 27px;
  height: 18px;

  border: 2px solid #ffffff;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;

  transform: translateX(-50%);
}

.menu-icon {
  width: 31px;
  height: 25px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-icon i {
  display: block;

  width: 100%;
  height: 3px;

  border-radius: 3px;
  background: #ffffff;
}


/* ================================
   页面主体
================================ */

.page-container {
  width: min(100%, 760px);

  margin: 0 auto;
  padding-bottom: 120px;

  background: #ffffff;
}


/* ================================
   文章区域
================================ */

.article {
  padding: 28px 22px 10px;
}

.article-title {
  margin: 0;

  color: #181818;

  font-size: 29px;
  line-height: 1.42;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.author {
  margin-top: 28px;

  display: flex;
  align-items: center;
  gap: 12px;
}

.author-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;

  object-fit: contain;

  background: #ffffff;
}

.author-name {
  margin-bottom: 5px;

  color: #333333;
  font-size: 15px;
}

.author-meta {
  color: #999999;
  font-size: 13px;
}

.article-content {
  margin-top: 45px;

  font-size: 18px;
  line-height: 1.95;
}

.article-content p {
  margin: 0 0 26px;
}

.article-image {
  display: block;

  width: 100%;
  height: auto;

  margin: 20px 0 28px;

  border-radius: 8px;
}


/* ================================
   正文跳转按钮
================================ */

.article-action {
  margin: 30px 0 38px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.article-action-button {
  width: 100%;
  max-width: 360px;
  min-height: 54px;

  padding: 12px 28px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: linear-gradient(
    90deg,
    #ff4c2e,
    #ff2415
  );

  color: #ffffff;
  text-decoration: none;
  text-align: center;

  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;

  box-shadow: 0 7px 20px rgba(255, 50, 25, 0.25);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.article-action-button:hover {
  opacity: 0.9;
}

.article-action-button:active {
  opacity: 0.8;
  transform: scale(0.98);
}


/* 章节标题 */

.section-title {
  position: relative;

  margin: 42px 0 22px;
  padding-left: 14px;

  font-size: 21px;
  line-height: 1.4;
}

.section-title::before {
  content: "";

  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;

  width: 4px;

  border-radius: 4px;
  background: #f52222;
}


/* ================================
   评论区域
================================ */

.comments {
  padding: 12px 18px 0;

  background: #fafafa;
}

.comments-heading {
  padding: 16px 4px 12px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comments-heading h2 {
  margin: 0;

  font-size: 23px;
}

.more-comments-button {
  padding: 0;

  border: 0;

  background: transparent;
  color: #ff3b20;

  font-size: 17px;
  white-space: nowrap;
}

.comments-card {
  padding: 0 20px;

  border-radius: 12px;
  background: #ffffff;

  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
}

.comment-item {
  padding: 23px 0;

  border-bottom: 1px solid #eeeeee;
}

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

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-user {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 10px;

  color: #777777;
}

.comment-user img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;

  border-radius: 50%;

  object-fit: cover;
}

.comment-user span {
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.comment-likes {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  gap: 7px;

  color: #999999;
}

.like-button {
  padding: 0;

  border: 0;

  background: transparent;
  color: #999999;

  font-size: 27px;
  line-height: 1;
}

.like-button.liked {
  color: #ff3b20;
}

.comment-text {
  margin-top: 14px;

  color: #222222;

  font-size: 20px;
  line-height: 1.55;
}

.comment-meta {
  margin-top: 6px;

  color: #a0a0a0;

  font-size: 14px;
}

.comment-meta button {
  padding: 0;

  border: 0;

  background: transparent;
  color: #ff3b20;
}

.comment-input {
  margin: 20px 18px;
  padding: 8px;

  display: flex;
  align-items: center;
  gap: 8px;

  border: 1px solid #eeeeee;
  border-radius: 10px;

  background: #ffffff;
}

.comment-input input {
  min-width: 0;
  flex: 1;

  padding: 10px;

  border: 0;
  outline: none;

  font-size: 16px;
}

.comment-input button {
  padding: 9px 18px;

  border: 0;
  border-radius: 8px;

  background: #ff3b20;
  color: #ffffff;
}


/* ================================
   右侧悬浮按钮
================================ */

.float-tools {
  position: fixed;

  right: max(
    15px,
    calc((100vw - 760px) / 2 + 15px)
  );

  bottom: 102px;
  z-index: 950;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.float-button {
  width: 52px;
  height: 52px;

  padding: 4px;

  border: 0;
  border-radius: 50%;

  background: #ff3b20;
  color: #ffffff;

  box-shadow: 0 5px 16px rgba(255, 59, 32, 0.28);
}

.float-button span,
.float-button small {
  display: block;
}

.float-icon {
  font-size: 23px;
  line-height: 23px;
}

.float-button small {
  margin-top: 2px;

  font-size: 11px;
}


/* ================================
   底部固定打开按钮
================================ */

.bottom-open-wrap {
  position: fixed;

  left: 0;
  right: 0;
  bottom: 14px;

  z-index: 900;

  pointer-events: none;
}

.bottom-open-button {
  width: min(340px, calc(100% - 120px));
  height: 54px;

  margin: 0 auto;
  padding: 6px 15px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;

  border-radius: 999px;

  background: linear-gradient(
    90deg,
    #ff441d,
    #ff2415
  );

  color: #ffffff;
  text-decoration: none;

  box-shadow: 0 7px 22px rgba(255, 45, 25, 0.25);

  pointer-events: auto;
}

.bottom-open-button img {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;

  padding: 3px;

  border-radius: 9px;

  background: #ffffff;

  object-fit: contain;
}

.bottom-open-button span {
  font-size: 21px;

  white-space: nowrap;
}

.bottom-open-button em {
  padding: 2px 4px;

  border-radius: 5px;

  background: #ff4174;

  font-size: 11px;
  font-style: normal;
}


/* ================================
   手机端适配
================================ */

@media (max-width: 520px) {

  .app-header-inner {
    min-height: 64px;

    padding: 9px 12px;
    gap: 9px;
  }

  .app-logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .app-slogan {
    display: flex;
    align-items: center;

    gap: 5px;

    white-space: nowrap;
    overflow: hidden;
  }

  .app-slogan strong,
  .app-slogan span {
    display: inline;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;

    white-space: nowrap;
  }

  .open-button {
    min-width: 64px;

    padding: 9px 14px;

    font-size: 16px;
  }

  .news-nav-inner {
    height: 62px;

    padding: 0 12px;
    gap: 8px;

    font-size: 17px;
  }

  .nav-logo {
    width: 58px;
    height: 42px;
  }

  .nav-text-link {
    font-size: 17px;
  }

  .nav-arrow {
    font-size: 24px;
  }

  .nav-icons {
    gap: 15px;
  }

  .nav-icon-link {
    width: 34px;
    height: 44px;
  }

  .user-icon {
    width: 28px;
    height: 35px;
  }

  .menu-icon {
    width: 29px;
    height: 23px;
  }

  .article {
    padding: 24px 17px 8px;
  }

  .article-title {
    font-size: 25px;
  }

  .article-content {
    margin-top: 38px;

    font-size: 17px;
    line-height: 1.9;
  }

  .article-action {
    margin: 26px 0 34px;
  }

  .article-action-button {
    max-width: none;
    min-height: 50px;

    padding: 11px 20px;

    font-size: 18px;
  }

  .comments {
    padding-right: 12px;
    padding-left: 12px;
  }

  .comments-heading h2 {
    font-size: 21px;
  }

  .more-comments-button {
    font-size: 16px;
  }

  .comments-card {
    padding: 0 15px;
  }

  .comment-text {
    font-size: 18px;
  }

  .float-tools {
    right: 12px;
    bottom: 96px;
  }

  .float-button {
    width: 50px;
    height: 50px;
  }

  .bottom-open-button {
    width: min(340px, calc(100% - 120px));
    height: 54px;
  }

  .bottom-open-button span {
    font-size: 21px;
  }

}


/* ================================
   更窄手机适配
================================ */

@media (max-width: 390px) {

  .app-header-inner {
    gap: 6px;
  }

  .app-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .app-slogan {
    gap: 4px;
  }

  .app-slogan strong,
  .app-slogan span {
    font-size: 14px;
  }

  .open-button {
    min-width: 58px;

    padding: 8px 12px;

    font-size: 15px;
  }

  .news-nav-inner {
    padding: 0 10px;
    gap: 6px;
  }

  .nav-logo {
    width: 52px;
    height: 39px;
  }

  .nav-text-link {
    font-size: 16px;
  }

  .nav-icons {
    gap: 10px;
  }

  .nav-icon-link {
    width: 31px;
  }

  .article-title {
    font-size: 23px;
  }

  .article-action-button {
    min-height: 48px;

    font-size: 17px;
  }

  .bottom-open-button {
    width: calc(100% - 110px);
    max-width: 320px;
    height: 52px;
  }

  .bottom-open-button img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .bottom-open-button span {
    font-size: 20px;
  }

}