/**
 * 清明节 H5 样式文件
 */

/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
  background: #1e1312;
  color: #f5e6d3;
}

/* 容器 */
.container {
  position: relative;
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  height: 300vh; /* 3 屏高度 */
  transition: transform 0.5s ease-in-out;
  -webkit-transition: -webkit-transform 0.5s ease-in-out;
}

/* 每屏页面 */
.page {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.page.active {
  z-index: 10;
}

/* 通用区域样式 */
.section-1,
.section-2,
.section-3,
.section-4 {
  width: 100%;
  padding: 10px 15px;
}

/* ========== 第一屏样式 ========== */
#page1 {
  background: url('../images/background-2.jpg') center top no-repeat;
  background-size: 100% auto;
  display: flex;
  flex-direction: column;
}

/* 头部区域 */
.header-section {
  flex: 0 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
  height: 588rem;
}

.header-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-title {
  font-size: 32px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin-top: 15px;
  line-height: 1.3;
}

/* 文字展示区域 */
.text-section {
  height: 194rem;
  overflow: hidden;
  flex: 0 0 auto;
}

.text-content {
  font-size: 14px;
  line-height: 1.8;
  text-indent: 2em;
  text-align: justify;
}

.text-content p {
  margin-bottom: 10px;
}

.highlight {
  color: #ffd700;
  font-weight: bold;
  font-size: 16px;
}

/* 人员列表区域 */
.personnel-section {
  flex: 1 1 auto;
  overflow: hidden;
  margin: 0 30rem 20rem 30rem;
  background: rgba(64, 56, 55, 0.23);
  border-radius: 10rem;
  overflow-y: scroll;
}

.personnel-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2rem;
  padding: 15rem;
}

.personnel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* background: rgba(255, 255, 255, 0.1); */
  width: 78rem;
  height: 100rem;
  /* border-radius: 8px;
  padding: 8px 4px;
  transition: transform 0.3s ease; */
}

.personnel-item-2 {
  width: 158rem;
  grid-column: span 2;
}

.personnel-photo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 5px;
}

.personnel-item img {
  width: 100%;
  height: 100%;
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
  object-fit: cover;
}

