/* ============================================================
   字体自托管（由 Cloudflare 缓存加速，无需 Google Fonts）
   字体文件放在 /static/fonts/
   ============================================================ */

/* Noto Serif SC — 正文衬线字体（latin + 简体中文合并文件） */
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/noto-serif-sc-v35-chinese-simplified_latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/static/fonts/noto-serif-sc-v35-chinese-simplified_latin-700.woff2') format('woff2');
}

/* Ma Shan Zheng — 标题毛笔装饰字体（latin + 简体中文合并文件） */
@font-face {
  font-family: 'Ma Shan Zheng';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/ma-shan-zheng-v17-chinese-simplified_latin-regular.woff2') format('woff2');
}

/* ============================================================
   185 的网站 - 配色灵感来自她自己
   深棕虎斑 + 暖金棕 + 绿眼睛 + 奶白背景
   ============================================================ */
:root {
  --bg:          #f8f4ef;
  --bg-warm:     #f2ebe0;
  --bg-card:     #fffdf9;
  --tabby:       #4a3728;
  --tabby-mid:   #7a5c3e;
  --gold:        #c4935a;
  --gold-light:  #e8c99a;
  --eye-green:   #5b8c6e;
  --eye-light:   #d4ebe0;
  --text:        #2e2118;
  --muted:       #9a8070;
  --border:      #e0d5c8;
  --shadow:      rgba(74, 55, 40, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* 🐾 全局猫爪光标 */
body,
a,
button,
.photo-card,
.refresh-btn {
  cursor: url('/static/img/paw-cursor.svg') 10 4, pointer;
}
/* 文本输入保留正常光标 */
input, textarea, [contenteditable] {
  cursor: text;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Serif SC', serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* ── 导航 ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(248, 244, 239, 0.93);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 24px;
  color: var(--tabby);
  text-decoration: none;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 1px;
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--tabby);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #2e2118 0%,
    #4a3728 30%,
    #7a5c3e 60%,
    #c4935a 85%,
    #e8c99a 100%
  );
}
/* 毛发纹理感背景 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 3px,
      rgba(255,255,255,0.015) 3px,
      rgba(255,255,255,0.015) 6px
    );
  pointer-events: none;
}
/* 虎斑条纹装饰 */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    170deg,
    transparent 0px,
    transparent 28px,
    rgba(0,0,0,0.06) 28px,
    rgba(0,0,0,0.06) 32px
  );
  pointer-events: none;
}
.hero-small {
  min-height: 40vh;
  padding-top: 62px;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 80px 24px 100px;
}
.paw-icon {
  font-size: 52px;
  margin-bottom: 16px;
  display: block;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-10px) rotate(3deg); }
}
.hero h1 {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: clamp(72px, 12vw, 140px);
  color: #ffffff;
  letter-spacing: 12px;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.3),
    0 8px 32px rgba(0,0,0,0.4);
  margin-bottom: 16px;
  line-height: 1;
}
.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.hero-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 1px;
}

/* 金色标签装饰 */
.hero-badge {
  display: inline-block;
  margin-top: 28px;
  padding: 8px 24px;
  background: rgba(196, 147, 90, 0.25);
  border: 1px solid rgba(196, 147, 90, 0.5);
  border-radius: 24px;
  color: var(--gold-light);
  font-size: 13px;
  letter-spacing: 3px;
  backdrop-filter: blur(4px);
}

.hero-wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
}
.hero-wave svg { display: block; width: 100%; }

/* ── 照片墙 ── */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 100px;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-title-text {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 30px;
  color: var(--tabby);
  letter-spacing: 5px;
}
.section-title-text::before {
  content: '— ';
  color: var(--gold);
}
.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 22px;
  background: transparent;
  color: var(--eye-green);
  border: 1.5px solid var(--eye-green);
  border-radius: 22px;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s;
}
.refresh-btn:hover {
  background: var(--eye-green);
  color: white;
  transform: scale(1.03);
}
.refresh-btn:active { transform: scale(0.97); }

/* ── 瀑布流 - Ins 风 ── */
.masonry {
  columns: 3 260px;
  column-gap: 12px;
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  background: var(--bg-warm);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.photo-card img {
  width: 100%;
  display: block;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94), filter 0.4s;
  filter: saturate(1.0) brightness(1.0);
}

/* hover：图片微微放大，底部浮层出现 */
.photo-card:hover img {
  transform: scale(1.03);
  filter: saturate(1.1) brightness(1.02);
}

/* 底部 caption - 透明背景，渐变遮罩让文字可读 */
.photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 12px 10px;
  background: linear-gradient(to top, rgba(20,12,6,0.65) 0%, rgba(20,12,6,0.0) 100%);
  color: rgba(255,255,255,0.92);
  font-size: 11px;
  letter-spacing: 0.8px;
  font-style: italic;
  line-height: 1.4;
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}

.photo-card:hover .photo-caption {
  opacity: 1;
  transform: translateY(0);
}

/* 左上角小标签（序号感，可选）*/
.photo-card::before {
  content: attr(data-index);
  position: absolute;
  top: 8px; left: 10px;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1px;
  font-family: monospace;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s;
}
.photo-card:hover::before {
  opacity: 1;
}

