/* === CSS 变量 & 基础重置 === */
:root {
  --cream: #F8F3EC;
  --cream-light: #FCFAF7;
  --orange: #F4A261;
  --orange-hover: #E88D4A;
  --brown: #2A1F14;
  --brown-light: #5C4A3A;
  --gray: #B0A89A;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 12px rgba(42, 31, 20, 0.06);
  --shadow-md: 0 8px 32px rgba(42, 31, 20, 0.10);
  --shadow-card: 0 4px 20px rgba(42, 31, 20, 0.08);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Noto Serif SC', serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--brown);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === 全屏 Hero === */
.hero-fullscreen {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/pokelz/images/hero-bg.jpg') center/cover no-repeat;
  will-change: transform;
}

/* === 浮动导航栏 === */
.top-bar-float {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 52px;
  display: flex;
  align-items: center;
}

.top-bar-float .top-bar-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  font-family: var(--font-serif);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.header-action {
  display: flex;
  justify-content: flex-end;
}

.btn-cta-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  border: none;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(244, 162, 97, 0.4);
}

.btn-cta-circle:hover {
  background: var(--orange-hover);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(244, 162, 97, 0.5);
}

/* === 右下角视频浮动区 === */
.video-float {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(6px);
  padding: 10px;
  border-radius: var(--radius-md);
}

.video-row {
  display: flex;
  gap: 8px;
}

.video-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-item:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  border-color: var(--white);
}

.video-item.portrait {
  width: 92px;
}

.video-item.landscape {
  width: 192px;
  align-self: center;
}

.video-thumb {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.video-item.portrait .video-thumb {
  aspect-ratio: 9 / 16;
}

.video-item.landscape .video-thumb {
  aspect-ratio: 16 / 9;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-item:hover .video-thumb img {
  transform: scale(1.1);
}

/* 小播放按钮 */
.play-btn-sm {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.play-btn-sm::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 8px solid var(--white);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}

.video-item:hover .play-btn-sm {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--orange-hover);
}

/* 视频时长 */
.video-duration {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 0.62rem;
  color: var(--white);
  background: rgba(0,0,0,0.55);
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 500;
}

/* === 底部联系信息 === */
.site-footer {
  background: linear-gradient(135deg, #FFEAD2 0%, #FDF3E7 50%, #FEF9F3 100%);
  padding: 28px 32px 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.footer-logo {
  width: 28px;
  height: 28px;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.02em;
}

.footer-contact {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--brown-light);
  flex-wrap: wrap;
}

.contact-item svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.contact-item a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.contact-item a:hover {
  color: var(--orange-hover);
}

.contact-label {
  color: #B0A89A;
  font-size: 0.75rem;
  white-space: nowrap;
}

.footer-bottom {
  max-width: 1200px;
  margin: 16px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(244,162,97,0.15);
  text-align: center;
  font-size: 0.75rem;
  color: #B0A89A;
}

/* === Hero 标题 === */
.hero-title {
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 50;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35), 0 0 40px rgba(0,0,0,0.15);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 768px) {
  .hero-title { font-size: 1.6rem; top: 14px; left: 16px; }
  .video-float {
    bottom: 12px;
    right: 12px;
    padding: 6px;
    gap: 5px;
  }
  .video-item.portrait { width: 64px; }
  .video-item.landscape { width: 136px; }
  .video-row { gap: 5px; }
  .play-btn-sm { width: 22px; height: 22px; }
  .play-btn-sm::after {
    border-left: 6px solid var(--white);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
  }
  .logo-text { font-size: 0.9rem; }
  .footer-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
  .site-footer { padding: 24px 16px 16px; }
  .footer-contact { flex-direction: column; gap: 10px; }
}

/* === Gallery 缩略图：图片加载失败时显示渐变背景 === */
.gallery-card-thumb.thumb-fallback {
  background: linear-gradient(135deg, var(--cream) 0%, #FFEAD2 100%);
}

/* === 视频播放器错误提示 === */
.player-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  text-align: center;
  padding: 40px;
  min-height: 300px;
}
.player-error small {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  font-family: monospace;
  word-break: break-all;
  max-width: 80%;
}

/* === 视频画廊弹窗 === */
.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 14, 8, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-overlay.active {
  display: flex;
  opacity: 1;
}

.gallery-modal {
  background: var(--cream-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  transform: scale(0.92);
  transition: transform 0.3s ease;
  position: relative;
}

.gallery-overlay.active .gallery-modal {
  transform: scale(1);
}

.gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(42, 31, 20, 0.08);
  color: var(--brown);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.gallery-close:hover {
  background: rgba(42, 31, 20, 0.15);
}

.gallery-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid rgba(42, 31, 20, 0.06);
  flex-shrink: 0;
}

.gallery-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 14px;
}

.gallery-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-tab {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(244, 162, 97, 0.3);
  background: transparent;
  color: var(--brown-light);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.gallery-tab:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.gallery-tab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.gallery-grid {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

.gallery-grid::-webkit-scrollbar {
  width: 6px;
}
.gallery-grid::-webkit-scrollbar-thumb {
  background: rgba(244, 162, 97, 0.3);
  border-radius: 3px;
}

.gallery-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(42, 31, 20, 0.04);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(42, 31, 20, 0.12);
}

.gallery-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream);
}

.gallery-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-card-thumb img {
  transform: scale(1.08);
}

.gallery-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}

.gallery-card:hover .gallery-card-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--orange-hover);
}

.gallery-card-play::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 12px solid var(--white);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 3px;
}

.gallery-card-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 0.72rem;
  color: var(--white);
  background: rgba(0,0,0,0.6);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.gallery-card-info {
  padding: 10px 14px 12px;
}

.gallery-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brown);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card-cat {
  font-size: 0.72rem;
  color: var(--orange);
  margin-top: 4px;
  font-weight: 500;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--brown-light);
  font-size: 0.9rem;
}

.gallery-empty p {
  margin-bottom: 8px;
}

.gallery-empty .hint {
  font-size: 0.8rem;
  color: var(--gray);
}

/* === 视频播放器弹窗 === */
.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.player-overlay.active {
  display: flex;
  opacity: 1;
}

.player-modal {
  width: 100%;
  max-width: 800px;
  position: relative;
}

.player-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.player-close:hover {
  background: rgba(255,255,255,0.3);
}

.player-wrapper {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}

.player-wrapper video {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.player-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-serif);
}

@media (max-width: 768px) {
  .gallery-overlay { padding: 12px; }
  .gallery-modal { max-height: 92vh; border-radius: var(--radius-md); }
  .gallery-header { padding: 18px 18px 12px; }
  .gallery-title { font-size: 1.2rem; margin-bottom: 10px; }
  .gallery-grid {
    padding: 14px 18px 20px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  .gallery-card-play { width: 36px; height: 36px; }
  .gallery-card-play::after {
    border-left: 10px solid var(--white);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
  }
  .player-close { top: -40px; }
  .player-title { font-size: 0.95rem; }
}
