/* 共享样式 —— 完全模仿人设一览页 */

/* ===== 导航栏 ===== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 8px rgba(26, 26, 46, 0.04);
}

/* 为固定导航栏留出顶部空间 */
body {
  padding-top: 64px;
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-black);
  cursor: pointer;
  flex: 0 0 auto;
  margin-right: auto;
}

.site-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.site-logo-text {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 3px;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-links .nav-link {
  display: block;
  padding: 5px 9px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.84rem;
  color: var(--ink-deep);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
  color: var(--cinnabar);
}

#auth-root {
  flex: 0 0 auto;
  margin-left: 12px !important;
}

/* ===== 页脚 ===== */
.site-footer {
  padding: 48px 24px 32px;
  text-align: center;
  background: var(--ink-black);
}

.site-footer .footer-seal {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  opacity: 0.9;
}

.site-footer h3 {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.25rem;
  color: var(--paper-warm);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.site-footer p {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 0.05em;
}

/* 手机端顶部导航提示条 */
.mobile-nav-hint {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 49;
    padding: 6px 16px;
    background: transparent;
    text-shadow: 0 1px 2px rgba(250, 247, 242, 0.8);
    font-family: "Noto Serif SC", serif;
    font-size: 0.75rem;
    color: var(--ink-mid);
    letter-spacing: 0.03em;
  }
}

/* ===== 占位页面提示 ===== */
.placeholder-page {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.placeholder-page h2 {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 2.5rem;
  color: var(--ink-deep);
  margin-bottom: 16px;
}

.placeholder-page p {
  font-size: 1.1rem;
  color: var(--ink-mid);
  max-width: 500px;
  line-height: 2;
}

.placeholder-seal {
  width: 120px;
  height: 120px;
  margin-top: 32px;
  opacity: 0.3;
}

/* ===== 个人积分页面 ===== */
.personal-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.personal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-bottom: 32px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.8rem;
  color: var(--ink-mid);
  font-weight: 500;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.filter-chip input {
  display: none;
}

.filter-chip span {
  display: block;
  padding: 4px 12px;
  font-size: 0.8rem;
  color: var(--ink-deep);
  background: var(--paper-warm);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  transition: all 0.2s ease;
}

.filter-chip input:checked + span {
  background: #c23a30;
  color: #fff;
  border-color: #c23a30;
  font-weight: 600;
}

.filter-search {
  padding: 8px 14px;
  font-size: 0.9rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-black);
  outline: none;
  width: 100%;
  max-width: 280px;
}

.filter-search:focus {
  border-color: var(--cinnabar);
}

.personal-table-wrap {
  overflow-x: auto;
}

.personal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.9rem;
}

.personal-table thead th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--ink-deep);
  background: rgba(194,58,48,0.06);
  border-bottom: 2px solid rgba(194,58,48,0.15);
  white-space: nowrap;
}

.personal-table tbody tr {
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.2s ease;
}

.personal-table tbody tr:hover {
  background: rgba(194,58,48,0.03);
}

.personal-table tbody td {
  padding: 14px 16px;
  color: var(--ink-deep);
  vertical-align: middle;
}

.personal-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-mid);
  font-size: 1rem;
}

.kingdom-tag {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  border-radius: 12px;
  white-space: nowrap;
}

.score-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0 3px;
}

.score-btn.add {
  background: #2d6a4f15;
  color: #2d6a4f;
}

.score-btn.add:hover {
  background: #2d6a4f;
  color: #fff;
}

.score-btn.sub {
  background: #c23a3015;
  color: #c23a30;
}

.score-btn.sub:hover {
  background: #c23a30;
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(26,26,46,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: #faf7f2;
  border-radius: 10px;
  padding: 28px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: zoomIn 0.25s ease;
}

.modal-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: "Noto Sans SC", sans-serif;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.modal-btn:hover {
  opacity: 0.85;
}

.modal-btn.cancel {
  background: rgba(0,0,0,0.06);
  color: var(--ink-deep);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* 右下角悬浮导航按钮持续呼吸动画 */
@keyframes float-nav-pulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 58, 48, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(194, 58, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(194, 58, 48, 0); }
}

.float-nav-pulse {
  animation: float-nav-pulse 1.8s ease-in-out infinite;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .personal-filters {
    flex-direction: column;
    gap: 16px;
  }
  .personal-table thead th,
  .personal-table tbody td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }
}

/* ===== 右上角登录头像下拉 ===== */
#auth-root {
  position: relative;
}

.auth-avatar-wrap {
  position: relative;
}

.auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--cinnabar);
  color: #fff;
  font-family: Ma Shan Zheng, cursive;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(194, 58, 48, 0.3);
  transition: transform 0.2s ease;
}

.auth-avatar:hover {
  transform: scale(1.05);
}

.auth-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.12);
  z-index: 150;
  overflow: hidden;
}

.auth-dropdown-info {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  background: var(--paper);
}

.auth-dropdown-name {
  font-family: Noto Serif SC, serif;
  font-size: 0.95rem;
  color: var(--ink-deep);
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-dropdown-role {
  font-family: Noto Sans SC, sans-serif;
  font-size: 0.75rem;
  color: var(--cinnabar);
}

.auth-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: Noto Sans SC, sans-serif;
  font-size: 0.85rem;
  color: var(--ink-deep);
  text-decoration: none;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.auth-dropdown-item:first-of-type {
  border-top: none;
}

.auth-dropdown-item:hover {
  background: rgba(194, 58, 48, 0.06);
}

.auth-dropdown-logout {
  color: var(--cinnabar);
}

/* ===== 右上角登录头像下拉 ===== */
#auth-root {
  position: relative;
}

