@import url('https://fonts.googleapis.com/css2?family=Inter:wght@600&family=Nunito:wght@700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background: #a8dde6;
}

.ex-page {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: 'Nunito', system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  --ex-topbar-top: max(12px, calc(env(safe-area-inset-top, 0px) + 8px));
  --ex-topbar-height: 44px;
  --ex-topbar-radius: 22px;
  --ex-topbar-icon: 20px;
}

/* Canvas = viewport plin, coordonate Figma 1440×1024 → % */
.ex-board {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #a8dde6;
}

.ex-exit {
  position: fixed;
  z-index: 250;
  top: var(--ex-topbar-top);
  left: 2.58%;
  right: auto;
  box-sizing: border-box;
  height: var(--ex-topbar-height);
  min-height: var(--ex-topbar-height);
  max-height: var(--ex-topbar-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--ex-topbar-radius);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 22px);
  line-height: 1;
  color: #2a2706;
  text-decoration: none;
  white-space: nowrap;
}

.ex-exit:hover { background: rgba(255, 255, 255, 0.92); }
.ex-exit svg { width: var(--ex-topbar-icon); height: var(--ex-topbar-icon); flex-shrink: 0; }

.ex-finish {
  position: fixed;
  z-index: 250;
  top: var(--ex-topbar-top);
  right: 2.58%;
  left: auto;
  bottom: auto;
  transform: none;
  box-sizing: border-box;
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: var(--ex-topbar-height);
  min-height: var(--ex-topbar-height);
  max-height: var(--ex-topbar-height);
  width: auto;
  padding: 0 18px 0 16px;
  border: 0;
  border-radius: var(--ex-topbar-radius);
  background-color: #0744b4;
  opacity: 1;
  box-shadow: none;
  filter: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 22px);
  line-height: 1;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.ex-finish__label {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
  text-align: center;
}

.ex-finish__icon {
  width: var(--ex-topbar-icon);
  height: var(--ex-topbar-icon);
  flex-shrink: 0;
}

.ex-finish:hover:not(:disabled) {
  background-color: #0744b4;
  opacity: 1;
  filter: none;
}

.ex-finish:disabled {
  opacity: 1;
  background-color: #8aa8d4;
  cursor: not-allowed;
}

.ex-page--finished .ex-finish {
  display: none;
}

