@charset "UTF-8";
/* ===========================
   Layer 3: Friends 友链页面专用样式
   Hero / 友链卡片网格 / 分页 / 名片区 / 申请表单
   仅在 friends.html 中引入
   =========================== */


/* ========== Hero Section ========== */
.friends-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;
}

.friends-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;
}

.friends-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);
}

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

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

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

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


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


/* ========== 区域标题 (通用) ========== */
.friends-section-title {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 15px;
  color: #2a1a2e;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}


/* ========== 友链卡片网格 ========== */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}


/* ========== 单张友链卡片 ========== */
.friend-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #000;
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  cursor: url(../assets/items/select.png), pointer;

  /* 入场动画 */
  animation: friendCardIn 0.4s ease both;
}

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

.friend-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 240, 245, 0.8);
  box-shadow:
    0 6px 20px rgba(196, 69, 105, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.05);
}

/* ---- 头像 ---- */
.friend-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #f9bddd;
  object-fit: cover;
  flex-shrink: 0;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.friend-card:hover .friend-avatar {
  transform: scale(1.08);
  border-color: #c44569;
}

/* ---- 文字信息 ---- */
.friend-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.friend-name {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #2a1a2e;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.friend-card:hover .friend-name {
  color: #c44569;
}

.friend-desc {
  font-size: 12px;
  color: #7a6470;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ========== 分页 ========== */
.friends-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 20px;
}

.friends-page-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  padding: 5px 12px;
  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.1);
}

.friends-page-btn:hover:not(:disabled):not(.active) {
  background: #fff0f5;
  transform: translateY(-1px);
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.12);
}

.friends-page-btn.active {
  background: #f9bddd;
  color: #fff;
  border-color: #c44569;
}

.friends-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}


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

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

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

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


/* ========== 分隔线 ========== */
.friends-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
}

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


/* ========== "交换名片" 区 ========== */
.mycard-section {
  margin-bottom: 24px;
}

.mycard-box {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #000;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.mycard-details {
  flex: 1;
  min-width: 0;
}

.mycard-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.mycard-label {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 10px;
  color: #999;
  width: 32px;
  flex-shrink: 0;
}

.mycard-value {
  font-family: "MS PGothic", "Unifont", sans-serif;
  font-size: 13px;
  color: #2a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 复制按钮 */
.mycard-copy-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 10px;
  padding: 2px 10px;
  border: 1px solid #e0cfd6;
  border-radius: 6px;
  background: #fff;
  color: #5a3e4b;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  position: relative;
  flex-shrink: 0;
}

.mycard-copy-btn:hover {
  background: #f9bddd;
  color: #fff;
  border-color: #c44569;
}

.copy-tip {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-size: 10px;
  color: #fff;
  background: #c44569;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.copy-tip.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 下载头像按钮 */
.mycard-actions {
  margin-top: 8px;
}

.mycard-dl-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  padding: 5px 14px;
  border: 1.5px solid #e0cfd6;
  border-radius: 8px;
  background: #fff;
  color: #5a3e4b;
  cursor: url(../assets/items/select.png), pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  display: inline-block;
}

.mycard-dl-btn:hover {
  background: #f9bddd;
  color: #fff;
  border-color: #c44569;
}


/* ========== 友链申请表单 ========== */
.apply-section {
  margin-bottom: 8px;
}

.apply-form {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #000;
  border-radius: 12px;
  padding: 18px 20px;
}

.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 11px;
  color: #5a3e4b;
  margin-bottom: 4px;
}

.form-label .required {
  color: #c44569;
  margin-left: 2px;
}

.form-input {
  width: 100%;
  border: 1.5px solid #d3a6b4;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-family: "MS PGothic", "Unifont", sans-serif;
  outline: none;
  background: #fffbfd;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

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

.form-input::placeholder {
  color: #cba8b5;
}

.form-hint {
  font-size: 10px;
  color: #bba3ad;
  margin-top: 2px;
}

/* 提交按钮 */
.form-submit-btn {
  font-family: "PC98", "MS PGothic", "Unifont", monospace;
  font-size: 12px;
  padding: 8px 28px;
  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);
  margin-top: 4px;
}

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

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

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

/* 提示弹窗 */
.form-alert {
  margin-top: 12px;
  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;
}

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

.form-alert.success {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #2f855a;
}

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


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

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

.friends-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 */
  .friends-hero {
    padding: 24px 16px 20px;
  }

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

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

  /* 卡片网格: 手机 1-2 列 */
  .friends-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

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

  .friend-avatar {
    width: 48px;
    height: 48px;
  }

  .friend-name {
    font-size: 13px;
  }

  .friend-desc {
    font-size: 11px;
  }

  /* 名片区 */
  .mycard-box {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .mycard-row {
    justify-content: center;
  }

  /* 表单 */
  .apply-form {
    padding: 16px 14px;
  }
}

@media (max-width: 420px) {
  /* 超小屏: 单列 */
  .friends-grid {
    grid-template-columns: 1fr;
  }
}
