:root {
  --bg: #fff7ef;
  --bg-deep: #3a261d;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --text: #2b211c;
  --text-soft: #7a6b61;
  --accent: #e97843;
  --accent-strong: #c85628;
  --accent-soft: rgba(233, 120, 67, 0.14);
  --cream: #fff1df;
  --line: rgba(88, 55, 35, 0.12);
  --shadow: 0 24px 70px rgba(119, 72, 42, 0.18);
  --shadow-strong: 0 34px 90px rgba(42, 25, 18, 0.36);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 196, 128, 0.42), transparent 26%),
    radial-gradient(circle at 88% 6%, rgba(255, 139, 102, 0.28), transparent 30%),
    linear-gradient(180deg, #fffaf5 0%, var(--bg) 52%, #ffe8d2 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(82, 48, 28, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 48, 28, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(88, 55, 35, 0.08);
  background: rgba(255, 250, 245, 0.74);
  backdrop-filter: blur(20px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.12rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ffb069, #e97843 55%, #c95b42);
  box-shadow: 0 12px 30px rgba(233, 120, 67, 0.34);
}

.brand h1 {
  font-size: 1.22rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.brand p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.video-count {
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(119, 72, 42, 0.08);
}

.main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: center;
  gap: 44px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 241, 223, 0.78)),
    radial-gradient(circle at 70% 20%, rgba(233, 120, 67, 0.18), transparent 32%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.hero-copy h2 {
  max-width: 680px;
  font-size: clamp(2.2rem, 5vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.065em;
  color: #261914;
}

.hero-copy p {
  max-width: 610px;
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #e97843, #c85628);
  box-shadow: 0 16px 34px rgba(200, 86, 40, 0.26);
}

.soft-hint {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.hero-card {
  position: relative;
  min-height: 330px;
}

.memory-frame {
  position: absolute;
  border: 12px solid #fff;
  border-bottom-width: 42px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 68% 34%, rgba(255, 255, 255, 0.78) 0 7%, transparent 8%),
    linear-gradient(140deg, #6b3727, #e97843 46%, #ffd18b);
  box-shadow: 0 26px 48px rgba(80, 42, 23, 0.22);
}

.frame-main {
  inset: 18px 48px 18px 18px;
  transform: rotate(-4deg);
}

.frame-small {
  width: 178px;
  height: 142px;
  right: 0;
}

.frame-small.top {
  top: 0;
  transform: rotate(8deg);
  background: linear-gradient(135deg, #ffd199, #ff8f6b, #87513d);
}

.frame-small.bottom {
  bottom: 0;
  transform: rotate(5deg);
  background: linear-gradient(135deg, #68412f, #f3a65d, #ffe7c7);
}

.floating-note {
  position: absolute;
  left: 8px;
  bottom: 0;
  padding: 13px 16px;
  border-radius: 999px;
  color: #6a3d25;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 18px 36px rgba(80, 42, 23, 0.14);
  font-weight: 700;
}

.gallery {
  padding-top: 54px;
  min-height: 48vh;
}

.section-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  letter-spacing: -0.045em;
}

.section-heading p {
  color: var(--text-soft);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 22px;
}

.video-card {
  appearance: none;
  border: 1px solid rgba(88, 55, 35, 0.1);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  overflow: hidden;
  text-align: left;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 16px 42px rgba(119, 72, 42, 0.1);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.video-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  border-color: rgba(233, 120, 67, 0.34);
  box-shadow: 0 26px 58px rgba(119, 72, 42, 0.18);
}

.video-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #2b211c;
  overflow: hidden;
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.48), transparent);
  pointer-events: none;
}

.video-thumb video,
.thumb-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-fallback {
  display: grid;
  place-items: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(145deg, #7c412b, #2b211c);
}

.thumb-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(40, 22, 14, 0.12);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.video-card:hover .thumb-overlay {
  opacity: 1;
}

.play-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 4px;
  font-size: 1.25rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.duration-badge {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(43, 33, 28, 0.72);
  color: #fff;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
}

.video-body {
  padding: 17px 18px 19px;
}

.video-body h3 {
  font-size: 1.04rem;
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.video-meta span:last-child {
  color: var(--accent-strong);
  font-weight: 800;
}

.video-note {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  text-align: center;
  padding: 70px 22px;
  border: 1px dashed rgba(88, 55, 35, 0.22);
  border-radius: 30px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.5);
}

.empty-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--accent-soft);
  font-size: 2rem;
}

.empty-state p {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 10px;
}

.empty-state span {
  line-height: 1.8;
}

.player-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 26px;
}

.player-modal[hidden] {
  display: none;
}

.player-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 24, 15, 0.74);
  backdrop-filter: blur(14px);
}

.player-dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 52px);
  overflow: auto;
  border-radius: 34px;
  background: #fffaf5;
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: var(--shadow-strong);
}

.player-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.player-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

.player-shell {
  background: #000;
  border-radius: 34px 34px 0 0;
  overflow: hidden;
}

#player {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 10px;
}

#modal-title {
  color: var(--text);
  font-size: clamp(1.28rem, 2.4vw, 1.9rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.modal-note {
  color: var(--text-soft);
  line-height: 1.8;
}

.modal-date {
  flex-shrink: 0;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.modal-date:empty,
.modal-note:empty {
  display: none;
}

.player-error {
  margin: 0 26px 24px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: rgba(205, 56, 44, 0.1);
  color: #b83b31;
  line-height: 1.7;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .hero-card {
    min-height: 290px;
  }
}

@media (max-width: 720px) {
  .site-header-inner,
  .main {
    width: min(100% - 24px, 1180px);
  }

  .site-header-inner {
    align-items: flex-start;
  }

  .brand p {
    display: none;
  }

  .main {
    padding-top: 22px;
  }

  .hero {
    padding: 26px 20px;
    border-radius: 30px;
  }

  .hero-copy h2 {
    font-size: 2.35rem;
  }

  .hero-copy p {
    font-size: 0.98rem;
  }

  .hero-card {
    min-height: 240px;
  }

  .frame-main {
    inset: 18px 32px 18px 0;
  }

  .frame-small {
    width: 134px;
    height: 112px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .player-info {
    flex-direction: column;
    padding-inline: 18px;
  }

  .player-modal {
    padding: 12px;
  }

  .player-dialog,
  .player-shell {
    border-radius: 24px;
  }

  .player-shell {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}
