@import url("../styles-shared.css");

.subtitle {
  font-size: 1.1rem;
  color: var(--llm-muted);
  margin: 0 0 1rem;
}

.game-intro h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--llm-navy);
}

.game-intro__block {
  margin-bottom: 0.75rem;
}

.game-intro__block h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--llm-navy);
}

.game-intro__block p,
.game-intro__block ul {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.5;
}

.game-intro__block ul {
  padding-left: 1.25rem;
}

.game-intro__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  padding: 0;
}

.game-intro__skills li {
  background: #e8f2fc;
  border: 1px solid #b8cfe6;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.game-intro__hint {
  margin: 0.75rem 0 1rem;
  padding: 0.65rem 0.85rem;
  background: #fff8e6;
  border-radius: 8px;
  font-size: 1.02rem;
}

.llmzee-start-btn {
  min-height: 3rem;
  font-size: 1.1rem;
}

#gamePanel {
  margin-top: 0.5rem;
}

.sound-toggle-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.sound-toggle {
  min-height: 3rem;
  padding: 0.5rem 1.1rem;
  font-size: 1.05rem;
  font-weight: 700;
  border: 2px solid #c5d4e4;
  border-radius: 10px;
  background: #fff;
  color: var(--llm-navy);
  cursor: pointer;
}

.sound-toggle--on {
  border-color: var(--llm-accent);
  background: #e8f2fc;
}

.sound-toggle__hint {
  font-size: 0.92rem;
  color: var(--llm-muted);
}

.reflection-style-picker,
.difficulty-picker {
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.85rem;
  background: #f8fafc;
  border: 2px solid var(--llm-border);
  border-radius: 12px;
}

.reflection-style-picker__title,
.difficulty-picker__title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.reflection-style-picker__hint,
.difficulty-picker__hint {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  color: var(--llm-muted);
}

.reflection-style-picker__grid,
.difficulty-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.reflection-style-btn,
.difficulty-btn {
  min-height: 2.85rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.98rem;
  font-weight: 700;
  border: 2px solid #c5d4e4;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.reflection-style-btn--active,
.difficulty-btn--active {
  border-color: var(--llm-accent);
  background: #e8f2fc;
}

.llmzee-play-area {
  text-align: center;
  margin-bottom: 1rem;
}

.roll-status {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--llm-navy);
  margin: 0 0 0.75rem;
}

.dice-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.die-btn {
  width: 4.75rem;
  height: 4.75rem;
  min-width: 3.5rem;
  min-height: 3.5rem;
  border: 3px solid #d4dee8;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
  flex-shrink: 0;
}

.die-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.die-btn--held {
  border-color: var(--llm-accent);
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(10, 92, 173, 0.2);
}

.die-btn:disabled {
  opacity: 0.9;
  cursor: default;
}

.die-face__num {
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.die-face__num--0 {
  color: #6b7c8f;
}

.die-btn--v0 {
  border-color: #d4dee8;
  background: #f8fafc;
}

.die-face__num--1 {
  color: #b71c1c;
}

.die-face__num--2 {
  color: #e65100;
}

.die-face__num--3 {
  color: #b8860b;
}

.die-face__num--4 {
  color: #2e7d32;
}

.die-face__num--5 {
  color: #1565c0;
}

.die-face__num--6 {
  color: #6a1b9a;
}

.llmzee-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.llmzee-roll-btn {
  min-height: 3.1rem;
  min-width: 10rem;
  font-size: 1.1rem;
}

.score-summary {
  margin: 0.75rem auto 0;
  max-width: 20rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 2px solid var(--llm-border);
  border-radius: 12px;
  text-align: left;
}

.score-summary__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
}

.score-summary__line:last-of-type {
  margin-bottom: 0;
}

.score-summary__label {
  color: var(--llm-muted);
  font-weight: 600;
}

.score-summary__value {
  font-size: 1.2rem;
  color: var(--llm-navy);
  font-variant-numeric: tabular-nums;
}

.score-summary__banner {
  margin: 0.65rem 0 0;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #fff8e6;
  border: 2px solid #c4a84a;
  color: #5c4a1a;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
}

.llmzee-columns {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .llmzee-columns {
    grid-template-columns: 1fr 1fr;
  }
}

.possible-scores-card,
.score-sheet-card {
  background: #f4f8fc;
  border: 2px solid var(--llm-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.possible-scores-card h3,
.score-sheet-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--llm-navy);
}

.upper-bonus-progress {
  margin: 0 0 0.65rem;
  padding: 0.6rem 0.75rem;
  background: #fff8e6;
  border: 2px solid #e6d9a8;
  border-radius: 10px;
}

.upper-bonus-progress__line {
  margin: 0 0 0.3rem;
  font-size: 0.98rem;
  line-height: 1.4;
  color: #5c4a1a;
}

.upper-bonus-progress__line:last-child {
  margin-bottom: 0;
}

.upper-bonus-progress__line--earned {
  font-weight: 700;
  color: #2e7d32;
}

