/* Learn with CoCo — Adventure Map (Home + Activities) */

.adventure-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  margin: 18px auto 0;
  width: min(1120px, 92vw);
  min-height: min(520px, 72vh);
  padding: 28px 24px 30px;
  display: grid;
  align-items: end;
  background:
    linear-gradient(105deg, rgba(26, 43, 74, 0.62) 0%, rgba(26, 43, 74, 0.28) 48%, rgba(255, 196, 58, 0.16) 100%),
    url("https://images.unsplash.com/photo-1503454537195-1dcabb73ffb9?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
  color: #fff;
  box-shadow: 0 18px 40px rgba(26, 43, 74, 0.22);
}

.adventure-hero::before,
.adventure-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.28;
}

.adventure-hero::before {
  width: 180px;
  height: 180px;
  right: -40px;
  top: -50px;
  background: radial-gradient(circle, #fff 0 28%, transparent 30%);
  animation: cloudDrift 10s ease-in-out infinite alternate;
}

.adventure-hero::after {
  width: 120px;
  height: 120px;
  left: 8%;
  bottom: -40px;
  background: radial-gradient(circle, rgba(255, 230, 102, 0.9) 0 40%, transparent 42%);
  animation: cloudDrift 12s ease-in-out infinite alternate-reverse;
}

.adventure-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 20px;
  align-items: center;
}

.adventure-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.adventure-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.adventure-hero p {
  margin: 0 0 18px;
  max-width: 48ch;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
}

.adventure-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.adventure-stat {
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.adventure-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}

.adventure-stat span {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.9;
}

.adventure-panel {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.adventure-panel h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.continue-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(26, 43, 74, 0.12);
  transition: transform .18s ease;
}

.continue-card:hover { transform: translateY(-3px) scale(1.01); }

.continue-card img,
.continue-card .continue-fallback {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(26, 43, 74, 0.2);
  flex: 0 0 auto;
}

.continue-card .continue-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffc43a, #ff5a4e);
  font-size: 1.6rem;
}

.continue-card .meta {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0e8f7e;
  margin-bottom: 2px;
}

.continue-card h4 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-family: var(--font-display);
}

.continue-card p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.continue-empty {
  margin: 0;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.world-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1.5px solid rgba(26, 43, 74, 0.12);
  background: linear-gradient(160deg, #fff, var(--world-tint, #fff8e8));
  box-shadow: 0 8px 18px rgba(26, 43, 74, 0.08);
  transition: transform .18s ease, box-shadow .18s ease;
  min-height: 110px;
}

.world-chip:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px rgba(26, 43, 74, 0.14);
}

.world-chip .emoji {
  font-size: 1.7rem;
  line-height: 1;
}

.world-chip strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.world-chip span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.adventure-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 8px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(26, 43, 74, 0.12);
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(26, 43, 74, 0.08);
}

.adventure-path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 10px;
  padding: 8px 0 20px;
}

.adventure-chapter {
  position: relative;
  border-radius: 28px;
  padding: 18px 16px 20px;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 255, 255, 0.65), transparent 36%),
    linear-gradient(160deg, var(--chapter-tint, #fff7d8), #ffffff 55%);
  border: 1.5px solid rgba(26, 43, 74, 0.12);
  box-shadow: 0 14px 30px rgba(26, 43, 74, 0.1);
  overflow: hidden;
}

.adventure-chapter::before {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 184, 255, 0.22), transparent 68%);
  pointer-events: none;
}

.chapter-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.chapter-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.chapter-head p {
  margin: 4px 0 0;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.9rem;
}

.chapter-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(26, 43, 74, 0.08);
  font-weight: 800;
  font-size: 0.82rem;
  white-space: nowrap;
}

.path-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px 12px;
}

.path-track::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 54px;
  height: 10px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 196, 58, 0.95) 0 18px,
      transparent 18px 30px
    );
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.path-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 8px 6px 10px;
  border-radius: 22px;
  transition: transform .18s ease;
  --scroll-scale: 1;
}

.path-node:hover { transform: translateY(-4px); }

.path-node .card-cover-wrap {
  width: min(132px, 78%);
  margin: 0 auto;
  transform: scale(var(--scroll-scale, 1));
}

.path-node .card-cover,
.path-node .card-cover-fallback {
  border-radius: 50%;
  border-width: 4px;
}

.path-node .node-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.15;
  max-width: 12ch;
}

.path-node .node-meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
}

.path-node .star-row {
  display: inline-flex;
  gap: 2px;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.path-node.is-current .card-cover-wrap {
  box-shadow: 0 0 0 4px rgba(255, 196, 58, 0.55), 0 10px 22px rgba(26, 43, 74, 0.16);
}

.path-node.is-done .card-number {
  background: #fff3b0;
  border-color: #f0c75e;
}

.reward-chest {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffe56a, #ffd0a8);
  border: 1.5px solid rgba(26, 43, 74, 0.12);
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(255, 196, 58, 0.25);
}

.reward-chest .chest-emoji {
  font-size: 1.8rem;
  animation: chestBounce 1.8s ease-in-out infinite;
}

.reward-chest.is-open {
  background: linear-gradient(135deg, #b8f5d8, #ffe56a);
  box-shadow: 0 10px 22px rgba(61, 224, 181, 0.28);
}

.reward-chest.is-open .chest-emoji {
  animation: chestPop 0.55s ease both;
}

@keyframes chestPop {
  0% { transform: scale(0.7) rotate(-8deg); opacity: 0.4; }
  60% { transform: scale(1.15) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.adventure-chapter-ad {
  margin: 4px 0 0;
}

.home-featured-shell {
  margin-top: 8px;
}

.home-featured-shell .section-head {
  margin-bottom: 14px;
}

@keyframes cloudDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-18px, 12px); }
}

@keyframes chestBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}

@media (max-width: 860px) {
  .adventure-hero-grid { grid-template-columns: 1fr; }
  .path-track::before { display: none; }
  .path-node .card-cover-wrap { width: min(132px, 72%); }
}

@media (prefers-reduced-motion: reduce) {
  .adventure-hero::before,
  .adventure-hero::after,
  .reward-chest .chest-emoji {
    animation: none !important;
  }
  .path-node .card-cover-wrap {
    transform: scale(1) !important;
  }
}
