/* ======================
   全局
====================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}


body {
  margin: 0;
  min-height: 100vh;
  color: #fff;
  font-family: "Noto Serif SC", serif;
  padding: 40px 16px;
}

.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(rgba(20,20,20,0.75), rgba(20,20,20,0.95)),
    url("../img/baiyeBG.jpg") center / cover no-repeat;
}


.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}


/* ======================
   标题 （剑卒过河）
====================== */

h1 {
  margin-bottom: 18px;
  letter-spacing: 3px;
  font-size: clamp(60px, 12vw, 105px);
  font-weight: 600;
  color: #ffd700;
  text-shadow: 0 0 12px rgba(255, 180, 0, 0.4);
}

h2 {
  margin-bottom: 7px;
  letter-spacing: 2px;
  font-size: clamp(30px, 12vw, 45px);
  font-weight: 250;
  color: #ffd700;
  text-shadow: 0 0 12px rgba(255, 180, 0, 0.4);
}

/* ======================
   花名册
====================== */

.member-title {
  margin-bottom: clamp(15px, 12vw, 35px);
  font-size: clamp(35px, 12vw, 80px);
  color: #ffcc66;
  letter-spacing: 1px;
}

/* ======================
   玩家卡片
====================== */

.member-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(110px, 3fr));
  justify-content: center;   /* 整个 grid 居中 */
}

.member-card {
  width: 70%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, #1c1c1c, #141414);
  border-radius: 16px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: 0.25s ease;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 200, 100, 0.08);
}

.member-card:hover {
  transform: translateY(-20px);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.8),
    0 0 12px rgba(255, 180, 0, 0.2);
}

.member-card.me {
  border: 2px solid #ffd700;
  box-shadow:
    0 0 16px rgba(255, 215, 0, 0.6);
}

