/* Ember & Aqua — co-op platformer (shared multiplayer UI in ../mp.css) */

.duo-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

/* ---------- Level header ---------- */
.level-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
}

.level-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  flex-shrink: 0;
}

.level-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.level-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.level-stats .stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Stage ---------- */
.stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #2b2d42;
}

#stage {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.stage-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.stage-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 14px 34px;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- Touch controls ---------- */
.pad-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
}

.pad-side {
  display: flex;
  gap: 10px;
}

.pad-btn {
  width: 84px;
  height: 62px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.pad-btn:active {
  background: var(--ink);
  color: #fff;
}

.pad-jump {
  width: 150px;
  display: grid;
  place-items: center;
  line-height: 1;
  gap: 2px;
  background: #6d5bd0;
  border-color: #6d5bd0;
  color: #fff;
}

.pad-jump span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.pad-jump:active {
  background: #5243a8;
}

.pad-you {
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
}

.role-fire { color: #d94f16; }
.role-water { color: #1d6fb8; }

/* ---------- Level select on the win screen ---------- */
.level-select {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 4px;
}

.level-chip {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.level-chip:hover,
.level-chip.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.start-level {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.start-level-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.start-level .level-select {
  margin: 0;
  justify-content: flex-start;
}

.start-level .level-chip {
  min-width: 38px;
  padding: 8px 10px;
}

@media (max-width: 900px) {
  .level-hint { display: none; }

  .pad-btn { width: 72px; height: 56px; }

  .pad-jump { width: 118px; }
}
