/**
 * game-mode.css
 * Last modified: v017.045
 * The Desire Game — Unlock Mode styling
 * Match Hub + Setup + Category Selector + Play + Reveal + Results
 * Three-pillar scoring: Knowledge + Compatibility + Experience
 */

/* ==========================================
   Match Hub (3-card choice screen)
   Styled to match the home screen layout
   ========================================== */

.match-hub-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  gap: 1.5rem;
}

.match-hub-title {
  font-family: 'Josefin Sans', 'Source Sans 3', sans-serif;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--theme-text-primary);
  text-align: center;
  margin-bottom: 0;
}

.match-hub-subtitle {
  font-family: 'Josefin Sans', 'Source Sans 3', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--theme-text-muted, rgba(255, 255, 255, 0.45));
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.match-hub-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.match-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 2rem;
  min-height: 120px;
  background: color-mix(in srgb, var(--theme-bg-secondary) 75%, transparent);
  border: 1px solid var(--theme-border-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: inherit;
  color: inherit;
}

.match-hub-card:hover {
  background: color-mix(in srgb, var(--theme-bg-hover) 80%, transparent);
  border-color: var(--theme-accent-action);
  transform: translateY(-2px);
}

.match-hub-card:active {
  transform: translateY(0);
  background: var(--theme-bg-active);
}

.match-hub-card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
}

.match-hub-card-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--theme-text-primary);
  fill: none;
  stroke-width: 1.5;
}

.match-hub-card-title {
  font-family: 'Josefin Sans', 'Source Sans 3', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--theme-text-primary);
  text-align: center;
  line-height: 1.4;
}

.match-hub-card-desc {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--theme-text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

.match-hub-back-btn {
  display: block;
  margin: 0.5rem auto 0;
  padding: 0.6rem 1.5rem;
  background: transparent;
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15));
  border-radius: 0.5rem;
  color: var(--theme-text-secondary, #aaa);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.match-hub-back-btn:hover {
  background: rgba(255,255,255,0.05);
}

/* Mobile adjustments */
@media (max-height: 600px) {
  .match-hub-card {
    min-height: 100px;
    padding: 1rem 1.5rem;
  }
  .match-hub-card-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
  }
  .match-hub-card-title {
    font-size: 1rem;
  }
  .match-hub-title {
    font-size: 1.5rem;
  }
}

/* ==========================================
   Game Setup (profile loading + start)
   ========================================== */

.game-setup-view {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
}

.game-setup-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--theme-text-title, #fff);
  margin-bottom: 0.25rem;
}

.game-setup-subtitle {
  font-size: 0.95rem;
  color: var(--theme-text-secondary, #aaa);
  margin-bottom: 1.5rem;
}

/* Game Setup Intro/Explanation */
.game-setup-intro {
  text-align: left;
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.1));
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.game-setup-intro-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--theme-text-title, #fff);
  margin: 0 0 0.5rem 0;
}

.game-setup-intro-title:nth-of-type(2) {
  margin-top: 1rem;
}

