@charset "UTF-8";
/* ===========================
   Layer 3: Guestbook 留言板专用样式
   Hero / 登录态 / 留言流 / 回复区 / 提示 / 底部
   仅在 guestbook.html 中引入
   =========================== */


/* ========== Hero Section ========== */
.gb-hero {
  background:
    linear-gradient(135deg, rgba(249, 189, 221, 0.25) 0%, rgba(180, 223, 251, 0.2) 50%, rgba(249, 189, 221, 0.15) 100%),
    url(../assets/backgrounds/checker.gif);
  background-size: auto, 200px;
  border-bottom: 2px solid #000;
  padding: 32px 24px 24px;
  position: relative;
  overflow: hidden;
}

.gb-hero::before {
  content: "";
  position: absolute;
  top: -25px;
  right: -25px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(249, 189, 221, 0.45) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.gb-hero-title {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 30px;
  font-weight: bold;
  color: #000;
  margin: 0 0 6px;
  text-shadow: 2px 2px 0 rgba(249, 189, 221, 0.5);
}

.gb-hero-sub {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 13px;
  color: #5a3e4b;
  margin: 0 0 14px;
  line-height: 1.6;
}

.gb-hero-deco {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 140px;
}

.gb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c44569;
  flex-shrink: 0;
}

.gb-line {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, #c44569, #f9bddd, #b4dffb);
}


/* ========== 留言主体区 (带背景) ========== */
.gb-body {
  padding: 20px 24px;
  background-image: url(../assets/images/bg-pattern.png);
  background-size: 180px 300px;
  background-repeat: repeat;
  background-position: top left;
}


/* ========== 登录/发言区 ========== */

/* ---- 未登录 ---- */
.gb-login-prompt {
  text-align: center;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #000;
  border-radius: 12px;
  margin-bottom: 20px;
}

.gb-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 14px;
  padding: 10px 24px;
  border: 2px solid #000;
  border-radius: 10px;
  background: #24292e;
  color: #fff;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.gb-github-btn:hover {
  background: #444d56;
  transform: translateY(-2px);
  box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.2);
}

.gb-gh-icon {
  flex-shrink: 0;
}

.gb-login-hint {
  font-size: 11px;
  color: #bba3ad;
  margin: 10px 0 0;
}

/* ---- 已登录: 发言框 ---- */
.gb-compose {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #000;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.gb-compose-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.gb-compose-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #f9bddd;
  object-fit: cover;
  flex-shrink: 0;
}

.gb-compose-name {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #2a1a2e;
}

.gb-logout-btn {
  margin-left: auto;
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 10px;
  padding: 3px 10px;
  border: 1px solid #e0cfd6;
  border-radius: 6px;
  background: #fff;
  color: #999;
  cursor: url(../assets/items/select.png), pointer;
  transition: color 0.2s, border-color 0.2s;
}

.gb-logout-btn:hover {
  color: #c44569;
  border-color: #c44569;
}

.gb-textarea {
  width: 100%;
  min-height: 80px;
  border: 1.5px solid #d3a6b4;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: "MS PGothic", "Unifont", sans-serif;
  line-height: 1.6;
  outline: none;
  background: #fffbfd;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.gb-textarea:focus {
  border-color: #c44569;
  box-shadow: 0 0 8px rgba(249, 189, 221, 0.4);
}

.gb-textarea::placeholder {
  color: #cba8b5;
}

.gb-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.gb-char-count {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  color: #bba3ad;
}

.gb-char-count span {
  color: #c44569;
}

.gb-submit-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 12px;
  padding: 7px 20px;
  border: 1.5px solid #000;
  border-radius: 8px;
  background: #fff;
  color: #2a1a2e;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s, color 0.2s;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.12);
}

.gb-submit-btn:hover:not(:disabled) {
  background: #f9bddd;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.15);
}

.gb-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gb-submit-btn.loading {
  background: #fef0f5;
  color: #bba3ad;
}


/* ========== 提示弹窗 ========== */
.gb-alert {
  margin-bottom: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s, transform 0.3s;
}

.gb-alert.show {
  opacity: 1;
  transform: translateY(0);
}

.gb-alert.success {
  background: #fff0f5;
  border: 1px solid #f9bddd;
  color: #c44569;
}

.gb-alert.error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
}


