/* ============================================================
   pages.css — phần riêng của từng trang
   ============================================================ */

/* ============================================================
   Trang chủ — khu mở đầu
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  padding: clamp(40px, 8vw, 92px) 0 clamp(34px, 6vw, 62px);
}
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy p { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .hero-facts { justify-content: center; }
}

.hero h1 {
  font-size: clamp(2.25rem, 6.2vw, 3.7rem);
  line-height: 1.12;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--moon);
}
.hero-copy > p { font-size: 1.04rem; color: var(--ink-soft); }

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.hero-facts {
  display: flex; gap: 8px 20px; flex-wrap: wrap;
  margin-top: 30px;
  font-size: .84rem;
  color: var(--ink-mute);
}
.hero-facts span { display: flex; align-items: center; gap: 7px; }
.hero-facts span::before { content: '·'; color: var(--moon); font-size: 1.4rem; line-height: 0; }

/* lá bài sống ở khu mở đầu */
.hero-card-stage {
  perspective: 1200px;
  display: grid;
  place-items: center;
  min-height: 380px;
}
.hero-card {
  width: 228px; height: 388px;
  border-radius: 14px;
  position: relative;
  transform-style: preserve-3d;
  animation: heroFloat 9s ease-in-out infinite;
  box-shadow: 0 34px 80px rgba(0, 0, 0, .55);
  border: 1px solid var(--card-edge);
  background:
    repeating-linear-gradient(45deg, rgba(95,180,236,.07) 0 7px, transparent 7px 14px),
    linear-gradient(155deg, #17346a, #0a1224 58%, #123156);
  display: grid;
  place-items: center;
  overflow: hidden;
}
@media (max-width: 880px) { .hero-card-stage { min-height: 320px; } .hero-card { width: 190px; height: 322px; } }

@keyframes heroFloat {
  0%, 100% { transform: rotateY(-13deg) rotateX(6deg) translateY(0); }
  50%      { transform: rotateY(13deg) rotateX(-5deg) translateY(-16px); }
}

.hero-card .moon-face {
  width: 58%;
  filter: drop-shadow(0 0 22px rgba(95, 180, 236, .5));
}
.hero-card .hero-verse {
  position: absolute;
  bottom: 22px; left: 0; right: 0;
  text-align: center;
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: .82rem;
  color: var(--moon);
  padding-inline: 18px;
}

/* ============================================================
   Dải trăng lớn (lớp thời gian — "chiều thứ tư")
   ============================================================ */
.moon-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: center;
  padding: 26px 30px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  backdrop-filter: blur(14px);
}
@media (max-width: 640px) { .moon-panel { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

.moon-disc {
  width: 84px; height: 84px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(circle at 34% 32%, #eaf6ff, var(--moon) 58%, var(--moon-deep));
  box-shadow: 0 0 46px rgba(95, 180, 236, .45);
  overflow: hidden;
  flex-shrink: 0;
}
.moon-shadow {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--night);
  transition: transform 1.2s var(--ease);
}
.moon-panel h3 { font-size: 1.16rem; margin-bottom: 4px; }
.moon-panel p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* ============================================================
   Lời cảm nhận — băng chạy ngang
   ============================================================ */
.voices { overflow: hidden; position: relative; padding: 6px 0; }
.voices::before, .voices::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.voices::before { left: 0;  background: linear-gradient(90deg, var(--void), transparent); }
.voices::after  { right: 0; background: linear-gradient(270deg, var(--void), transparent); }

.voices-track {
  display: flex; gap: 14px;
  width: max-content;
  animation: slide 46s linear infinite;
}
.voices:hover .voices-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.voice {
  width: 290px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  flex-shrink: 0;
}
.voice p {
  font-family: 'Lora', serif;
  font-size: .92rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.voice cite { font-size: .8rem; color: var(--moon); font-style: normal; }

/* ============================================================
   Ghép đôi
   ============================================================ */
.pair-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: start; }
@media (max-width: 680px) { .pair-grid { grid-template-columns: 1fr; } .pair-heart { justify-self: center; } }
.pair-heart { font-size: 1.8rem; align-self: center; color: var(--blossom); }

.score-ring {
  width: 168px; height: 168px;
  margin: 0 auto 20px;
  position: relative;
  display: grid; place-items: center;
}
.score-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.score-ring .val { font-family: 'Lora', serif; font-size: 2.5rem; color: var(--moon); }

/* ============================================================
   Hộp thư thời gian
   ============================================================ */
.letter-paper {
  padding: 30px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(transparent, transparent 31px, var(--line-soft) 31px, var(--line-soft) 32px),
    color-mix(in srgb, var(--dusk) 28%, transparent);
}
.letter-paper .textarea {
  background: transparent;
  border: none;
  line-height: 32px;
  padding: 0;
  min-height: 224px;
  font-family: 'Lora', serif;
  font-size: 1rem;
}
.letter-paper .textarea:focus { background: transparent; }

/* ============================================================
   Lịch sử
   ============================================================ */
.log-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  margin-bottom: 10px;
  transition: border-color var(--t-fast);
}
.log-item:hover { border-color: var(--line); }
.log-kind {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--moon) 13%, transparent);
  font-size: 1.1rem;
}
.log-item h4 { font-family: 'Be Vietnam Pro', sans-serif; font-size: .95rem; font-weight: 600; margin: 0 0 3px; }
.log-item .when { font-size: .78rem; color: var(--ink-mute); white-space: nowrap; }
.log-item .cards { font-size: .82rem; color: var(--ink-soft); }
@media (max-width: 560px) {
  .log-item { grid-template-columns: auto 1fr; }
  .log-item .when { grid-column: 2; }
}

/* ============================================================
   Hồ sơ
   ============================================================ */
.profile-head {
  display: flex; align-items: center; gap: 20px;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.profile-head .avatar { width: 62px; height: 62px; font-size: 1.5rem; }
.profile-head h2 { font-size: 1.5rem; }
.profile-head .mail { font-size: .86rem; color: var(--ink-mute); }

/* ============================================================
   404
   ============================================================ */
.oops { display: grid; place-items: center; min-height: 78vh; text-align: center; }
.oops .pup { width: 130px; height: 130px; margin-bottom: 22px; }