.ex-page--finished .ex-prompt,
.ex-page--choices-hidden .ex-prompt {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ex-page--paused .ex-board,
.ex-page--report-open .ex-board {
  filter: brightness(0.42);
}

.ex-page--report-open .ex-choices,
.ex-page--report-open .ex-prompt,
.ex-page--report-open .ex-confetti {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ex-page--report-open .ex-review-banner {
  display: none;
}

.ex-page--review .ex-finish {
  display: none;
}

.ex-review-banner {
  position: fixed;
  z-index: 190;
  top: calc(4.24% + 72px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 18px;
  background: #0744b4;
  color: #fff;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(7, 68, 180, 0.28);
  white-space: nowrap;
}

.ex-choices--hidden {
  visibility: hidden;
  pointer-events: none;
}

.ex-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ex-scene img {
  position: absolute;
  display: block;
  pointer-events: none;
}

/* Cer — imagini globale stânga/dreapta */
.ex-sky {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  z-index: 1;
}

.ex-sky--desktop-left {
  left: 0;
  top: calc(5% + 30px);
  width: 25%;
}

.ex-sky--desktop-right {
  right: 0;
  left: auto;
  top: calc(26% + 30px);
  width: 24%;
}

.ex-scene img.ex-sky--mobile-left,
.ex-scene img.ex-sky--mobile-right {
  display: none;
}

.ex-grass {
  left: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: 24.02%;
  object-fit: fill;
  object-position: center bottom;
  z-index: 2;
}

.ex-sun {
  left: 84%;
  top: 0;
  width: 14%;
  z-index: 4;
}

.ex-prompt {
  position: absolute;
  left: 4.79%;
  top: 21.5%;
  width: min(25.62vw, calc(64.55vh * 369 / 661));
  aspect-ratio: 369 / 661;
  height: auto;
  z-index: 25;
  animation: ex-float 4.5s ease-in-out infinite;
  pointer-events: none;
}

.ex-prompt-balloon {
  position: absolute;
  display: block;
  object-fit: contain;
  z-index: 1;
}

.ex-prompt-balloon--mobile { display: none; }

.ex-prompt-balloon--desktop {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ex-prompt-card {
  position: absolute;
  left: 7.05%;
  top: 59.23%;
  width: 85.88%;
  height: 40.85%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0 10%;
  pointer-events: none;
}

.ex-prompt-text {
  margin: 0;
  font-weight: 800;
  font-size: clamp(13px, 1.95vw, 28px);
  line-height: 1.25;
  text-align: center;
  color: #364153;
}

.ex-page--grupuri .ex-prompt-text {
  font-size: clamp(12px, 1.74vw, 25px);
}

.ex-prompt-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35.3%;
  aspect-ratio: 1;
  max-width: 112px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.ex-prompt-play svg { width: 100%; height: 100%; display: block; }

.ex-prompt--playing .ex-prompt-play {
  animation: ex-pulse 0.6s ease-in-out infinite alternate;
}

.ex-prompt-hit {
  position: absolute;
  inset: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
}

.ex-choices {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.ex-choices--hidden {
  opacity: 0;
  pointer-events: none;
}

.ex-choice {
  position: absolute;
  width: 10%;
  height: auto;
  aspect-ratio: 144 / 381;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  animation: ex-float 3.8s ease-in-out infinite;
  transform-origin: center bottom;
  z-index: 10;
  pointer-events: auto;
}

.ex-choice--0 { left: 37.01%; top: 24.9%; animation-delay: 0s; }
.ex-choice--1 { left: 60.49%; top: 22.27%; animation-delay: 0.5s; }
.ex-choice--2 { left: 48.94%; top: 51.27%; animation-delay: 0.9s; }
.ex-choice--3 { left: 72.57%; top: 51.46%; animation-delay: 0.3s; }
.ex-choice--4 { left: 84.03%; top: 27.83%; animation-delay: 1.1s; }

.ex-choice:hover { filter: brightness(1.04); }
.ex-choice__svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.1));
}

.ex-choice--shake { animation: ex-shake 0.55s ease-in-out !important; }
.ex-choice--fade { opacity: 0; transform: scale(0.55) translateY(30px) !important; pointer-events: none; }
.ex-choice--correct { animation: ex-float 3.8s ease-in-out infinite, ex-glow 0.8s ease-in-out 2; }

.ex-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.ex-confetti span {
  position: absolute;
  top: -12px;
  border-radius: 2px;
  opacity: 0;
  animation: ex-confetti linear forwards;
}

@media (max-aspect-ratio: 3/4) {
  /*
   * Mobile Figma 375×720 — bounds complete (left/top/width/height), img umplută
   */

  .ex-page {
    --ex-topbar-top: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
    --ex-topbar-height: 38px;
    --ex-topbar-radius: 19px;
    --ex-topbar-icon: 18px;
  }

  .ex-board {
    overflow: visible;
  }

  .ex-choices {
    overflow: visible;
  }

  .ex-scene img {
    object-fit: fill;
  }

  .ex-grass {
    left: 50%;
    top: 80.14%;
    bottom: auto;
    right: auto;
    width: 691.63%;
    height: auto;
    transform: translateX(-50%);
    object-fit: fill;
    object-position: center bottom;
  }

  .ex-sun {
    left: 74.93%;
    right: -15.67%;
    top: -9.03%;
    bottom: 87.27%;
    width: auto;
    object-fit: fill;
  }

  .ex-scene img.ex-sky--desktop-left,
  .ex-scene img.ex-sky--desktop-right {
    display: none;
  }

  /* Mobile Figma Group 30 / 31 — imagini globale, bounds complete */
  .ex-scene img.ex-sky--mobile-left {
    display: block;
    left: -20.27%;
    top: 5.83%;
    width: 56.44%;
    height: 17.3%;
    object-fit: fill;
  }

  .ex-scene img.ex-sky--mobile-right {
    display: block;
    left: 62.93%;
    top: 37.78%;
    width: 56.44%;
    height: 17.3%;
    object-fit: fill;
  }

  .ex-exit {
    left: 3.72%;
    width: var(--ex-topbar-height);
    min-width: var(--ex-topbar-height);
    padding: 0;
    gap: 0;
    font-size: 15.5px;
    background: rgba(255, 255, 255, 0.92);
  }

  .ex-exit__label {
    display: none;
  }

  .ex-review-banner {
    top: calc(var(--ex-topbar-top) + var(--ex-topbar-height) + 8px);
    font-size: 13px;
    padding: 8px 14px;
  }

  .ex-finish {
    right: 3.72%;
    width: auto;
    padding: 0 14px 0 12px;
    gap: 7px;
    font-size: 15.5px;
    line-height: 1;
    background-color: #0744b4;
    opacity: 1;
    box-shadow: none;
    filter: none;
  }

  .ex-finish:disabled {
    opacity: 1;
    background-color: #8aa8d4;
  }

  .ex-prompt {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    left: 2.93%;
    top: 5.83%;
    right: 2.93%;
    width: auto;
    height: auto;
    animation: none;
    z-index: 8;
  }

  .ex-prompt-hit {
    display: none;
  }

  .ex-choices {
    z-index: 30;
  }

  .ex-choice {
    z-index: 31;
  }

  .ex-prompt-balloon--desktop { display: none; }

  .ex-prompt-balloon--mobile {
    display: block;
    position: relative;
    flex: 0 0 37.35%;
    width: 37.35%;
    height: auto;
    aspect-ratio: 140 / 210;
    left: auto;
    top: auto;
    inset: auto;
    object-fit: contain;
    z-index: 2;
  }

  .ex-prompt-card {
    position: relative;
    flex: 0 0 70.34%;
    width: 70.34%;
    max-width: none;
    left: auto;
    top: auto;
    margin-top: 10.7%;
    margin-left: -18.36%;
    height: auto;
    min-height: max(18vh, 96px);
    aspect-ratio: unset;
    padding: 10px 12px 10px 14%;
    gap: 6px;
    background: #fff;
    border: 1.22px solid #0b273f;
    border-radius: 18px 18px 18px 0;
    box-shadow: 0 7px 11px -7px rgba(0, 0, 0, 0.1);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1;
    overflow: visible;
    pointer-events: auto;
    cursor: pointer;
  }

  .ex-prompt-text {
    width: 92%;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.22;
    text-align: center;
  }

  .ex-page--grupuri .ex-prompt-text {
    font-size: 14px;
    line-height: 1.2;
  }

  .ex-prompt-play {
    align-self: center;
    width: 22.8%;
    max-width: 56px;
    pointer-events: auto;
  }

  .ex-choice {
    width: 20.27%;
    height: auto;
    aspect-ratio: 106 / 221;
    animation: ex-float 3.8s ease-in-out infinite;
    overflow: visible;
  }

  .ex-choice__svg {
    width: 100%;
    height: auto;
    display: block;
  }

  /* Baloane alegere — poziții Figma, proporții păstrate */
  .ex-choice--0 { left: 4.8%;  top: 39.61%; animation-delay: 0s; }
  .ex-choice--1 { left: 41.33%; top: 31.81%; animation-delay: 0.5s; }
  .ex-choice--2 { left: 20.27%; top: 56.75%; animation-delay: 0.9s; }
  .ex-choice--3 { left: 73%;   top: 42.83%; animation-delay: 0.3s; }
  .ex-choice--4 { left: 52%;   top: 62.19%; animation-delay: 1.1s; }
}

/* Telefon portrait — text 79% width, padding pentru balon */
@media (max-aspect-ratio: 3/4) and (max-width: 599px) {
  .ex-prompt-card {
    margin-top: 8%;
    margin-left: -14%;
    padding-left: 8%;
    min-height: max(17vh, 88px);
  }

  .ex-prompt-text {
    width: 79%;
    font-size: 15px;
  }

  .ex-page--grupuri .ex-prompt-text {
    font-size: 14px;
  }

  .ex-choice--0 { top: 44.61%; }
  .ex-choice--1 { top: 37.81%; }
  .ex-choice--2 { top: 61.75%; }
  .ex-choice--3 { top: 47.83%; }
  .ex-choice--4 { top: 67.19%; }
}

/* Tablet portrait (iPad Mini) — 20px, padding stânga pentru balon */
@media (max-aspect-ratio: 3/4) and (min-width: 600px) {
  .ex-prompt-card {
    padding: 12px 14px 12px 16%;
    min-height: max(16vh, 110px);
  }

  .ex-prompt-text {
    width: 100%;
    font-size: 20px;
    line-height: 1.2;
  }

  .ex-page--grupuri .ex-prompt-text {
    font-size: 18px;
    line-height: 1.18;
  }

  .ex-choice--0 { top: 45.61%; }
  .ex-choice--1 { top: 38.81%; }
  .ex-choice--2 { top: 62.75%; }
  .ex-choice--3 { top: 48.83%; }
  .ex-choice--4 { top: 68.19%; }
}

/* Landscape îngust — balon scalat (desktop fix nu încape) */
@media (orientation: landscape) and (max-height: 500px) {
  .ex-prompt {
    top: 6%;
    width: min(30vw, calc(56vh * 369 / 661));
    height: auto;
    aspect-ratio: 369 / 661;
  }

  .ex-prompt-card {
    left: 4%;
    top: 54%;
    width: 92%;
    height: 48%;
    padding: 5% 8%;
    gap: 0.25em;
    overflow: hidden;
  }

  .ex-prompt-text {
    width: 100%;
    font-size: clamp(9px, 1.3vw, 13px);
    line-height: 1.15;
  }

  .ex-page--grupuri .ex-prompt-text {
    font-size: clamp(8px, 1.15vw, 12px);
  }

  .ex-prompt-play {
    width: 28%;
    max-width: 42px;
  }
}

@keyframes ex-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes ex-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

@keyframes ex-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-12px) rotate(-5deg); }
  30% { transform: translateX(12px) rotate(5deg); }
  45% { transform: translateX(-10px); }
  60% { transform: translateX(10px); }
}

