/* ===== 全局重置 ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== 加载动画 ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 50%, #f5f8ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-bar-track {
  width: 200px;
  height: 4px;
  background: rgba(48, 128, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 20px;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: #3080FF;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.loading-text {
  font-size: 18px;
  font-weight: 600;
  color: #3080FF;
  letter-spacing: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

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

html {
  scroll-behavior: smooth;
  overflow: hidden;
  height: 100%;
}

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #fff;
  color: #1a1a2e;
  height: 100%;
  overflow: hidden;
}

/* ===== 屏幕容器 ===== */
.screens-wrapper {
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.screen {
  width: 100vw;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

/* ===== 右侧导航圆点 ===== */
.nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(48, 128, 255, 0.2);
  cursor: pointer;
  transition: all 0.35s ease;
  border: 2px solid transparent;
}

.dot:hover {
  background: rgba(48, 128, 255, 0.5);
  transform: scale(1.3);
}

.dot.active {
  background: #3080FF;
  border-color: rgba(48, 128, 255, 0.3);
  box-shadow: 0 0 12px rgba(48, 128, 255, 0.4);
  transform: scale(1.3);
}

/* ===== 滚动提示箭头 ===== */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
}

.arrow {
  display: block;
  font-size: 28px;
  color: rgba(48, 128, 255, 0.35);
  animation: bounce 2s ease-in-out infinite;
  transition: color 0.3s;
  user-select: none;
}

.arrow:hover {
  color: #3080FF;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* 第 4 屏不显示箭头 */
#screen4 .scroll-hint {
  display: none;
}

/* ===== 第 1 屏 — 明信片层 ===== */
#screen1 {
  background: linear-gradient(135deg, #f0f5ff 0%, #e8f0fe 30%, #f5f8ff 60%, #f0f5ff 100%);
}

.postcard-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* 明信片卡片 */
.postcard {
  position: absolute;
  width: 400px;
  height: 267px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform, left;
}

.postcard:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(48, 128, 255, 0.25);
  z-index: 100 !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.postcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 14px;
}

/* 贴纸装饰 */
.postcard-sticker {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 5;
  pointer-events: none;
}

.postcard-sticker.top-center {
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
}

/* 姓名介绍 */
.intro-text {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.intro-name {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  color: #1a1a2e;
  text-shadow: 0 2px 20px rgba(48, 128, 255, 0.15);
  margin-bottom: 12px;
}

.intro-name .highlight {
  background: linear-gradient(135deg, #3080FF, #60a0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-sub {
  font-size: clamp(14px, 2.5vw, 20px);
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 4px;
}

/* ===== 第 2 屏 — 关于我 ===== */
#screen2 {
  background: linear-gradient(135deg, #f8faff 0%, #eef3ff 50%, #f8faff 100%);
}

.section-title {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #3080FF;
  margin: 16px auto 0;
  border-radius: 2px;
}

.about-cards {
  display: flex;
  gap: 28px;
  justify-content: center;
  padding: 0 24px;
  z-index: 2;
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.about-card {
  background: #fff;
  border: 1px solid #e0e8f5;
  border-radius: 20px;
  padding: 36px 32px;
  text-align: left;
  box-shadow: 0 2px 12px rgba(48, 128, 255, 0.06);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.about-card:hover {
  transform: translateY(-8px);
  border-color: #3080FF;
  box-shadow: 0 12px 40px rgba(48, 128, 255, 0.15);
}

.about-card-left {
  flex: 1 1 55%;
  min-width: 0;
}

.about-card-right {
  flex: 0 0 240px;
}

.about-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 14px;
}

.about-card p {
  font-size: 15px;
  color: #666;
  line-height: 1.8;
}

/* ===== 第 3 屏 — 技能栈 ===== */
#screen3 {
  background: linear-gradient(135deg, #eef3ff 0%, #f0f5ff 50%, #eef3ff 100%);
}

.skills-container {
  width: 100%;
  max-width: 520px;
  padding: 0 24px;
  z-index: 2;
  position: relative;
}

.skill-item {
  margin-bottom: 22px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skill-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.skill-percent {
  font-size: 14px;
  font-weight: 600;
  color: #3080FF;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: #dce6f5;
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: #3080FF;
  border-radius: 4px;
  animation: fillBar 1.2s ease-out forwards;
  animation-play-state: paused;
}

.skill-fill.animate {
  animation-play-state: running;
}

@keyframes fillBar {
  from { width: 0; }
  to { width: var(--width); }
}

/* ===== 第 4 屏 — 联系我 ===== */
#screen4 {
  background: linear-gradient(135deg, #f8faff 0%, #eef3ff 40%, #f5f8ff 70%, #f8faff 100%);
}

.contact-sub {
  font-size: 16px;
  color: #888;
  margin-bottom: 40px;
  margin-top: -30px;
  z-index: 2;
  position: relative;
}

.social-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 2;
  position: relative;
}

.social-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e0e8f5;
  color: #555;
  text-decoration: none;
  transition: all 0.35s ease;
  min-width: 100px;
  box-shadow: 0 2px 8px rgba(48, 128, 255, 0.04);
}

.social-btn:hover {
  background: #3080FF;
  border-color: #3080FF;
  color: #fff;
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(48, 128, 255, 0.25);
}

.social-btn svg {
  transition: transform 0.3s ease;
}

.social-btn:hover svg {
  transform: scale(1.15);
}

.social-btn span {
  font-size: 13px;
  font-weight: 500;
}

.footer-text {
  position: absolute;
  bottom: 24px;
  font-size: 12px;
  color: #bbb;
  z-index: 2;
}

/* ===== 详情弹窗 ===== */
.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.detail-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.detail-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  will-change: backdrop-filter;
  transform: translateZ(0);
}

.detail-panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: detailIn 0.3s ease;
}

