:root {
  --bg: #f5f5f2;
  --accent-soft: #d8e0db;
  --accent-line: rgba(44, 51, 46, 0.08);
  --text-prime: #2c332e;
  --text-mute: #8b9a93;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text-prime);
  font-family: "LXGW WenKai Screen", serif;
  line-height: 2;
  overflow-x: hidden;
  background-image: radial-gradient(var(--accent-line) 1px, transparent 0);
  background-size: 30px 30px;
}

/* ---------------- 背景柔光交互 ---------------- */
.ambient-cursor {
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(216, 224, 219, 0.4) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 15vh 40px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1.5s var(--ease-out);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- 头部 ---------------- */
header {
  margin-bottom: 15vh;
}

.brand-meta {
  font-size: 0.75rem;
  color: var(--text-mute);
  letter-spacing: 0.4em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-meta::after {
  content: "";
  height: 1px;
  width: 30px;
  background: var(--text-mute);
  opacity: 0.3;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.5em;
}

/* ---------------- 图片容器 (取景框) ---------------- */
.viewfinder {
  position: relative;
  margin: 100px 0;
  padding: 12px;
  border: 1px solid var(--accent-line);
  transition: all 0.8s var(--ease-out);
}

.viewfinder:hover {
  border-color: var(--text-mute);
  transform: scale(1.01);
}

.image-slot {
  width: 100%;
  height: 400px;
  background: #ecedeb;
  overflow: hidden;
  position: relative;
}

.image-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--accent-soft);
  transition: transform 1.2s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-inner::after {
  /* content: "IMAGE_HOLDER / 预留光影"; */
  color: var(--text-mute);
  font-size: 0.7rem;
  letter-spacing: 3px;
  opacity: 0.6;
}

/* 针对二维码容器的特殊处理 */
.qrcode-box {
  max-width: 240px;
  margin: 0 auto 100px;
  background: #fff; /* 给二维码一个干净的白色基底 */
  padding: 15px;
  border: 1px solid var(--accent-line);
}

.qrcode-box .image-slot {
  height: 210px; /* 保持正方形感 */
  background: #fff;
}

/* 覆盖全局样式，确保二维码不被裁剪 */
#img3 {
  background-size: contain !important; /* 关键：确保二维码完整可见 */
  background-repeat: no-repeat;
  filter: contrast(1.05); /* 稍微增加对比度提高识别率 */
}

/* 二维码下方的文字描述 */
.qr-meta {
  margin-top: 15px;
  font-size: 0.65rem;
  color: var(--text-mute);
  display: flex;
  justify-content: space-between;
  letter-spacing: 1px;
}

/* ---------------- 文字区块 ---------------- */
.essay-text {
  max-width: 520px;
  margin: 80px 0;
}

.essay-text p {
  margin-bottom: 2rem;
  font-size: 1.05rem;
  color: var(--text-prime);
}

.essay-text .dim {
  color: var(--text-mute);
  font-size: 0.95rem;
}

/* ---------------- 底部开发状态与版权 ---------------- */
.footer-terminal {
  margin-top: 15vh;
  padding-top: 60px;
  border-top: 1px solid var(--accent-line);
}

/* 开发状态指示 */
.dev-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--text-mute);
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid var(--text-mute);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.status-text {
  font-size: 0.8rem;
  color: var(--text-mute);
  letter-spacing: 0.2em;
}

/* 版权区域 */
.copyright-area {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--text-mute);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.copyright-area .line {
  line-height: 1.8;
}

.stamp {
  font-family: serif;
  font-style: italic;
  opacity: 0.4;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .container {
    padding: 10vh 25px;
  }

  .image-slot {
    height: 280px;
  }

  .copyright-area {
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
  }
}

/* --- ：图片预览模态框样式 --- */
/* 图片容器添加鼠标提示，表明可点击 */
.image-slot {
  cursor: zoom-in; /* 鼠标移上去显示放大镜 */
}

/* 2. 模态框整体容器 */
.image-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999; /* 确保在最上层 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none; /* 隐藏时不阻挡鼠标事件 */
  transition: opacity 0.6s var(--ease-out);
}

/* 激活状态 */
.image-preview-modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* 3. 半透明遮罩背景 */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 51, 46, 0.85); /* 使用主题深色，带透明度 */
  backdrop-filter: blur(5px); /* 毛玻璃效果，增加质感 */
}

/* 4. 图片内容容器 */
.modal-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.95);
  transition: transform 0.6s var(--ease-out);
}

.image-preview-modal.active .modal-content {
  transform: scale(1);
}

#previewImage {
  max-width: 100%;
  max-height: 85vh; /* 留出一点边距 */
  object-fit: contain;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* 5. 关闭按钮 */
.modal-close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.modal-close-btn:hover {
  opacity: 1;
}

/* 针对移动端的微调 */
@media (max-width: 768px) {
  .modal-close-btn {
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
  }
  #previewImage {
    max-height: 80vh;
  }
}