@keyframes ex-glow {
  0%, 100% { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.1)); }
  50% { filter: drop-shadow(0 0 24px rgba(47, 137, 200, 0.55)); }
}

@keyframes ex-confetti {
  0% { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* —— Statistici & raport la ieșire —— */
.ex-stats-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}

.ex-stats-tab,
.ex-stats-drawer,
.ex-report-overlay {
  pointer-events: auto;
}

.ex-stats-tab {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 18px 0 0 18px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: -2px 0 12px rgba(47, 137, 200, 0.18);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
  color: #2a2706;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ex-stats-tab:hover,
.ex-stats-panel--open .ex-stats-tab {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -4px 0 18px rgba(47, 137, 200, 0.24);
}

.ex-stats-tab__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #2f89c8;
}

.ex-stats-tab__icon svg {
  width: 100%;
  height: 100%;
}

.ex-stats-tab__label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.02em;
}

.ex-stats-drawer {
  width: min(92vw, 360px);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfe 100%);
  border-left: 1px solid rgba(47, 137, 200, 0.14);
  box-shadow: -8px 0 32px rgba(11, 39, 63, 0.12);
  padding: 18px 16px 20px;
  overflow: auto;
}

.ex-stats-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(47, 137, 200, 0.12);
}

.ex-stats-header__eyebrow {
  margin: 0 0 4px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2f89c8;
}