.personnel-name {
  font-size: 11px;
  color: #f5e6d3;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 按钮和统计区域 */
.action-section {
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 36rem;
  margin-bottom: 14rem;
}

.statistics {
  line-height: 40rem;
  text-align: center;
  font-size: 24rem;
  color: #ffffff;
  padding-bottom: 10rem;
}

.highlight-number {
  color: #f5b86f;
  font-weight: bold;
  font-size: 34rem;
}

/* ========== 第二屏样式 ========== */

/* 标题区域 */
.title-section {
  flex: 0 0 auto;
  padding-top: 60rem;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 8px;
}

.title-subtitle {
  margin-left: 60rem;
  margin-top: 36rem;
  font-size: 22rem;
  line-height: 60rem;
  color: #f5b86f;
}
.title-subtitle-foot {
  margin-top: 0;
  margin-bottom: 036rem;
}

/* 名录列表区域 */
.list-section {
  flex: 1 1 auto;
  overflow-y: auto;
  background: #403837;
  margin: 0 28rem;
  border-radius: 10rem;
}

.personnel-list {
  display: flex;
  flex-direction: column;
}

.martyr-item {
  color: #fff;
  font-size: 26rem;
  line-height: 40rem;
  padding: 18rem 36rem;
  border-bottom: 1rem solid #1e1312;
}

.martyr-header {
  display: flex;
}

.martyr-name {
  font-weight: bold;
  margin-right: 36rem;
}

.martyr-gender {
  flex: 2;
}

.martyr-name {
  flex: 3;
}

.martyr-info {
  flex: 4;
}

.martyr-deeds {
}

/* ========== 第三屏样式 ========== */

/* 留言提交区域 */

.img-title-3-1 {
  margin: 40rem 0 40rem 0;
}
.message-submit-section {
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 16rem;
  margin: 0 36rem;
}

.form-row {
  display: flex;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  color: #f5e6d3;
}

.form-select {
  flex: 1;
  min-width: 0;
  height: 90rem;
  padding: 0 30rem;
  border: none;
  border-radius: 10rem;
  background: #fff;
  color: #000;
  font-size: 26rem;
  appearance: none;
  -webkit-appearance: none;
}

.form-textarea {
  flex: 1;
  padding: 16rem;
  font-size: 26rem;
  line-height: 29rem;
  border-radius: 10rem;
  background: rgba(255, 255, 255, 0.9);
  color: #1a0f0a;
  resize: none;
  min-height: 120rem;
  font-family: inherit;
  outline: none;
  border: none;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: #f5e6d3;
}
.btn-submit {
  margin: 30rem auto 30rem auto;
}

/* 热门留言区域 */
.hot-messages-section {
}
.img-title-3-2 {
  margin-bottom: 36rem;
}
.img-title-3-3 {
  margin-top: 30rem;
  margin-bottom: 30rem;
}

.section-title {
  font-size: 18px;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 12px;
}

.messages-scroll {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.horizontal-scroll {
  display: flex;
}

.message-item {
  display: flex;
  flex: 0 0 auto;
  background: #403837;
  border-radius: 10rem;
  padding: 26rem;
  width: 548rem;
  height: 220rem;
  white-space: normal;
  margin-right: 26rem;
}
.message-item.first {
  margin-left: 26rem;
}

.message-avatar {
  width: 85rem;
  height: 85rem;
  border-radius: 50%;
  overflow: hidden;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  opacity: 0.5;
  object-fit: cover;
}

.message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 30rem;
  font-size: 26rem;
  line-height: 45rem;
  color: #ffffff;
}

.message-content p {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.message-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-location {
  flex: 1;
}

.message-likes {
  display: inline-flex;
  align-items: center;
  font-size: 26rem;
  color: #fff;
}

.message-likes .like {
  width: 28rem;
  height: 28rem;
  margin-right: 6rem;
}

/* 实时留言区域 */
.real-time-messages-section {
}

/* 返回按钮区域 */
.back-section {
  flex: 0 0 auto;
  text-align: center;
}

/* ========== 音乐控制 ========== */

.music-control {
  position: fixed;
  top: 20rem;
  right: 20rem;
  width: 40rem;
  height: 40rem;
  z-index: 1000;
  cursor: pointer;
}

.music-icon {
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22%23ffd700%22%3E%3Cpath d=%22M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z%22/%3E%3C/svg%3E')
    no-repeat center center;
  background-size: contain;
}

.music-icon.rotating {
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ========== 弹窗样式 ========== */

.flower-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.flower-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
}

.modal-content img {
  width: 232rem;
  height: 387rem;
}

/* ========== 提示框样式 ========== */

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

/* 按钮 */
.btn {
  width: 320rem;
  height: 79rem;
  border: none;
  cursor: pointer;
  background-color: transparent;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  outline: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-tap-highlight-color: transparent; /* 去除高亮 */
}
.btn:active {
  outline: none;
}
.btn:focus {
  background-color: transparent;
}
.btn-flower {
  background-image: url('../images/btn3.png');
}
.btn-back {
  margin-top: 20rem;
  background-image: url('../images/btn1.png');
}
.btn-submit {
  background-image: url('../images/btn2.png');
}
.btn-secondary {
  background-image: url('../images/btn4.png');
}
.btn-list {
  background-image: url('../images/btn5.png');
}
.btn-moment {
  background-image: url('../images/btn6.png');
}
.img-title-2 {
  width: 647rem;
  height: 50rem;
  background: url('../images/title4.png') no-repeat center center;
  background-size: 100% 100%;
  margin: 0 auto;
}
.img-title-3-1 {
  width: 345rem;
  height: 50rem;
  background: url('../images/title3.png') no-repeat center center;
  background-size: 100% 100%;
  margin-left: 60rem;
}
.img-title-3-2 {
  width: 194rem;
  height: 49rem;
  background: url('../images/title1.png') no-repeat center center;
  background-size: 100% 100%;
  margin-left: 60rem;
}
.img-title-3-3 {
  width: 191rem;
  height: 50rem;
  background: url('../images/title2.png') no-repeat center center;
  background-size: 100% 100%;
  margin-left: 60rem;
}

.video-section {
  display: none;
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #fff;
  border-radius: 20rem 20rem 0 0;
  opacity: 0;
  transition: opacity ease-in-out 0.25s;
}
.video-section.active {
  opacity: 1;
}
.video-title {
 font-size: 38rem;
 line-height: 40rem;
 padding: 40rem 0;
 text-align: center;
 color: #000;
}

.video-view {
  margin: 16rem;
  height: 360rem;
}
.video-view video {
  width: 100%;
  height: 100%;
}
.video-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 120rem 0;
}

.video-btn {
  width: 200rem;
  height: 70rem;
  line-height: 70rem;
  color: #fff;
  font-size: 30rem;
  text-align: center;
  border-radius: 35rem;
  background-color: rgba(0, 0, 0, 0.35);
}

/* ========== 响应式适配 ========== */

/* 小屏幕手机 */
@media screen and (max-height: 800px) {
  .btn {
    width: 240rem;
    height: 59rem;
  }
  .img-title-3-1,
  .img-title-3-2,
  .img-title-3-3,
  .btn-submit {
    margin-top: 20rem;
    margin-bottom: 20rem;
  }
  .btn-submit {
    margin-bottom: 0;
  }
  .btn-back {
    margin-top: 20rem;
  }

  .img-title-2 {
    width: 517.6rem;
    height: 40rem;
  }

  .img-title-3-1 {
    width: 276rem;
    height: 40rem;
  }

  .img-title-3-2 {
    width: 158rem;
    height: 40rem;
  }

  .img-title-3-3 {
    width: 152.8rem;
    height: 40rem;
  }

  .form-select {
    height: 60rem;
  }
}

@media screen and (max-height: 700px) {
  .message-item {
    height: 200rem;
    padding: 16rem;
  }
}


/* 横屏模式 */
@media screen and (orientation: landscape) {
  .page {
    overflow-y: auto;
  }
}