.game-setup-intro-text {
  font-size: 0.88rem;
  color: var(--theme-text-secondary, #bbb);
  line-height: 1.5;
  margin: 0 0 0.25rem 0;
}

.game-setup-intro-steps {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.game-setup-intro-step {
  font-size: 0.85rem;
  color: var(--theme-text-secondary, #bbb);
  padding: 0.3rem 0;
  line-height: 1.4;
}

.game-setup-profiles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.game-setup-profile-btn {
  flex: 1;
  max-width: 180px;
  padding: 1rem;
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border: 2px dashed var(--theme-border-primary, rgba(255,255,255,0.2));
  border-radius: 1rem;
  color: var(--theme-text, #ccc);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.game-setup-profile-btn:hover {
  border-color: var(--theme-accent, #3d8c73);
  background: rgba(255,255,255,0.04);
}

.game-setup-profile-btn.loaded {
  border-style: solid;
  border-color: var(--match-green, #16a34a);
  background: rgba(22, 163, 74, 0.08);
}

.game-setup-profile-btn .profile-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--theme-text-title, #fff);
}

.game-setup-profile-btn .profile-check {
  color: var(--match-green, #16a34a);
  font-size: 1.2rem;
}

.game-setup-vs {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--theme-text-muted, #666);
  text-transform: uppercase;
}

.game-setup-start-btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: var(--theme-accent, #3d8c73);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-bottom: 1rem;
}

.game-setup-start-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.game-setup-start-btn:not(:disabled):hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.game-setup-back-btn {
  display: block;
  margin: 0.5rem auto 0;
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15));
  border-radius: 0.5rem;
  color: var(--theme-text-secondary, #aaa);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.game-setup-back-btn:hover {
  background: rgba(255,255,255,0.05);
}

/* Resume game banner */
.game-resume-banner {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(61, 140, 115, 0.1);
  border: 1px solid var(--theme-accent, #3d8c73);
  border-radius: 0.75rem;
  text-align: center;
}

.game-resume-banner p {
  color: var(--theme-text, #ccc);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.game-resume-btn {
  padding: 0.5rem 1.5rem;
  background: var(--theme-accent, #3d8c73);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0 0.25rem;
}

.game-resume-btn--secondary {
  background: transparent;
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15));
  color: var(--theme-text-secondary, #aaa);
}

/* ==========================================
   Category Selector
   ========================================== */

.game-categories-view {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.game-categories-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.game-categories-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--theme-text-title, #fff);
  margin-bottom: 0.25rem;
}

.game-categories-subtitle {
  font-size: 0.85rem;
  color: var(--theme-text-secondary, #aaa);
}

.game-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.game-category-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.1));
  border-radius: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}

.game-category-card:hover {
  transform: translateX(4px);
  border-color: var(--theme-accent, #3d8c73);
}

.game-category-card--played {
  border-color: var(--match-green, #16a34a);
  background: rgba(22, 163, 74, 0.06);
}

.game-category-card--played:hover {
  border-color: var(--match-green, #16a34a);
}

.game-category-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.game-category-info {
  flex: 1;
  min-width: 0;
}

.game-category-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--theme-text-title, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-category-count {
  font-size: 0.78rem;
  color: var(--theme-text-secondary, #aaa);
  margin-top: 0.1rem;
}

.game-category-stats {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.game-category-stat {
  font-size: 0.72rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  font-weight: 600;
}

.game-category-stat--sync {
  background: rgba(22, 163, 74, 0.15);
  color: var(--match-green, #16a34a);
}

.game-category-stat--close {
  background: rgba(245, 158, 11, 0.15);
  color: var(--match-yellow, #f59e0b);
}

.game-category-stat--surprise {
  background: rgba(139, 90, 107, 0.15);
  color: var(--theme-accent-surprise, #8b5a6b);
}

.game-category-arrow {
  flex-shrink: 0;
  color: var(--theme-text-muted, #666);
}

/* Overall stats footer */
.game-overall-stats {
  text-align: center;
  padding: 1rem;
  background: var(--theme-card-bg, rgba(255,255,255,0.04));
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.game-overall-stats-text {
  font-size: 0.85rem;
  color: var(--theme-text-secondary, #aaa);
  margin-bottom: 0.5rem;
}

.game-overall-stats-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.game-overall-stats-bar-fill {
  height: 100%;
  background: var(--match-green, #16a34a);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.game-overall-score {
  font-size: 1rem;
  font-weight: 700;
  color: var(--theme-text-title, #fff);
}

.game-categories-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================
   Game Play (per-question prediction)
   Reuses guided flow layout (focus-mode classes)
   ========================================== */

/* Game play page — inherits from .category.focus-mode.question-page */
.game-play-page {
  padding-bottom: 12rem; /* Space for the fixed bottom panel */
}

/* === Fixed bottom panel (above nav bar) === */
.game-play-fixed-bottom {
  position: fixed;
  bottom: calc(var(--bar-h) + 0.25rem);
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--theme-bg-primary);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  padding: 0;
}

.game-play-fixed-bottom::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(to bottom, transparent, var(--theme-bg-primary));
  pointer-events: none;
  z-index: 99;
}

/* Prompt + prediction buttons row — fixed height */
.game-play-prompt-row {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.4rem 0.5rem;
}

/* Your desire display — centered inline in bottom panel */
.game-play-your-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 1.25rem auto 1.75rem;
  width: auto;
}

.game-play-your-answer-label {
  font-size: 1rem;
  color: var(--theme-text, rgba(255,255,255,0.7));
  margin-right: 0;
}

.game-play-your-answer-value {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
}

.game-play-your-answer-value svg {
  width: 1.2rem;
  height: 1.2rem;
}

/* Prediction prompt */
.game-play-prompt {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--theme-text, #ccc);
  text-align: center;
  margin: 0 0 0.35rem;
}

/* Desire prediction buttons — all 7 in one row */
.game-play-options {
  display: flex;
  gap: 0.3rem;
  margin: 0;
}

.game-play-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.15rem 0.3rem;
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border: 2px solid transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--theme-text, #ccc);
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  min-width: 0;
}

.game-play-option:hover {
  transform: scale(1.05);
}

.game-play-option--selected {
  border-color: var(--option-color, var(--theme-accent, #3d8c73));
  background: color-mix(in srgb, var(--option-color, var(--theme-accent, #3d8c73)) 15%, transparent);
  transform: scale(1.05);
}

.game-play-option .option-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  filter: brightness(0.75) opacity(0.85);
}

.game-play-option .option-icon svg {
  width: 1.6rem;
  height: 1.6rem;
}

.game-play-option .option-bar {
  width: 100%;
  height: 8px;
  min-height: 8px;
  max-height: 8px;
  background: var(--theme-scale-bar-bg, rgba(255, 255, 255, 0.1));
  border-radius: 4px;
  transition: all 0.2s;
}

.game-play-option:hover .option-bar {
  background: var(--theme-scale-bar-hover, rgba(255, 255, 255, 0.2));
}

.game-play-option--selected .option-bar {
  background: var(--option-color, #4f46e5);
  box-shadow: 0 0 12px var(--option-color, #4f46e5);
}

.game-play-option .option-label {
  font-size: 0.75rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  color: var(--theme-scale-label-dim, rgba(255, 255, 255, 0.5));
  transition: color 0.2s;
}

/* Hover state — icon + label */
.game-play-option:hover .option-icon {
  filter: brightness(0.85) opacity(0.92);
  transform: scale(1.1);
}

.game-play-option:hover .option-label {
  color: var(--theme-scale-label-hover, rgba(255, 255, 255, 0.8));
}

/* Selected state — icon glow + bar lit + label bright */
.game-play-option--selected .option-icon {
  filter: brightness(1) opacity(1);
  transform: scale(1.15);
}

.game-play-option--selected .option-label {
  color: var(--theme-text-primary, #fff);
  font-weight: 600;
}

/* === Classic (non-boxed) mode: flat style matching TwoRowScale === */
body:not(.boxed-scale) .game-play-option {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 0.25rem;
  padding: 0.3rem 0.1rem;
}

body:not(.boxed-scale) .game-play-option--selected {
  background: transparent;
  border-color: transparent;
  transform: none;
}

/* === Boxed mode: SVG icons show color even when unselected === */
body.boxed-scale .game-play-option .option-icon {
  filter: saturate(0.7) opacity(0.6);
}

body.boxed-scale .game-play-option:hover .option-icon {
  filter: saturate(0.85) opacity(0.8);
}

body.boxed-scale .game-play-option--selected .option-icon {
  filter: drop-shadow(0 0 6px var(--option-color, var(--theme-accent, #3d8c73))) saturate(1) opacity(1);
}

/* Boxed mode: selected border + tinted background */
body.boxed-scale .game-play-option--selected {
  border-color: var(--option-color, var(--theme-accent, #3d8c73));
  background: color-mix(in srgb, var(--option-color, var(--theme-accent, #3d8c73)) 12%, transparent);
}

/* Boxed mode: hide the color bar (box provides visual feedback) */
body.boxed-scale .game-play-option .option-bar {
  display: none;
}

/* ==========================================
   Category Reveal
   ========================================== */

.game-reveal-view {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

.game-reveal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.game-reveal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--theme-text-title, #fff);
  margin-bottom: 0.5rem;
}

/* Knowledge + Compatibility summary headers */
.game-reveal-knowledge-summary {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--theme-text-title, #fff);
  margin-bottom: 0.5rem;
}

.game-reveal-compat-summary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--theme-text-secondary, #aaa);
  margin-top: 0.75rem;
  margin-bottom: 0.4rem;
}

.game-reveal-summary {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.game-reveal-summary--compat {
  margin-top: 0.25rem;
}

.game-reveal-summary-item {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

.game-reveal-summary-item--sync {
  background: rgba(22, 163, 74, 0.15);
  color: var(--match-green, #16a34a);
}

.game-reveal-summary-item--close {
  background: rgba(245, 158, 11, 0.15);
  color: var(--match-yellow, #f59e0b);
}

.game-reveal-summary-item--surprise {
  background: rgba(139, 90, 107, 0.15);
  color: var(--theme-accent-surprise, #8b5a6b);
}

.game-reveal-summary-item--compat-match {
  background: rgba(48, 115, 94, 0.15);
  color: var(--theme-accent-compat, #30735e);
}

.game-reveal-summary-item--compat-discuss {
  background: rgba(245, 158, 11, 0.15);
  color: var(--match-yellow, #f59e0b);
}

.game-reveal-summary-item--compat-limit {
  background: rgba(179, 85, 85, 0.15);
  color: var(--theme-accent-error, #b35555);
}

/* Reveal cards */
.game-reveal-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.game-reveal-card {
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.1));
  border-radius: 0.75rem;
  padding: 1rem;
  border-left: 4px solid transparent;
  perspective: 1000px;
  animation: cardReveal 0.5s ease-out;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(10px) rotateX(-5deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.game-reveal-card--sync {
  border-left-color: var(--match-green, #16a34a);
}

.game-reveal-card--close {
  border-left-color: var(--match-yellow, #f59e0b);
}

.game-reveal-card--surprise {
  border-left-color: var(--theme-accent-surprise, #8b5a6b);
}

.game-reveal-card--boundary {
  border-left-color: var(--theme-accent-error, #b35555);
}

.game-reveal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.game-reveal-card-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--theme-text-title, #fff);
  flex: 1;
}

.game-reveal-card-result {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.game-reveal-card-result--sync {
  background: rgba(22, 163, 74, 0.15);
  color: var(--match-green, #16a34a);
}

.game-reveal-card-result--close {
  background: rgba(245, 158, 11, 0.15);
  color: var(--match-yellow, #f59e0b);
}

.game-reveal-card-result--surprise {
  background: rgba(139, 90, 107, 0.15);
  color: var(--theme-accent-surprise, #8b5a6b);
}

.game-reveal-card-result--boundary {
  background: rgba(179, 85, 85, 0.15);
  color: var(--theme-accent-error, #b35555);
}

.game-reveal-card-answers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.game-reveal-answer-col {
  text-align: center;
}

.game-reveal-answer-col-label {
  font-size: 0.68rem;
  color: var(--theme-text-muted, #666);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.game-reveal-answer-col-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-weight: 600;
  color: var(--theme-text, #ccc);
}

/* Per-card compatibility badge */
.game-reveal-card-compat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  width: fit-content;
}

.game-reveal-card-context {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--theme-text-secondary, #aaa);
  font-style: italic;
  line-height: 1.4;
}

.game-reveal-card-experience {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--theme-text-muted, #888);
}

/* Reveal actions */
.game-reveal-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.game-reveal-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.game-reveal-btn--primary {
  background: var(--theme-accent, #3d8c73);
  color: #fff;
}

.game-reveal-btn--secondary {
  background: transparent;
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15));
  color: var(--theme-text-secondary, #aaa);
}

.game-reveal-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ==========================================
   Final Results
   ========================================== */

.game-results-view {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
}

.game-results-header {
  margin-bottom: 2rem;
}

.game-results-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--theme-text-secondary, #aaa);
  margin-bottom: 0.25rem;
}

.game-results-profiles {
  font-size: 0.9rem;
  color: var(--theme-text-muted, #888);
  margin-bottom: 1.5rem;
}

.game-results-score {
  margin-bottom: 0.5rem;
}

.game-results-score--knowledge {
  margin-bottom: 0.25rem;
}

.game-results-score--compat {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.game-results-score-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--theme-accent, #3d8c73);
  line-height: 1;
}

.game-results-score-value--compat {
  font-size: 2.2rem;
  color: var(--theme-accent-compat, #30735e);
}

.game-results-score-label {
  font-size: 0.9rem;
  color: var(--theme-text-secondary, #aaa);
}

/* Insight Matrix narrative */
.game-results-insight {
  margin-top: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.1));
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--theme-text, #ccc);
  line-height: 1.5;
}

.game-results-fun-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--theme-text-title, #fff);
  margin-bottom: 0.5rem;
}

.game-results-fun-subtitle {
  font-size: 0.9rem;
  color: var(--theme-text-secondary, #aaa);
  margin-bottom: 2rem;
}

/* Per-category breakdown */
.game-results-breakdown {
  text-align: left;
  margin-bottom: 2rem;
}

.game-results-breakdown-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--theme-text-secondary, #aaa);
  margin-bottom: 0.75rem;
  text-align: center;
}

/* Legend for dual bars */
.game-results-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.game-results-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--theme-text-secondary, #aaa);
}

.game-results-legend-item::before {
  content: '';
  width: 12px;
  height: 8px;
  border-radius: 3px;
}

.game-results-legend-item--knowledge::before {
  background: var(--match-green, #16a34a);
}

.game-results-legend-item--compat::before {
  background: var(--theme-accent-compat, #30735e);
}

/* Bar group (category label + two bars) */
.game-results-bar-group {
  margin-bottom: 0.75rem;
}

.game-results-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.game-results-bar-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--theme-text, #ccc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.game-results-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.game-results-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.game-results-bar-percent {
  flex: 0 0 36px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--theme-text-muted, #888);
}

/* Highlights */
.game-results-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.game-results-highlight {
  padding: 1rem;
  background: var(--theme-card-bg, rgba(255,255,255,0.06));
  border-radius: 0.75rem;
  text-align: center;
}

.game-results-highlight-label {
  font-size: 0.72rem;
  color: var(--theme-text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.game-results-highlight-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--theme-text-title, #fff);
}

/* Action buttons */
.game-results-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.game-results-btn {
  width: 100%;
  max-width: 280px;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.game-results-btn--primary {
  background: var(--theme-accent, #3d8c73);
  color: #fff;
}

.game-results-btn--secondary {
  background: transparent;
  border: 1px solid var(--theme-border-primary, rgba(255,255,255,0.15));
  color: var(--theme-text-secondary, #aaa);
}

.game-results-btn:hover {
  opacity: 0.9;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 400px) {
  .game-results-highlights {
    grid-template-columns: 1fr;
  }
}