.ex-stats-header__title {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #364153;
}

.ex-stats-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  color: #364153;
}

.ex-stats-close svg {
  width: 18px;
  height: 18px;
}

.ex-stats-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ex-stats-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ex-stats-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 10px 6px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(47, 137, 200, 0.1);
  box-shadow: 0 4px 14px rgba(47, 137, 200, 0.08);
}

.ex-stats-card__value {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.ex-stats-card__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  color: #5b6b7c;
}

.ex-stats-card--good .ex-stats-card__value { color: #2a9d4e; }
.ex-stats-card--bad .ex-stats-card__value { color: #df4b4b; }
.ex-stats-card--acc .ex-stats-card__value { color: #2f89c8; }

.ex-stats-section--fails {
  padding: 12px;
  border-radius: 18px;
  background: #fff5f5;
  border: 1px solid rgba(223, 75, 75, 0.18);
}

.ex-stats-section__title--fail {
  color: #c0392b;
}

.ex-stats-item--has-fail {
  border-color: rgba(223, 75, 75, 0.22);
  background: #fffafa;
}

.ex-stats-item__fail {
  margin: 8px 0;
}

.ex-stats-item__fail-label {
  display: block;
  margin-bottom: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c0392b;
}

.ex-stats-item__ok {
  margin-top: 4px;
}

.ex-report-fails {
  margin-top: 4px;
}

.ex-report-fails__banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0f0 0%, #ffe3e3 100%);
  border: 1px solid rgba(223, 75, 75, 0.22);
}

.ex-report-fails__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #df4b4b;
  color: #fff;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(223, 75, 75, 0.28);
}

.ex-report-fails__title {
  margin: 0 0 4px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: #b42318;
}

.ex-report-fails__sub {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #7a2e2e;
}

.ex-report-fails__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ex-fail-card {
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(223, 75, 75, 0.2);
  border-left: 5px solid #df4b4b;
  box-shadow: 0 4px 14px rgba(223, 75, 75, 0.08);
}

.ex-fail-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ex-fail-card__row--wrong {
  align-items: flex-start;
}

.ex-fail-card__label {
  flex: 0 0 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8a4a4a;
}

.ex-fail-card__row--target .ex-fail-card__label {
  color: #2f89c8;
}

.ex-fail-card__row--wrong .ex-fail-card__label {
  color: #c0392b;
}

.ex-fail-card__target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #5b9fd4 0%, #2f89c8 100%);
  color: #fff;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(47, 137, 200, 0.24);
}