/* ========== 留言流 ========== */
.gb-stream {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* ========== 留言卡片 ========== */
.gb-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #000;
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: gbSlideIn 0.4s ease both;
}

@keyframes gbSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gb-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(196, 69, 105, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

/* 左侧装饰竖线 */
.gb-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  background: linear-gradient(180deg, #f9bddd, #b4dffb);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.25s;
}

.gb-card:hover::before {
  opacity: 1;
}


/* ---- 卡片头部 ---- */
.gb-card-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.gb-author {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.gb-author:hover {
  transform: scale(1.03);
}

.gb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #f9bddd;
  object-fit: cover;
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.gb-author:hover .gb-avatar {
  border-color: #c44569;
}

.gb-username {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #2a1a2e;
  transition: color 0.2s;
}

.gb-author:hover .gb-username {
  color: #c44569;
}

.gb-date {
  margin-left: auto;
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 10.5px;
  color: rgba(0, 0, 0, 0.35);
  letter-spacing: 0.3px;
}


/* ---- 卡片正文 ---- */
.gb-content {
  font-family: "MS PGothic", "Unifont", "Hiragino Kaku Gothic Pro", sans-serif;
  font-size: 13.5px;
  line-height: 1.75;
  color: #2a1a2e;
  word-wrap: break-word;
}


/* ========== 回复区 ========== */
.gb-replies-wrap {
  margin-top: 12px;
}

.gb-replies-toggle {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  color: #d46493;
  background: none;
  border: none;
  padding: 4px 0;
  cursor: url(../assets/items/select.png), pointer;
  transition: color 0.2s;
}

.gb-replies-toggle:hover {
  color: #c44569;
  text-decoration: underline;
}

.gb-replies-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.gb-reply {
  margin-top: 10px;
  margin-left: 28px;
  padding: 12px 14px;
  background: rgba(249, 189, 221, 0.08);
  border: 1px solid #f0dce4;
  border-radius: 10px;
  position: relative;
}

/* 回复前的小连接线 */
.gb-reply::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 18px;
  width: 12px;
  height: 1px;
  background: #e0cfd6;
}

.gb-reply-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.gb-reply-author {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.gb-reply-author:hover {
  transform: scale(1.03);
}

.gb-reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.gb-reply-name {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #5a3e4b;
  transition: color 0.2s;
}

.gb-reply-author:hover .gb-reply-name {
  color: #c44569;
}

.gb-reply-date {
  margin-left: auto;
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 10px;
  color: rgba(0, 0, 0, 0.25);
}

.gb-reply-body {
  font-size: 12.5px;
  line-height: 1.7;
  color: #3b2b2b;
  word-wrap: break-word;
}


/* ========== 空状态 ========== */
.gb-empty {
  text-align: center;
  padding: 60px 20px;
}

.gb-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: #d3a6b4;
  animation: gbEmptyBob 3s ease-in-out infinite;
}

@keyframes gbEmptyBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.gb-empty p {
  font-size: 13px;
  color: #bba3ad;
  line-height: 1.6;
}


/* ========== 底部结尾 ========== */
.gb-end {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 12px;
}

.gb-end-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e0cfd6, transparent);
}

.gb-end-text {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 11px;
  color: #bba3ad;
  white-space: nowrap;
}


/* ========== 响应式 ========== */

@media (max-width: 768px) {
  .left-col {
    display: none;
  }

  .col.right {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border: none;
  }

  /* Hero */
  .gb-hero {
    padding: 24px 16px 20px;
  }

  .gb-hero-title {
    font-size: 24px;
  }

  /* 内容区 */
  .gb-body {
    padding: 16px 12px;
  }

  /* 卡片 */
  .gb-card {
    padding: 14px 14px;
  }

  .gb-card::before {
    display: none;
  }

  .gb-card:hover {
    transform: none;
    box-shadow: none;
  }

  .gb-avatar {
    width: 36px;
    height: 36px;
  }

  /* 回复区: 收窄缩进 */
  .gb-reply {
    margin-left: 14px;
    padding: 10px 12px;
  }

  .gb-reply::before {
    left: -10px;
    width: 8px;
  }

  .gb-reply-avatar {
    width: 24px;
    height: 24px;
  }

  /* 发言框 */
  .gb-compose {
    padding: 14px 14px;
  }

  .gb-github-btn {
    font-size: 12px;
    padding: 8px 18px;
  }
}