.auth-avatar-wrap {
  position: relative;
}

.auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--cinnabar);
  color: #fff;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(194, 58, 48, 0.3);
  transition: transform 0.2s ease;
}

.auth-avatar:hover {
  transform: scale(1.05);
}

.auth-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.12);
  z-index: 150;
  overflow: hidden;
}

.auth-dropdown-info {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  background: var(--paper);
}

.auth-dropdown-name {
  font-family: "Noto Serif SC", serif;
  font-size: 0.95rem;
  color: var(--ink-deep);
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-dropdown-role {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.75rem;
  color: var(--cinnabar);
}

.auth-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-deep);
  text-decoration: none;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.auth-dropdown-item:first-of-type {
  border-top: none;
}

.auth-dropdown-item:hover {
  background: rgba(194, 58, 48, 0.06);
}

.auth-dropdown-logout {
  color: var(--cinnabar);
}

/* ===== 右上角登录头像下拉 ===== */
#auth-root {
  position: relative;
}

.auth-avatar-wrap {
  position: relative;
}

.auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--cinnabar);
  color: #fff;
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(194, 58, 48, 0.3);
  transition: transform 0.2s ease;
}

.auth-avatar:hover {
  transform: scale(1.05);
}

.auth-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 150px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.12);
  z-index: 150;
  overflow: hidden;
}

.auth-dropdown-info {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
  background: var(--paper);
}

.auth-dropdown-name {
  font-family: "Noto Serif SC", serif;
  font-size: 0.95rem;
  color: var(--ink-deep);
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-dropdown-role {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.75rem;
  color: var(--cinnabar);
}

.auth-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-deep);
  text-decoration: none;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.auth-dropdown-item:first-of-type {
  border-top: none;
}

.auth-dropdown-item:hover {
  background: rgba(194, 58, 48, 0.06);
}

.auth-dropdown-logout {
  color: var(--cinnabar);
}

/* 头像下拉改为横向并列 */
.auth-dropdown {
  flex-direction: row;
  align-items: center;
  min-width: auto;
}

.auth-dropdown-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border-bottom: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 14px;
}

.auth-dropdown-name {
  margin-bottom: 0;
}

.auth-dropdown-role {
  color: var(--ink-light);
}

.auth-dropdown-item {
  border-top: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 14px;
  white-space: nowrap;
}

.auth-dropdown-item:last-of-type {
  border-right: none;
}

/* 头像下拉改为横向并列 */
.auth-dropdown {
  flex-direction: row;
  align-items: center;
  min-width: auto;
}

.auth-dropdown-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  border-bottom: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 14px;
}

.auth-dropdown-name {
  margin-bottom: 0;
}

.auth-dropdown-role {
  color: var(--ink-light);
}

.auth-dropdown-item {
  border-top: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 14px;
  white-space: nowrap;
}

.auth-dropdown-item:last-of-type {
  border-right: none;
}

/* 头像下拉改为：第一行名字+权限，第二行个人中心+退出 */
.auth-dropdown {
  flex-direction: column;
  align-items: stretch;
  min-width: 150px;
}

.auth-dropdown-info {
  justify-content: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-right: none;
}

.auth-dropdown-actions {
  display: flex;
  flex-direction: row;
}

.auth-dropdown-actions .auth-dropdown-item {
  flex: 1;
}

/* 头像下拉框美化 */
.auth-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 190px;
  background: #fffef9;
  border: 1px solid rgba(194, 58, 48, 0.15);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(26, 26, 46, 0.14);
  z-index: 150;
  overflow: hidden;
  flex-direction: column;
  align-items: stretch;
}

/* 顶部指向头像的小三角 */
.auth-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: #fffef9;
  border-left: 1px solid rgba(194, 58, 48, 0.15);
  border-top: 1px solid rgba(194, 58, 48, 0.15);
  transform: rotate(45deg);
}

.auth-dropdown-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(194, 58, 48, 0.04) 0%, transparent 100%);
}

.auth-dropdown-name {
  font-family: "Ma Shan Zheng", cursive;
  font-size: 1.05rem;
  color: var(--ink-deep);
  font-weight: normal;
  margin-bottom: 0;
}

.auth-dropdown-sep {
  color: rgba(194, 58, 48, 0.35);
  font-size: 0.8rem;
}

.auth-dropdown-role {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.75rem;
  color: var(--ink-light);
}

.auth-dropdown-actions {
  display: flex;
  flex-direction: row;
}

.auth-dropdown-actions .auth-dropdown-item {
  flex: 1;
  padding: 12px 10px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 0.85rem;
  color: var(--ink-deep);
  text-decoration: none;
  background: transparent;
  border: none;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.auth-dropdown-actions .auth-dropdown-item:last-child {
  border-right: none;
}

.auth-dropdown-actions .auth-dropdown-item:hover {
  background: rgba(194, 58, 48, 0.07);
  color: var(--cinnabar);
}

.auth-dropdown-actions .auth-dropdown-item.auth-dropdown-logout {
  color: var(--cinnabar);
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
  word-wrap: break-word;
}