.ex-page--grupuri .ex-fail-card__target {
  font-size: 0.95rem;
}

.ex-fail-card__picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ex-fail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #df4b4b;
  color: #fff;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(223, 75, 75, 0.25);
}

.ex-page--grupuri .ex-fail-pill {
  font-size: 0.82rem;
}

.ex-fail-card__fix {
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed rgba(223, 75, 75, 0.16);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  color: #22884a;
}

.ex-fail-card__fix--pending {
  color: #b45309;
}

.ex-stats-section__title {
  margin: 0 0 10px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  color: #364153;
}

.ex-stats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ex-stats-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(47, 137, 200, 0.1);
  box-shadow: 0 2px 10px rgba(47, 137, 200, 0.06);
}

.ex-stats-item__letter {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5b9fd4 0%, #2f89c8 100%);
  color: #fff;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(47, 137, 200, 0.28);
}

.ex-page--grupuri .ex-stats-item__letter {
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.ex-stats-item__body {
  flex: 1;
  min-width: 0;
}

.ex-stats-item__title {
  display: block;
  margin-bottom: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a8796;
}

.ex-stats-item__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ex-stats-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.ex-stats-chip--wrong {
  background: #ffe8e8;
  color: #c0392b;
}

.ex-stats-chip--ok {
  background: #e8f8ee;
  color: #22884a;
}

.ex-stats-empty {
  margin: 0;
  padding: 16px 14px;
  border-radius: 16px;
  text-align: center;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #364153;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed rgba(47, 137, 200, 0.22);
}

.ex-stats-empty--celebrate {
  color: #22884a;
  background: #eefbf3;
  border-style: solid;
  border-color: rgba(34, 136, 74, 0.18);
}

.ex-stats-cards--history {
  margin-bottom: 12px;
}

.ex-report-section__title {
  margin: 0 0 10px;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #364153;
}

.ex-report-history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(47, 137, 200, 0.14);
}

.ex-report-history__intro,
.ex-report-history__sub {
  margin: 0 0 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  color: #5b6b7c;
  line-height: 1.45;
}

.ex-report-history__list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ex-report-history__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(47, 137, 200, 0.12);
}

.ex-report-history__game {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #2f89c8;
}

.ex-report-history__stats {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.84rem;
  color: #364153;
  line-height: 1.4;
}

.ex-report-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}

.ex-report--drawer {
  position: relative;
  width: min(100%, 520px);
  max-height: min(88vh, calc(100dvh - 32px));
  overflow: auto;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbfe 100%);
  border: 1px solid rgba(47, 137, 200, 0.14);
  border-radius: 24px;
  padding: 24px 20px 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  animation: ex-modal-in 0.24s ease-out;
}