.name {
  font-size: clamp(20px, 2.5vw, 30px);
  margin-top: 4px;
  color: #f1d6a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 添加卡片 */
.add-card {
  width: 70%;
  aspect-ratio: 4 / 5;
  font-size: clamp(50px, 12vw, 75px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 2px dashed rgba(255,200,100,0.4);
  background: rgba(255,200,100,0.05);
  cursor: pointer;
}

.add-card:hover {
  background: rgba(255,200,100,0.15);
}

/* ======================
   头像
====================== */
.avatar {
  width: 80%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保持比例，不拉伸 */
  transition: 0.3s ease;
}

.id {
  font-size: clamp(17px, 2vw, 35px);
  color: #ffd700;
  margin-top: clamp(5px, 12vw, 10px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nickname {
  font-size: clamp(15px, 2vw, 30px);
  color: #f1d6a8;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.role {
  font-size: clamp(10px, 1.8vw, 25px);
  color: #ffcc66;
  text-align: center;
  margin-top: 2px;
}

.member-card:hover .avatar img {
  transform: scale(1.1);
}

/* ======================
   按钮
====================== */

.actions {
  margin-top: clamp(25px, 12vw, 55px);
}
.actions button {
  padding: clamp(15px, 12vw, 35px);
  width: 100%;
  border-radius: clamp(15px, 12vw, 35px);
  border: none;
  cursor: pointer;
  font-weight: bold;
  font-size: clamp(15px, 12vw, 35px);
  color: #1a1a1a;
  background: linear-gradient(135deg, #ffd700, #ff9900);
  transition: 0.25s ease;
  box-shadow: 0 4px 14px rgba(255, 170, 0, 0.4);
}

.actions button:hover {
  transform: translateY(-10px);
  box-shadow: 0 6px 18px rgba(255, 170, 0, 0.7);
}

/* ======================
   弹层
====================== */

.register-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}



.register-box {
  width: clamp(340px, 90%, 680px);
  max-width: clamp(340px, 12vw, 680px);
  background: linear-gradient(145deg, #1c1c1c, #141414);
  border-radius: 18px;
  padding: 24px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.8),
    0 0 20px rgba(255,180,0,0.15);
}

.register-box h2 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #ffd700;
}

.register-box input {
  width: 92%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
  outline: none;
}

.register-box input:focus {
  box-shadow: 0 0 8px rgba(255, 180, 0, 0.5);
}

.register-box button {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.register-box button:first-of-type {
  background: linear-gradient(135deg, #ffd700, #ff9900);
  color: #1a1a1a;
}

.register-box .secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

#msg {
  font-size: 13px;
  margin-top: 8px;
  color: #ff8888;
}

.ink-line {
  width: clamp(150px, 80%, 350px);
  height: 3px;
  margin: 20px auto;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    rgba(255,215,0,0) 0%,
    rgba(255,215,0,0.8) 50%,
    rgba(255,215,0,0) 100%
  );
}

.member-card.me {
  border: 2px solid #8b1e1e;
  position: relative;
}

.member-card.me::after {
  content: "己";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 12px;
  color: #8b1e1e;
  border: 1px solid #8b1e1e;
  padding: 2px 4px;
  border-radius: 2px;
}

.register-box input {
  background: #f8f5ef;
  border: 1px solid #ccc;
  color: #222;
}

.footer-mark {
  margin-top: 40px;
  font-size: clamp(25px, 80%, 60px);
  color: #777;
  letter-spacing: 3px;
}

/* ======================
   留言板
====================== */
.comment-section {
  width: 100%;
  max-width: 800px;
  margin: 40px auto 0;
  padding: 20px;
  background: linear-gradient(145deg, #1b1b1b, #101010);
  border-radius: 20px;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.7),
    inset 0 0 12px rgba(255, 200, 0, 0.05);
  display: flex;
  flex-direction: column;
}


.comment-section h2 {
  font-size: clamp(20px, 90%, 50px);
  color: #ffd700;
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.8);
}

.comment-input-wrapper {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.comment-input-wrapper input {
  min-width: 0;
  flex: 1;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  outline: none;
  background: rgba(20, 20, 20, 0.8);
  color: #fff;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.2) inset;
  transition: all 0.3s ease;
  font-size: 18px;

}

.comment-input-wrapper input:focus {
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5) inset;
}

.comment-input-wrapper button {
  flex-shrink: 0;  /* 不被压缩 */
  padding: 14px 20px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-weight: bold;
  color: #1a1a1a;
  background: linear-gradient(135deg, #ffd700, #ff9900);
  box-shadow: 0 4px 12px rgba(255, 180, 0, 0.5);
  transition: all 0.3s ease;
}

.comment-input-wrapper button:hover {
  transform: translateY(clamp(-2px, 90%, -5px));
  box-shadow: 0 6px 18px rgba(255, 180, 0, 0.7);
}

.comment-list {
  max-height: clamp(480px, 90%, 900px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 90%, 30px);
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #ffd700 transparent;
}

.comment-list::-webkit-scrollbar {
  width: clamp(8px, 90%, 18px);
}

.comment-list::-webkit-scrollbar-thumb {
  background: #ffd700;
  border-radius: 4px;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.5);
}

.comment-list::-webkit-scrollbar-track {
  background: transparent;
}

.comment-card {
  display: flex;
  align-items: flex-start;
  gap: clamp(14px, 90%, 30px);
  padding: 12px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1f1f1f, #141414);
  border-left: 4px solid #ffd700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6), inset 0 0 8px rgba(255, 215, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.comment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6), inset 0 0 12px rgba(255,215,0,0.2);
}

.comment-card .avatar {
  width: clamp(44px, 90%, 90px);
  height: clamp(44px, 90%, 90px);
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 44px;
  background: #111;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5), 0 0 4px rgba(255,215,0,0.2) inset;
}

.comment-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.comment-card:hover .avatar img {
  transform: scale(1.1);
}

.comment-card .comment-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.comment-card .nickname {
  font-weight: bold;
  font-size: clamp(15px, 90%, 35px);
  margin-bottom: 2px;
  color: #ffd700;
  text-shadow: 0 0 4px rgba(255,215,0,0.5);
}

.comment-card .content {
  font-size:clamp(14px, 90%, 30px);
  color: #fff;
  line-height: 1.5;
  word-break: break-word;
}

.comment-card .time {
  font-size: clamp(10px, 90%, 25px);
  color: #aaa;
  margin-top: 4px;
  align-self: flex-end;
  font-style: italic;
}

.nickname-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nickname-row .role {
  font-size: clamp(12px, 90%, 30px);
  color: #ffcc66;
  white-space: nowrap;
}




/* ======================
   留言板整体放大 50% (仅 PC)
====================== */
@media (min-width: 1200px) {
  .member-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  .member-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  .member-card {
    width: 90%;
  }
  .container {
    max-width: 1200px;
  }
  .comment-section {
    padding: 30px;           /* 扩大内边距 */
  }
  .comment-input-wrapper input,
  .comment-input-wrapper button {
    padding: 20px;          /* 输入框和按钮放大 */
  }
  .comment-card {
    padding: 18px 24px;      /* 卡片内容放大 */
    gap: 20px;
  }
  .comment-card .nickname,
  .comment-card .content {
    font-size: 1.2em;
  }
}


@media (max-width: 768px) {
  .member-grid {
    gap: 5px;
  }
  .comment-section {
    padding: 10px;
  }
  .comment-input-wrapper input,
  .comment-input-wrapper button {
    padding: 12px;
  }
  .comment-card {
    padding: 14px 18px;
    gap: 12px;
  }
  .comment-card .nickname,
  .comment-card .content {
    font-size: 1.2em;
  }
}

@media (max-width: 480px) {

  .comment-card .nickname {
    font-size: 14px;
  }

  .comment-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .comment-card .content {
    font-size: 14px;
  }

  .comment-card .time {
    font-size: 11px;
  }

  .nickname-row .role {
    font-size: 11px;
  }

}

