/* --- 全局重置 --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

:root {
  color-scheme: dark;
  /* 核心强调色 */
  --accent: #b48cff;
  --accent-soft: rgba(180, 140, 255, 0.15);
  
  /* 颜色定义 */
  --bg-page: #000000;
  --bg-card-face: #161618;
  
  --text-main: #f5f5f5;
  --text-soft: #a0a0a0;
  --glass: blur(20px) saturate(180%);
}

body {
  min-height: 100vh;
  font-family: "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- 动态背景 --- */
.background {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-page);
}

.background::after {
  content: none;
}

/* --- 布局容器 --- */
.page {
  position: relative;
  min-height: 100vh;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
}

/* --- 顶部导航 --- */
.top-bar {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(22, 22, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: var(--glass);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: slideDown 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s infinite;
}

.page-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.page-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.page-subtitle {
  font-size: 10px;
  color: var(--text-soft);
  text-transform: uppercase;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--text-soft);
}

.time-display {
  font-variant-numeric: tabular-nums;
  font-family: monospace;
  letter-spacing: -0.5px;
}

/* --- 内容区域 --- */
.content {
  width: 100%;
  max-width: 1000px;
  margin: 40px auto 0;
  flex: 1;
}

/* --- 头像区域 --- */
.avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  animation: fadeIn 1s ease-out;
}

.avatar-circle {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: var(--bg-card-face);
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.avatar-circle::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, var(--accent), transparent 30%);
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #222;
  background: #222;
  position: relative;
  z-index: 2;
}

.avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.avatar-circle:hover .avatar-inner img {
  transform: scale(1.1);
}

.avatar-info {
  text-align: center;
}

.avatar-name {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #b48cff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.avatar-tags {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.avatar-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- 卡片网格 --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  border-radius: 20px;
  padding: 1.5px;
  background: transparent;
  overflow: hidden;
  animation: slideUp 0.6s ease-out backwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 60deg,
    var(--accent) 100deg,
    #ffffff 130deg,
    var(--accent) 160deg,
    transparent 200deg
  );
  animation: rotateBorder 5s linear infinite;
  z-index: -2;
}

.card::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  background: var(--bg-card-face);
  border-radius: 19px;
  z-index: -1;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(180, 140, 255, 0.1);
}

.card:hover::before {
  animation-duration: 2.5s;
}

.card-content-wrapper {
  position: relative;
  height: 100%;
  padding: 24px;
  z-index: 1;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}

.card:nth-child(2) {
  animation-delay: 0.2s;
}

.card:nth-child(3) {
  animation-delay: 0.3s;
}

.card:nth-child(4) {
  animation-delay: 0.4s;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.card-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.card-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
}

.card-body p + p {
  margin-top: 10px;
}

/* --- 技能条 --- */
.skill-item {
  margin-bottom: 12px;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.skill-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #9cd7ff);
  border-radius: 10px;
  width: var(--percent);
  box-shadow: 0 0 10px var(--accent-soft);
}

/* --- 社交链接 --- */
.social-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}

.social-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(180, 140, 255, 0.2);
  color: #fff;
}

.social-btn:active {
  transform: scale(0.98);
}

.social-btn i {
  font-size: 16px;
  color: var(--accent);
}

/* --- 底部版权 --- */
.footer-credit {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  animation: fadeIn 1s ease-out 0.8s backwards;
}

.credit-capsule {
  padding: 8px 24px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.3s;
}

.credit-capsule:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-soft);
}

.credit-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* --- 自定义模态框 (Popup) 样式 --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  position: relative;
  width: 90%;
  max-width: 320px;
  background: #1a1a1c;
  border: 1px solid rgba(180, 140, 255, 0.2);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-icon-wrapper {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 15px var(--accent-soft);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 20px;
}

.modal-data-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
  font-family: monospace;
  font-size: 16px;
  color: var(--accent);
  user-select: all;
  cursor: text;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
  border: none;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-copy {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.btn-copy:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px var(--accent-soft);
}

/* Toast 提示 */
.toast {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #4ade80;
  color: #000;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

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

/* --- 动画帧 --- */
@keyframes rotateBorder {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* --- 响应式 --- */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .page {
    padding: 15px 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .top-right {
    display: none;
  }

  .avatar-circle {
    width: 100px;
    height: 100px;
  }
}