@keyframes ex-modal-in {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.ex-report__dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 39, 63, 0.08);
  color: #364153;
  cursor: pointer;
}

.ex-report__dismiss svg {
  width: 18px;
  height: 18px;
}

.ex-report__note {
  margin: 0 0 10px;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #22884a;
}

.ex-report__badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd166 0%, #ff751f 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 117, 31, 0.35);
}

.ex-report__badge svg {
  width: 26px;
  height: 26px;
}

.ex-report__title {
  margin: 0 0 6px;
  text-align: center;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: #ff751f;
}

.ex-report__intro {
  margin: 0 0 16px;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  color: #5b6b7c;
}

.ex-stats-cards--report {
  margin-bottom: 16px;
}

.ex-stats-section--report {
  margin-top: 4px;
}

.ex-report--compact {
  width: min(100%, 400px);
  max-height: min(72vh, calc(100dvh - 32px));
  padding: 18px 16px 16px;
}

.ex-report--compact .ex-report__title {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.ex-report--compact .ex-report__note {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: #5b6b7c;
}

.ex-stats-cards--compact {
  margin-bottom: 10px;
}

.ex-stats-cards--compact .ex-stats-card {
  min-height: 54px;
  padding: 8px 4px;
  border-radius: 12px;
}

.ex-stats-cards--compact .ex-stats-card__value {
  font-size: 1.15rem;
}

.ex-stats-cards--compact .ex-stats-card__label {
  font-size: 9px;
}

.ex-stats-compact-fails {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff5f5;
  border: 1px solid rgba(223, 75, 75, 0.14);
  max-height: 110px;
  overflow-y: auto;
  list-style: none;
}

.ex-stats-compact-fails__item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.82rem;
  color: #364153;
}

.ex-stats-compact-fails__item + .ex-stats-compact-fails__item {
  border-top: 1px solid rgba(223, 75, 75, 0.1);
}

.ex-stats-compact-fails__target {
  font-family: 'Nunito', system-ui, sans-serif;
  font-weight: 800;
  color: #2a9d4e;
}

.ex-stats-compact-fails__sep {
  color: #9aa5b1;
}

.ex-stats-compact-fails__wrong {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ex-fail-pill--compact {
  padding: 2px 6px;
  font-size: 0.72rem;
  border-radius: 8px;
}

.ex-stats-compact-history {
  margin: 0 0 12px;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  color: #6b7c8f;
  line-height: 1.35;
}

.ex-report-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ex-report-actions__row {
  display: flex;
  gap: 8px;
}

.ex-report-actions--stack {
  flex-direction: column;
}

.ex-report-actions--row {
  flex-direction: row;
}

@media (min-width: 600px) {
  .ex-report-overlay {
    padding: 20px;
  }
}

.ex-report-btn {
  flex: 1;
  border: 0;
  border-radius: 18px;
  padding: 13px 12px;
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(47, 137, 200, 0.12);
}

.ex-report-btn--stay {
  background: #fff;
  color: #2f89c8;
  border: 1px solid rgba(47, 137, 200, 0.18);
}

.ex-report-btn--resume {
  background: #fff;
  color: #2f89c8;
  border: 1px solid rgba(47, 137, 200, 0.18);
}

.ex-report-btn--review {
  background: transparent;
  color: #ff751f;
  border: 1px solid rgba(255, 117, 31, 0.35);
  box-shadow: none;
  padding: 10px 12px;
  font-size: 0.84rem;
}

.ex-report-btn--close-game {
  background: linear-gradient(145deg, #5b9fd4 0%, #2f89c8 100%);
  color: #fff;
}

.ex-report-btn--leave {
  background: linear-gradient(145deg, #5b9fd4 0%, #2f89c8 100%);
  color: #fff;
  flex: 1.15;
}

.ex-report-btn--new {
  background: #fff;
  color: #2f89c8;
  border: 1px solid rgba(47, 137, 200, 0.22);
  box-shadow: none;
  flex: 1;
}

@media (max-width: 380px) {
  .ex-stats-cards {
    grid-template-columns: 1fr;
  }

  .ex-stats-card {
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 14px;
  }

  .ex-stats-card__label {
    text-align: right;
    font-size: 12px;
  }
}
