/* ENGLISH YO! — CLASS CLASH topic selection screen + lobby topic chip.
   Uses the colour tokens from index.html :root and the shared keyframes from class-clash.css. */

/* ---------- topic screen ---------- */
.topics-head { text-align: center; margin: clamp(6px, 2vw, 18px) 0 clamp(14px, 2.6vw, 26px); }
.topics-head h1 { font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1; color: var(--navy); text-shadow: 0 3px 0 rgba(255,255,255,.7); }
.topics-head h1 span { color: var(--pink); }
.topics-sub { margin: 8px 0 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, 2.6vw, 1.7rem); letter-spacing: .04em; color: #1c3d78; }
.topic-host { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 4px 16px 4px 5px; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 6px 14px rgba(5,37,116,.12); font-size: .82rem; font-weight: 800; color: #3a4d78; }
.topic-host img { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; background: var(--card-blue); }
.topic-host b { color: var(--navy); }

.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); }
.topic-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: clamp(170px, 22vh, 250px); padding: clamp(16px, 2vw, 26px); border-radius: 26px; overflow: hidden; text-align: left; color: #fff; background: linear-gradient(150deg, var(--c1), var(--c2)); box-shadow: 0 14px 30px rgba(0,53,110,.18); transition: transform .18s ease, box-shadow .18s ease; }
.topic-card::after { content: ""; position: absolute; right: -34px; top: -34px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.16); pointer-events: none; }
.topic-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 20px 38px rgba(0,53,110,.24); }
.topic-card:active { transform: scale(.98); }
.topic-emoji { display: grid; place-items: center; width: clamp(52px, 5vw, 72px); height: clamp(52px, 5vw, 72px); border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 6px 14px rgba(0,0,0,.14); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1; }
.topic-title { margin-top: 4px; font-family: var(--display); font-weight: 800; font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.05; text-shadow: 0 2px 0 rgba(0,0,0,.14); }
.topic-focus { font-size: clamp(.78rem, 1.2vw, 1rem); font-weight: 800; line-height: 1.35; opacity: .95; }
.topic-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; width: 100%; }
.topic-level { padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.28); font-size: .74rem; font-weight: 900; letter-spacing: .06em; }
.topic-play { margin-left: auto; padding: 7px 16px; border-radius: 999px; background: #fff; color: var(--navy); font-family: var(--display); font-weight: 800; font-size: .95rem; box-shadow: 0 6px 14px rgba(0,0,0,.16); }
.topic-card:hover .topic-play { background: var(--yellow); }
.topic-soon { margin-left: auto; padding: 6px 14px; border-radius: 999px; background: rgba(5,37,116,.72); color: #fff; font-family: var(--display); font-weight: 800; font-size: .82rem; letter-spacing: .06em; }

/* COMING SOON: clearly not playable, but still friendly and clickable (it just shakes and explains). */
.topic-card.is-soon { filter: saturate(.55) brightness(1.02); cursor: default; box-shadow: 0 10px 22px rgba(0,53,110,.12); }
.topic-card.is-soon:hover { transform: none; box-shadow: 0 10px 22px rgba(0,53,110,.12); }
.topic-card.is-soon .topic-emoji { opacity: .85; }
.topic-card.nudge { animation: topic-nudge .45s ease; }
@keyframes topic-nudge { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px) rotate(-1deg); } 40% { transform: translateX(6px) rotate(1deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.topic-toast { position: fixed; z-index: 40; left: 50%; bottom: 26px; max-width: 92vw; padding: 12px 22px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 900; font-size: .92rem; text-align: center; box-shadow: 0 14px 30px rgba(5,37,116,.35); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .25s ease, transform .25s ease; }
.topic-toast.show { opacity: 1; transform: translate(-50%, 0); }
.topic-back { display: block; margin: clamp(14px, 2.4vw, 24px) auto 0; min-height: 50px; padding: 10px 26px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--navy); font-family: var(--display); font-weight: 800; font-size: 1rem; box-shadow: 0 8px 18px rgba(5,37,116,.14); }
.topic-back:hover { background: #fff; }

/* ---------- lobby: selected topic ---------- */
.lobby-topic { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -8px 0 16px; padding: 8px 16px; border-radius: 16px; background: linear-gradient(120deg, var(--c1, var(--yellow)), var(--c2, var(--pink))); color: #fff; }
.lobby-topic small { font-size: .66rem; font-weight: 900; letter-spacing: .14em; opacity: .9; }
.lobby-topic b { font-family: var(--display); font-weight: 800; font-size: clamp(1rem, 3.4vw, 1.3rem); text-shadow: 0 2px 0 rgba(0,0,0,.14); }

@media (max-width: 900px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card { min-height: 0; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .topics-head { margin: 2px 0 8px; }
  .topics-head h1 { font-size: 1.7rem; }
}