@keyframes detailIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 24px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s;
}

.detail-close:hover {
  background: rgba(0, 0, 0, 0.6);
}

.detail-img-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  line-height: 0;
}

.detail-img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  display: block;
}

/* 热区容器 — 覆盖在图片上方 */
.detail-hotspots {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 单个热区 */
.hotspot {
  position: absolute;
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
  border: none;
  border-radius: 4px;
  transition: background 0.2s;
  z-index: 5;
}

.hotspot:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 链接热区 */
.hotspot-link {
  cursor: alias;
}

/* 播放中状态 */
.hotspot.playing {
  background: rgba(255, 255, 255, 0.2);
}



.detail-info {
  padding: 24px 28px;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.detail-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
}

.detail-link {
  display: inline-block;
  padding: 8px 24px;
  background: #3080FF;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.detail-link:hover {
  background: #1a6ae0;
  transform: translateY(-1px);
}

.detail-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.detail-link2 {
  display: inline-block;
  padding: 8px 24px;
  background: #3080FF;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.detail-link2:hover {
  background: #1a6ae0;
  transform: translateY(-1px);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .nav-dots {
    right: 12px;
    gap: 12px;
  }

  .dot {
    width: 8px;
    height: 8px;
  }

  .about-cards {
    flex-direction: column;
    align-items: center;
  }

  .about-card-left,
  .about-card-right {
    flex: 1 1 auto;
    width: 100%;
    max-width: 480px;
  }

  .social-buttons {
    gap: 12px;
  }

  .social-btn {
    padding: 16px 18px;
    min-width: 80px;
  }

  .postcard {
    width: 280px;
    height: 187px;
  }

  .postcard-sticker {
    width: 22px;
    height: 22px;
  }

  .postcard-sticker.top-center {
    top: -11px;
  }
}

@media (max-width: 480px) {
  .social-buttons {
    gap: 8px;
  }

  .social-btn {
    padding: 14px 12px;
    min-width: 70px;
  }

  .postcard {
    width: 220px;
    height: 147px;
  }

  .postcard-sticker {
    width: 18px;
    height: 18px;
  }

  .postcard-sticker.top-center {
    top: -9px;
  }
}

/* ===== 播放胶囊 ===== */
.player-capsule {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 16px 10px 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(48, 128, 255, 0.12);
  border-radius: 28px;
  box-shadow:
    0 4px 24px rgba(48, 128, 255, 0.1),
    0 0 0 1px rgba(48, 128, 255, 0.04) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.4),
              visibility 0.35s,
              transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1.4);
  pointer-events: none;
}

.player-capsule.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* 波形可视化 */
.player-capsule-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  padding: 0 6px;
  margin-right: 4px;
}

.player-capsule-visualizer .bar {
  width: 3px;
  border-radius: 2px;
  background: #3080FF;
  animation: visualize 0.9s ease-in-out infinite;
}

.player-capsule-visualizer .bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.player-capsule-visualizer .bar:nth-child(2) { height: 16px; animation-delay: 0.15s; }
.player-capsule-visualizer .bar:nth-child(3) { height: 8px;  animation-delay: 0.3s; }
.player-capsule-visualizer .bar:nth-child(4) { height: 14px; animation-delay: 0.45s; }

@keyframes visualize {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}

.player-capsule-body {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.player-capsule-label {
  font-size: 13px;
  color: #1a1a2e;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.player-capsule-close {
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(48, 128, 255, 0.06);
  color: rgba(48, 128, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  flex-shrink: 0;
  margin-left: 8px;
}

.player-capsule-close:hover {
  background: rgba(48, 128, 255, 0.14);
  color: #3080FF;
  transform: rotate(90deg);
}