/* Wordle hero: reproduces the v3 reference (TARGET_REFERENCE.png).
   Scoped to body.wordle-body and loaded last so it overrides the layered
   rules in style.css and app-redesign.css. Geometry follows reference-layout.css. */

body.wordle-body .wordle-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.wordle-body {
  overflow-x: hidden;
}

/* Full-width hero band with the reference background glows. */
body.wordle-body .wordle-panel.wordle-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 134px 0 70px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background:
    radial-gradient(circle at 16% 38%, rgba(124, 58, 237, 0.14), transparent 34%),
    radial-gradient(circle at 88% 38%, rgba(37, 99, 235, 0.11), transparent 34%),
    linear-gradient(135deg, #080a1a 0%, #0c1024 52%, #0a1427 100%) !important;
}

/* One decorative layer behind everything, never interactive. */
body.wordle-body .wordle-hero__decor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

body.wordle-body .wordle-hero__content {
  position: relative;
  z-index: 2;
  width: min(1345px, calc(100% - 96px)) !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns:
    minmax(0, clamp(240px, 23.5vw, 289px))
    minmax(0, clamp(380px, 39vw, 477px))
    minmax(0, clamp(280px, 27vw, 332px)) !important;
  gap: clamp(24px, 3vw, 37px) !important;
  align-items: start !important;
  justify-content: center !important;
}

/* Left intro */
body.wordle-body .wordle-hero__intro {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 4px 0 0 !important;
}

body.wordle-body .wordle-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(124, 58, 237, 0.12);
  color: #c084fc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.wordle-body .wordle-eyebrow svg,
body.wordle-body .wordle-intro-icon svg,
body.wordle-body .wordle-card-icon,
body.wordle-body .wordle-clue-head svg,
body.wordle-body .wordle-countdown-label svg,
body.wordle-body .wordle-giveup-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.wordle-body .wordle-hero__title {
  margin: 22px 0 0;
  max-width: 400px;
  white-space: nowrap;
  font-size: clamp(46px, 3.1vw, 60px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 800;
  color: #f8fafc;
}

body.wordle-body .wordle-hero__title span {
  color: #8b5cf6;
}

body.wordle-body .wordle-hero__description {
  margin: 22px 0 0;
  max-width: 320px;
  color: #a7a9c5;
  font-size: 18px;
  line-height: 1.55;
}

body.wordle-body .wordle-intro-features {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

body.wordle-body .wordle-intro-features li {
  display: flex;
  align-items: center;
  gap: 16px;
}

body.wordle-body .wordle-intro-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #c084fc;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.22);
}

body.wordle-body .wordle-intro-features strong {
  display: block;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
}

body.wordle-body .wordle-intro-features small {
  display: block;
  color: #a7a9c5;
  font-size: 0.86rem;
}

/* Center game card */
body.wordle-body .wordle-game-card {
  width: 100% !important;
  min-height: 0 !important;
  display: grid !important;
  gap: 18px !important;
  border-radius: 24px !important;
  padding: 30px 32px 34px !important;
  background: rgba(12, 15, 35, 0.9) !important;
  border: 1px solid rgba(139, 92, 246, 0.36) !important;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.24), 0 0 50px rgba(124, 58, 237, 0.08) !important;
}

body.wordle-body .wordle-card-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

body.wordle-body .wordle-card-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 10px;
  box-sizing: border-box;
  border-radius: 12px;
  color: #c084fc;
  background: rgba(124, 58, 237, 0.18);
}

body.wordle-body .wordle-card-head p {
  margin: 0 0 4px;
  color: #c084fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.wordle-body .wordle-card-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 800;
}

body.wordle-body .wordle-grid {
  width: 100%;
  max-width: 336px;
  margin: 26px auto 0 !important;
  gap: 9px !important;
}

body.wordle-body .wordle-row {
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 9px !important;
}

body.wordle-body .wordle-tile {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 12px !important;
  font-size: clamp(1.6rem, 2.4vw, 2rem) !important;
}

/* Right status panel */
body.wordle-body .wordle-status {
  width: 100% !important;
  display: grid !important;
  gap: 16px !important;
  padding: 22px !important;
  border-radius: 24px !important;
  background: rgba(12, 15, 35, 0.88) !important;
  border: 1px solid rgba(139, 92, 246, 0.2) !important;
  box-shadow: none !important;
}

body.wordle-body .wordle-status__stats {
  gap: 10px !important;
}

body.wordle-body .wordle-stat-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body.wordle-body .wordle-stat-line svg {
  width: 16px;
  height: 16px;
  fill: #fb923c;
}

body.wordle-body .wordle-score-card div:nth-child(3) .wordle-stat-line svg {
  fill: #facc15;
}

body.wordle-body .wordle-clue-card {
  display: grid;
  gap: 12px;
  border-color: rgba(139, 92, 246, 0.2) !important;
  background: rgba(124, 58, 237, 0.06) !important;
}

