/* ============================================================
   THE FORTUNE STICK — Detail Page Styles
   ============================================================ */

body.detail-page {
  min-height: 100vh;
}

/* ---- Detail Nav ---- */
.detail-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  background: rgba(13, 11, 8, 0.92);
  border-bottom: 1px solid rgba(200, 168, 75, 0.12);
  backdrop-filter: blur(10px);
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s ease;
  opacity: 0.75;
}

.nav-back:hover {
  opacity: 1;
  text-shadow: 0 0 10px rgba(200,168,75,0.4);
}

.nav-back-arrow {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-back:hover .nav-back-arrow {
  transform: translateX(-3px);
}

.nav-title {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.8;
  letter-spacing: 0.08em;
}

.nav-card-num {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--dust);
  text-transform: uppercase;
}

/* ---- Detail main layout ---- */
.detail-main {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  position: relative;
  z-index: 2;
}

/* ---- Left column ---- */
.detail-card-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.detail-card-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 8px;
}

.detail-card-halo {
  position: absolute;
  inset: -20px;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, rgba(200,168,75,0.15) 0%, transparent 70%);
  animation: haloBreath 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes haloBreath {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

.detail-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(200, 168, 75, 0.3);
  box-shadow:
    0 0 30px rgba(200, 168, 75, 0.25),
    0 20px 60px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.7s ease both;
}

.detail-card-shine {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 50%);
  pointer-events: none;
}

/* Fortune summary boxes */
.detail-fortune-summary {
  width: 100%;
  max-width: 340px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  animation: slideUp 0.8s ease 0.2s both;
}

.fortune-item {
  background: rgba(200,168,75,0.04);
  border: 1px solid rgba(200,168,75,0.1);
  border-radius: 4px;
  padding: 0.7rem 0.8rem;
  text-align: center;
}

.fortune-item-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.fortune-item-stars {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.star-filled { color: var(--gold); }
.star-empty { color: rgba(200,168,75,0.2); }

.fortune-item-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--parchment-dark);
  font-style: italic;
  opacity: 0.7;
  line-height: 1.4;
}

/* ---- Right column ---- */
.detail-content-col {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  animation: slideUp 0.7s ease 0.15s both;
}

/* Header */
.detail-header {
  text-align: center;
}

.detail-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.3em 1.2em;
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  margin-bottom: 0.5rem;
  background: rgba(200,168,75,0.06);
}

.detail-num {
  font-family: var(--font-title);
  font-size: 1.1rem;
  color: var(--gold-dark);
  letter-spacing: 0.2em;
  margin-bottom: 0.4rem;
  opacity: 0.7;
}

.detail-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
  margin-bottom: 0.8rem;
  text-shadow: 0 0 30px rgba(200,168,75,0.3);
}

.detail-chinese {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 0.4em;
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* Divider */
.detail-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.8rem 0;
}

.detail-divider.small {
  margin: 0.5rem 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,168,75,0.3), transparent);
}

.divider-sym {
  color: var(--gold);
  font-size: 0.8rem;
  opacity: 0.6;
  flex-shrink: 0;
}

/* Verses */
.detail-verses {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.5rem;
  border: 1px solid rgba(200,168,75,0.1);
  border-radius: 4px;
  background: rgba(200,168,75,0.02);
  position: relative;
}

.detail-verses::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1.5rem;
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.15;
  line-height: 1;
}

.detail-verse {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--parchment-dark);
  line-height: 1.7;
  text-align: center;
  opacity: 0.9;
}

.detail-verse + .detail-verse {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(200,168,75,0.08);
}

/* Tagline */
.detail-tagline-wrap {
  text-align: center;
}

.detail-tagline {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.05em;
  opacity: 0.8;
  border: none;
  padding: 0;
}

/* Sections */
.detail-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-section-title {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-story {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.02rem);
  color: var(--parchment-dark);
  line-height: 1.85;
  opacity: 0.85;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-story p {
  margin: 0;
}

/* Fortune table */
.detail-fortune-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.fortune-table-item {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(200,168,75,0.1);
  border-radius: 4px;
  background: rgba(200,168,75,0.02);
}

.fortune-table-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.fortune-table-stars {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.fortune-table-text {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--parchment-dark);
  opacity: 0.75;
  line-height: 1.5;
}

/* Return button */
.detail-return {
  text-align: center;
  padding-top: 1rem;
}

.btn-return {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  background: rgba(200,168,75,0.04);
}

.btn-return:hover {
  background: rgba(200,168,75,0.1);
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(200,168,75,0.2);
  color: var(--gold-light);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .detail-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2rem 1.2rem;
  }

  .detail-card-col {
    align-items: center;
  }

  .detail-fortune-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .detail-header {
    text-align: left;
  }
}

@media (max-width: 500px) {
  .detail-nav {
    padding: 0.8rem 1rem;
  }

  .nav-title {
    display: none;
  }

  .detail-fortune-summary {
    grid-template-columns: 1fr 1fr;
  }

  .detail-fortune-table {
    grid-template-columns: 1fr;
  }

  .detail-verses {
    padding: 1rem;
  }
}

/* ---- Card-to-card pagination (static pages only) ---- */
.card-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  flex-wrap: wrap;
}

.nav-pg {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.nav-pg:hover { opacity: 1; }

/* ---- Footer card index links ---- */
.footer-card-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 0.6rem;
  margin: 0.6rem 0;
}

.footer-card-links a {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.45;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-card-links a:hover { opacity: 0.9; }