.bonus-alert {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  background: #eef6ff;
  border: 2px solid #8eb8e8;
  border-radius: 10px;
}

.bonus-alert--minimal {
  background: #f8fafc;
  border-color: var(--llm-border);
}

.bonus-alert__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--llm-navy);
}

.bonus-alert__text {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--llm-text);
}

.bonus-alert__text:last-child {
  margin-bottom: 0;
}

.bonus-alert__text--muted {
  color: var(--llm-muted);
  font-size: 0.9rem;
}

.bonus-alert__text--chance {
  font-style: italic;
  color: #4a5f73;
}

.score-row--summary {
  background: #f0f4f8;
  font-weight: 700;
}

.score-row--summary .score-row__label {
  color: var(--llm-navy);
}

.score-row--bonus-earned .score-row__val {
  color: #2e7d32;
}

.score-row--upper.score-row--used {
  border-left: 3px solid #e6d9a8;
}

.possible-scores__item--upper-help .possible-scores__btn {
  border-color: #d4b86a;
  background: #fffbf0;
}

.possible-scores__item--upper-bonus.possible-scores__item--best .possible-scores__btn,
.possible-scores__item--upper-bonus .possible-scores__btn {
  border-color: #c9a227;
  box-shadow: inset 0 0 0 1px #e6d9a866;
}

.possible-scores__tag--bonus {
  color: #8a5a00;
  font-weight: 700;
}

.possible-scores__hint {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  color: var(--llm-muted);
}

.possible-scores__empty {
  margin: 0;
  font-size: 0.98rem;
  color: var(--llm-muted);
}

.possible-scores__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

.possible-scores__item {
  margin-bottom: 0.4rem;
}

.possible-scores__btn {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-height: 2.85rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid #c5d4e4;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
}

.possible-scores__item--qualify .possible-scores__btn {
  background: #f3f9f0;
  border-color: #9ec9a8;
}

.possible-scores__item--none .possible-scores__btn {
  background: #fafbfc;
  border-color: #e2e8ef;
  opacity: 0.92;
}

.possible-scores__item--best .possible-scores__btn {
  border-color: #2e7d32;
  background: #e8f5e9;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

@keyframes llmzee-best-glow {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
  }
  50% {
    box-shadow: 0 2px 14px rgba(46, 125, 50, 0.28);
  }
}

.possible-scores__item--best .possible-scores__btn {
  animation: llmzee-best-glow 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .possible-scores__item--best .possible-scores__btn {
    animation: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.25);
  }
}

.possible-scores__name {
  font-weight: 600;
  color: var(--llm-navy);
  flex: 1 1 auto;
  min-width: 0;
}

.possible-scores__pts {
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--llm-muted);
  flex-shrink: 0;
}

.possible-scores__pts--qualify {
  color: #2e7d32;
}

.possible-scores__pts--best {
  color: #1b5e20;
  font-size: 1.15rem;
}

.possible-scores__tag {
  font-size: 0.82rem;
  font-weight: 700;
  flex: 1 1 100%;
  text-align: right;
}

.possible-scores__tag--good {
  color: var(--llm-success);
}

.possible-scores__tag--low {
  color: var(--llm-muted);
}

.possible-scores__tag--best {
  color: #1b5e20;
}

.score-sheet {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.98rem;
}

.score-row--used {
  background: #e8f2fc;
  color: var(--llm-muted);
}

.score-row__label {
  font-weight: 600;
}

.score-row__val {
  font-weight: 800;
}

.game-outcome-panel {
  margin-top: 1rem;
}

.game-result {
  padding: 1rem;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  background: #e6f6ea;
  border: 2px solid #5a9e6f;
  color: var(--llm-success);
}

.game-reflection {
  margin-top: 0.65rem;
  padding: 1rem;
  border-radius: 12px;
  background: #f4f8fc;
  border: 2px solid #b8cfe6;
}

.game-reflection__title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.game-reflection__disclaimer {
  font-size: 0.88rem;
  color: var(--llm-muted);
  margin: 0 0 0.65rem;
}

.game-reflection__line {
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.game-reflection__copy-status {
  font-size: 0.85rem;
  color: var(--llm-muted, #5a6a7a);
  margin: 0.5rem 0 0;
  min-height: 1.25em;
}

.game-reflection__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.game-reflection--senior .game-reflection__line {
  font-size: 1.18rem;
}

.game-reflection--child .game-reflection__line {
  font-size: 1.1rem;
}

@media (max-width: 700px) {
  .llm-applet-main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    overflow-x: hidden;
  }

  .die-btn {
    width: 3.6rem;
    height: 3.6rem;
  }

  .dice-row {
    gap: 0.5rem;
    max-width: 100%;
  }

  .possible-scores-card,
  .score-sheet-card {
    overflow-x: hidden;
  }

  .possible-scores__btn {
    font-size: 0.98rem;
  }

  .reflection-style-picker__grid,
  .difficulty-picker__grid {
    grid-template-columns: 1fr;
  }

  .llmzee-columns {
    grid-template-columns: 1fr;
  }
}