body.wordle-body .wordle-clue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c084fc;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.wordle-body .wordle-clue-head svg {
  width: 18px;
  height: 18px;
}

body.wordle-body .wordle-clue-card .darkhome-mini-label {
  display: none;
}

/* Clue tracker: one base image plus a lit overlay per letter position. */
body.wordle-body .wordle-clue-dots {
  position: relative;
  width: 260px;
  max-width: 100%;
  height: 52px;
  margin: 0 auto;
}

body.wordle-body .wordle-clue-base {
  display: block;
  width: 100%;
  height: 100%;
}

body.wordle-body .wordle-clue-lit {
  position: absolute;
  top: 4px;
  width: 44px;
  height: 44px;
}

body.wordle-body .wordle-clue-lit[data-clue-dot="0"] { left: calc(10% - 22px); }
body.wordle-body .wordle-clue-lit[data-clue-dot="1"] { left: calc(30% - 22px); }
body.wordle-body .wordle-clue-lit[data-clue-dot="2"] { left: calc(50% - 22px); }
body.wordle-body .wordle-clue-lit[data-clue-dot="3"] { left: calc(70% - 22px); }
body.wordle-body .wordle-clue-lit[data-clue-dot="4"] { left: calc(90% - 22px); }

body.wordle-body .wordle-giveup-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(124, 58, 237, 0.55);
  color: #f8fafc;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

body.wordle-body .wordle-giveup-btn:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.75);
}

body.wordle-body .wordle-giveup-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.wordle-body .wordle-countdown {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(139, 92, 246, 0.14);
  text-align: center;
}

body.wordle-body .wordle-countdown-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7a9c5;
  font-size: 0.88rem;
}

body.wordle-body .wordle-countdown strong {
  color: #a855f7;
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Smooth-scroll the chevron's jump into the How to Play section - scoped to
   this page only (html.wordle-doc), not every anchor link on the site. */
html.wordle-doc {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html.wordle-doc {
    scroll-behavior: auto;
  }
}

/* Section transition chevron, bottom center of the hero. */
body.wordle-body .wordle-scroll-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  position: relative;
  z-index: 2;
}

body.wordle-body .wordle-scroll-cue {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

body.wordle-body .wordle-scroll-chevron {
  width: 56px;
  height: 56px;
  display: block;
}

body.wordle-body .wordle-scroll-cue:hover {
  transform: translateY(3px);
}

@media (max-width: 1180px) {
  body.wordle-body .wordle-hero__content {
    grid-template-columns: minmax(0, 1fr) !important;
    width: min(760px, calc(100% - 40px)) !important;
  }
  body.wordle-body .wordle-hero__intro {
    padding-top: 0 !important;
  }
}

@media (max-width: 820px) {
  body.wordle-body .wordle-panel.wordle-hero {
    padding: 84px 0 20px !important;
  }
  body.wordle-body .wordle-hero__content {
    width: calc(100% - 32px) !important;
  }
  body.wordle-body .wordle-hero__decor {
    display: none;
  }
  body.wordle-body .wordle-game-card {
    padding: 22px !important;
  }
  body.wordle-body .wordle-row {
    grid-template-columns: repeat(5, 54px) !important;
    gap: 7px !important;
  }
  body.wordle-body .wordle-tile {
    width: 54px !important;
    height: 54px !important;
  }
  body.wordle-body .wordle-grid {
    width: 100% !important;
  }
}

/* Result/help dialogs: sit above the site navbar, and start below it so the
   close button can't be covered by the header. */
body.wordle-body .wordle-modal {
  z-index: 999998 !important;
  padding: 112px 16px 20px !important;
  align-items: start;
}

body.wordle-body .wordle-modal-card {
  max-height: calc(100dvh - 132px) !important;
}

/* Setup screen (shown before a round): keep it below the navbar now that the
   page wrapper has no top padding, and let a lone visible mode card fill the row. */
body.wordle-body .wordle-setup {
  padding-top: 134px !important;
}

body.wordle-body .wordle-choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

@media (max-width: 820px) {
  body.wordle-body .wordle-setup {
    padding-top: 84px !important;
  }
}

/* In-game quick-difficulty popover (board header, third icon button).
   Reuses .wordle-quick-pill's existing look; only positioning is new. */
body.wordle-body .wordle-difficulty-popover {
  position: relative;
}

body.wordle-body .wordle-difficulty-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(12, 15, 35, 0.96);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

body.wordle-body .wordle-difficulty-menu[hidden] {
  display: none;
}

body.wordle-body .wordle-difficulty-menu .wordle-quick-pill {
  width: 100%;
  justify-content: center;
}

@media (max-width: 480px) {
  body.wordle-body .wordle-difficulty-menu {
    right: -12px;
  }
}

/* The wrapper reuses .wordle-difficulty-toggle for its existing Daily/Infinite
   hide rule, but not its old ::before divider (that was for a row of pills,
   not a single icon button) - drop it here. */
body.wordle-body .wordle-difficulty-popover::before {
  content: none;
}