/* 加载动画 */
.load-more-area {
  text-align: center;
  padding: 40px;
}
.paw-loader {
  display: inline-flex;
  gap: 10px;
}
.paw-loader span {
  font-size: 26px;
  animation: pawBounce 0.9s ease-in-out infinite;
  opacity: 0.7;
}
.paw-loader span:nth-child(2) { animation-delay: 0.18s; }
.paw-loader span:nth-child(3) { animation-delay: 0.36s; }
@keyframes pawBounce {
  0%, 100% { transform: translateY(0) scale(0.9); opacity: 0.5; }
  50%       { transform: translateY(-10px) scale(1.1); opacity: 1; }
}
.paw-loader.hidden { display: none; }

/* ── About ── */
.about-section {
  max-width: 780px;
  margin: 52px auto 100px;
  padding: 0 28px;
}

/* 胶片风格的信息卡片 */
.about-film-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--tabby);
  color: white;
  border-radius: 16px 16px 0 0;
  padding: 20px 28px;
}
.about-film-number {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 48px;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -2px;
}
.about-film-info { flex: 1; }
.about-film-info h2 {
  font-family: 'Ma Shan Zheng', cursive;
  font-size: 22px;
  letter-spacing: 4px;
  margin-bottom: 4px;
}
.about-film-info p {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 2px;
}

.about-card {
  background: var(--bg-card);
  border-radius: 0 0 16px 16px;
  padding: 44px 52px;
  box-shadow: 0 8px 32px var(--shadow);
  border: 1px solid var(--border);
  border-top: none;
}
.md-content h1, .md-content h2, .md-content h3 {
  font-family: 'Ma Shan Zheng', cursive;
  color: var(--tabby);
  letter-spacing: 3px;
  margin: 1.6em 0 0.6em;
}
.md-content h1 { font-size: 30px; border-bottom: 2px dashed var(--border); padding-bottom: 8px; }
.md-content h2 { font-size: 22px; }
.md-content h3 { font-size: 18px; color: var(--tabby-mid); }
.md-content p  { margin-bottom: 1em; }
.md-content strong { color: var(--tabby); }
.md-content em { color: var(--tabby-mid); }
.md-content ul, .md-content ol {
  padding-left: 1.6em;
  margin-bottom: 1em;
}
.md-content li { margin-bottom: 0.3em; }
.md-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 16px 0;
  box-shadow: 0 4px 16px var(--shadow);
}
.md-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 14px 22px;
  margin: 1.5em 0;
  background: linear-gradient(135deg, #faf6f0, #f5ede0);
  border-radius: 0 10px 10px 0;
  color: var(--tabby-mid);
  font-style: italic;
}
.md-content code {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 13px;
  color: var(--tabby-mid);
}
.md-content hr {
  border: none;
  border-top: 2px dashed var(--border);
  margin: 2.5em 0;
}
.no-content {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

/* ── Footer ── */
.footer {
  background: var(--tabby);
  text-align: center;
  padding: 36px 24px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
}
.footer strong {
  color: var(--gold);
  font-style: normal;
}
.footer-small {
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.5;
  letter-spacing: 1px;
}

/* ── 响应式 ── */

/* 平板横屏 */
@media (max-width: 1100px) {
  .masonry { columns: 3 220px; column-gap: 10px; }
  .gallery-section { padding: 40px 16px 80px; }
}

/* 平板竖屏 */
@media (max-width: 768px) {
  .masonry { columns: 2 160px; column-gap: 8px; }
  .photo-card { margin-bottom: 8px; }

  /* 手机上 caption 始终显示（没有 hover） */
  .photo-caption {
    opacity: 1;
    transform: translateY(0);
    font-size: 10px;
    padding: 20px 10px 8px;
  }
  .photo-card::before { display: none; }

  .hero h1 { letter-spacing: 4px; }
  .hero-badge { font-size: 11px; letter-spacing: 2px; }

  .nav-inner { padding: 0 16px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 13px; }

  .section-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .section-title-text { font-size: 24px; }

  .about-card { padding: 24px 20px; }
  .about-film-strip { padding: 14px 18px; }
  .about-film-number { font-size: 36px; }
}

/* 手机竖屏 */
@media (max-width: 480px) {
  .masonry { columns: 2 140px; column-gap: 6px; }
  .photo-card { margin-bottom: 6px; border-radius: 3px; }

  .hero { min-height: 80vh; }
  .hero h1 { font-size: 56px; letter-spacing: 3px; }
  .hero-sub { font-size: 14px; }
  .hero-desc { font-size: 12px; }
  .hero-badge { display: none; }

  .gallery-section { padding: 32px 10px 60px; }

  .nav-logo { font-size: 18px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 12px; }

  .about-section { padding: 0 14px; margin: 36px auto 60px; }
  .about-card { padding: 20px 16px; }
  .about-film-number { font-size: 30px; }
  .about-film-info h2 { font-size: 16px; }
  .about-film-info p { font-size: 10px; }

  .footer { padding: 24px 16px; font-size: 13px; }
}

/* 超小屏（折叠屏等）*/
@media (max-width: 360px) {
  .masonry { columns: 1; }
}
