.math-platform {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem 2rem;
}

.math-platform--embed {
  padding: 0.65rem 0.5rem 0.85rem;
  box-shadow: none;
  background: transparent;
}

.math-platform--hero {
  padding: 0.35rem 0.35rem 0.45rem;
  overflow: hidden;
  max-height: 100%;
}

.math-platform--hero.math-platform--embed {
  padding: 0.25rem 0.2rem 0.35rem;
}

/* Hero-demo: geen tabs, alleen het spel-panel */
.math-platform--hero .tab-nav {
  display: none;
}

.math-platform--hero .tab-panel[data-tab="progress"],
.math-platform--hero .tab-panel[data-tab="other"] {
  display: none !important;
}

body.math-embed-body {
  padding: 0;
  background: transparent;
}

body.math-embed-body #app {
  max-width: none;
}

.math-platform__tabs {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Tabs */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.2rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
}

.tab-nav__btn {
  flex: 1 1 auto;
  min-width: 6rem;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-nav__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.tab-nav__btn--active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tab-panel {
  min-height: 12rem;
}

.tab-panel[hidden] {
  display: none !important;
}

/* Shared header (timer / progress / mode) */
.app-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.app-header__block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.app-header__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.app-header__value,
.app-header__value-text {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.app-header__progress-slot {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-header__steps {
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.timer-display {
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 6px;
  background: rgba(43, 127, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #5aa7ff);
  border-radius: 99px;
  transition: width 0.25s ease;
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn--primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed rgba(90, 111, 130, 0.35);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
}

/* Other games tab */
.other-games__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.other-games__text {
  margin: 0 0 1rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 52ch;
}

.other-games__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.game-card {
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 1rem;
  border: 1px solid rgba(43, 127, 255, 0.12);
}

.game-card__name {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.game-card__desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}
