.duel-negotiation {
  box-sizing: border-box;
  width: 100%;
  /* Default (mobile/medium): minimal gutters */
  padding: 0 12px;
}

.duel-negotiation * {
  box-sizing: border-box;
}

/* Wide screens: show a centered "floating column" */
@media (min-width: 1200px) {
  .duel-negotiation {
    padding: 0 clamp(24px, 10vw, 280px);
  }
}

.duel-negotiation__inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  background: none;
  padding: 18px 16px 16px;
  color: #e8eef7;
  overflow-x: hidden;
}

.duel-matchup {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  margin-bottom: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 1;
  min-height: 160px;
}

.duel-matchup__side {
  position: relative;
  padding: 14px 14px;
  overflow: hidden;
  min-width: 0;
  height: 100%;
}

.duel-matchup__side--left {
  background: #1f3a5c;
  border-radius: 6px 0 0 6px;
}

.duel-matchup__side--right {
  background: #4b2330;
  border-radius: 0 6px 6px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.duel-matchup__role {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.duel-matchup__handle {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
}

.duel-matchup__role--tl {
  position: absolute;
  top: 12px;
  left: 12px;
}

.duel-matchup__handle--tl {
  position: absolute;
  top: 25px;
  left: 12px;
}

.duel-matchup__handle--br {
  position: absolute;
  bottom: 26px;
  right: 26px; /* leave room for overlay scrollbars */
  text-align: right;
  max-width: calc(100% - 52px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-matchup__role--br {
  position: absolute;
  bottom: 12px;
  right: 26px; /* leave room for overlay scrollbars */
  text-align: right;
  max-width: calc(100% - 52px);
}

.duel-matchup__vs {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-size: 26px;
  font-weight: 800;
  opacity: 0.95;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.duel-status-row {
  display: flex;
  justify-content: center;
  margin: 10px 0 14px;
}

.duel-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
}

.duel-status__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f1c232;
  box-shadow: 0 0 0 4px rgba(241, 194, 50, 0.15);
}

.duel-status__text {
  color: #e8eef7;
}

.duel-status--muted .duel-status__dot {
  background: #8892a0;
  box-shadow: 0 0 0 4px rgba(136, 146, 160, 0.15);
}

.duel-status--muted .duel-status__text {
  color: #8892a0;
}

.duel-status--warn .duel-status__dot {
  background: #f1c232;
  box-shadow: 0 0 0 4px rgba(241, 194, 50, 0.15);
}

.duel-status--warn .duel-status__text {
  color: #f1c232;
}

.duel-status--ok .duel-status__dot {
  background: #3dbb5f;
  box-shadow: 0 0 0 4px rgba(61, 187, 95, 0.16);
}

.duel-status--ok .duel-status__text {
  color: #3dbb5f;
}

.duel-status--info .duel-status__dot {
  background: #5bc0de;
  box-shadow: 0 0 0 4px rgba(91, 192, 222, 0.16);
}

.duel-status--info .duel-status__text {
  color: #5bc0de;
}

.duel-proposals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.duel-proposal {
  border-radius: 6px;
  padding: 12px 12px;
  border: none;
  background: #101a26;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.duel-proposal--mine {
  background: #162b43;
}

.duel-proposal--theirs {
  background: #2a1620;
}

.duel-proposal .btn {
  width: 100%;
}

.duel-proposal__heading,
.duel-proposal__body,
.duel-proposal__time-utc,
.duel-proposal__time-local,
.duel-proposal__waiting,
.duel-proposal__empty {
  text-align: center;
}

.duel-proposal__heading {
  font-size: 11px;
  opacity: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.duel-proposal__time-utc {
  font-size: 18px;
  font-weight: 800;
  color: #2ed1e3; /* highlight UTC as canonical */
}

.duel-proposal__time-local {
  font-size: 13px;
  opacity: 1;
  margin-top: 4px;
}

.duel-proposal__empty,
.duel-proposal__waiting {
  font-size: 18px;
  font-weight: 800;
  opacity: 1;
  padding: 0;
}

.duel-status-box {
  margin-top: 12px;
}

.duel-cancel {
  margin-top: 14px;
}

.duel-cancel__btn {
  width: 100%;
  font-weight: 800;
  letter-spacing: 0.03em;
}

/* ------------------------------
   Duel pre-round countdown (IMP-134)
-------------------------------- */
.duel-preround {
  position: relative;
  margin-top: 6px;
  padding-bottom: 18px;
}

.duel-preround__utcnow {
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.duel-preround__status {
  margin: 6px 0 6px;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
  color: #9aa3af;
}

.duel-preround__countdown {
  text-align: center;
  font-weight: 900;
  font-size: clamp(44px, 9vw, 78px);
  line-height: 1.05;
  color: #3dbb5f;
  text-shadow: 0 0 22px rgba(61, 187, 95, 0.12);
  margin: 6px 0 6px;
  /* Some site fonts omit ":" glyph; force a safe font for HH:MM:SS */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.duel-preround__timebox {
  margin: 14px auto 0;
  width: 100%;
  border-radius: 10px;
  background: rgba(61, 187, 95, 0.12);
  padding: 16px 12px;
  text-align: center;
}

.duel-preround__time-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
  color: #e8eef7;
}

.duel-preround__time-utc {
  font-size: 18px;
  font-weight: 900;
  color: #e8eef7;
}

.duel-preround__time-local {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.duel-preround__cancel {
  margin-top: 12px;
  width: 100%;
  font-weight: 900;
  letter-spacing: 0.04em;
  height: 44px;
}

/* ------------------------------
   Duel active screen (IMP-135)
-------------------------------- */
.duel-active {
  position: relative;
  margin-top: 6px;
  padding-bottom: 18px;
}

.duel-active__utcnow {
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.duel-active__elapsed {
  text-align: center;
  font-weight: 900;
  font-size: clamp(44px, 9vw, 78px);
  line-height: 1.05;
  color: #f5a623; /* bright orange/amber */
  text-shadow: 0 0 22px rgba(245, 166, 35, 0.16);
  margin: 10px 0 6px;
  /* Some site fonts omit ":" glyph; force a safe font for HH:MM:SS */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.duel-active__label {
  margin: 6px 0 6px;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
  color: #8892a0;
}

.duel-active__timebox {
  margin: 14px auto 0;
  width: 100%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 16px 12px;
  text-align: center;
}

.duel-active__time-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
  color: #8892a0;
}

.duel-active__time-utc {
  font-size: 18px;
  font-weight: 900;
  color: #e8eef7;
}

.duel-active__time-local {
  margin-top: 6px;
  font-size: 13px;
  color: #8892a0;
}

/* ------------------------------
   Duel results screen (IMP-137)
-------------------------------- */
.duel-results {
  position: relative;
  margin-top: 6px;
  padding-bottom: 18px;
}

.duel-results__utcnow {
  position: absolute;
  top: -2px;
  left: 2px;
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.02em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.duel-results__complete {
  text-align: center;
  margin: 10px 0 0;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
  color: #8892a0;
}

.duel-results__elapsed {
  text-align: center;
  font-weight: 900;
  font-size: clamp(44px, 9vw, 78px);
  line-height: 1.05;
  color: #e8eef7; /* neutral */
  text-shadow: 0 0 22px rgba(232, 238, 247, 0.10);
  margin: 10px 0 6px;
  /* Some site fonts omit ":" glyph; force a safe font for HH:MM:SS */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

.duel-results__label {
  margin: 6px 0 6px;
  text-align: center;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
  color: #8892a0;
}

.duel-results__timeflow {
  margin: 14px auto 0;
  width: 100%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 16px 12px;
  text-align: center;
}

.duel-results__timeflow-section {
  width: 100%;
}

.duel-results__timeflow-arrow {
  margin: 12px 0;
  font-size: 22px;
  font-weight: 900;
  color: rgba(232, 238, 247, 0.55);
  text-align: center;
  line-height: 1;
}

.duel-results__time-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 8px;
  color: #8892a0;
}

.duel-results__time-utc {
  font-size: 18px;
  font-weight: 900;
  color: #e8eef7;
}

.duel-results__time-local {
  margin-top: 6px;
  font-size: 13px;
  color: #8892a0;
}

/* Results screen: center content within each side card */
.duel-matchup--results .duel-matchup__side {
  /* Override base matchup layout for results:
     vertically center the handle so it reads "A vs B" on one line,
     and position other elements relative to the handle. */
  position: relative;
}

.duel-matchup--results {
  /* Results cards must fit:
     role + centered name + victor/defeated + bottom CTA.
     The base matchup min-height (160px) is too small and causes overlap on some viewports.
     Keep this scoped to results so other duel screens retain their proportions. */
  min-height: 220px;
}

@media (max-width: 380px) {
  .duel-matchup--results {
    min-height: 240px;
  }
}

.duel-matchup--results .duel-matchup__role--results {
  position: absolute;
  left: 50%;
  top: calc(50% - 34px);
  transform: translateX(-50%);
  text-align: center;
}

.duel-matchup--results .duel-matchup__handle--results {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duel-matchup__result {
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.duel-matchup__result--victor {
  color: #f1c232;
  text-shadow: 0 0 18px rgba(241, 194, 50, 0.18);
}

.duel-matchup__result--defeated {
  color: #ff4d4d;
  text-shadow: 0 0 18px rgba(255, 77, 77, 0.14);
}

.duel-matchup--results .duel-matchup__result {
  position: absolute;
  left: 50%;
  /* Anchor outcome relative to the vertically-centered player name. */
  top: calc(50% + 18px);
  transform: translateX(-50%);
  text-align: center;
}

.duel-matchup__btn.btn-primary {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 360px;
  background: #2f78ff;
  border-color: #2f78ff;
  font-weight: 900;
  letter-spacing: 0.04em;
  height: 44px;
}

.duel-matchup__btn-spacer {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  height: 44px; /* reserve space so both cards feel balanced */
  width: calc(100% - 24px);
  max-width: 360px;
}

/* ------------------------------
   Duel proposal modal (IMP-133)
-------------------------------- */
.duel-propose-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  z-index: 1040; /* under Bootstrap modal (1050), above page content */
  transition: opacity 120ms ease-out;
}

.duel-propose-open .duel-propose-overlay {
  opacity: 1;
  pointer-events: auto;
}

@supports ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .duel-propose-open .duel-propose-overlay {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
}

.duel-propose-modal .duel-propose-modal__dialog {
  width: 100%;
  max-width: 700px;
  margin: 24px auto;
}

.duel-propose-modal .duel-propose-modal__content {
  background: #0f1b2b;
  color: #e8eef7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.duel-propose-modal__header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 18px 16px 10px;
}

.duel-propose-modal__title {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e8eef7;
  margin: 0;
}

.duel-propose-modal__close {
  position: absolute;
  right: 14px;
  top: 12px;
  color: #e8eef7;
  opacity: 0.95;
}

.duel-propose-modal__body {
  padding: 16px;
}

.duel-propose-modal__inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.duel-propose-modal__field label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 6px;
}

.duel-propose-modal__input.form-control {
  background: rgba(255, 255, 255, 0.04);
  color: #e8eef7;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  height: 44px;
}

.duel-propose-modal__input.form-control:focus {
  border-color: rgba(91, 192, 222, 0.75);
  box-shadow: 0 0 0 3px rgba(91, 192, 222, 0.16);
}

.duel-propose-modal__inline-error {
  margin-top: 8px;
  color: #ff6b6b;
  font-weight: 700;
  font-size: 12px;
}

.duel-propose-modal__conversion {
  margin-top: 14px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  text-align: center;
}

.duel-propose-modal__conversion-line {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.duel-propose-modal__conversion-line--utc {
  color: #2ed1e3; /* match arrow cyan/turquoise */
}

.duel-propose-modal__conversion-arrow {
  margin: 10px 0 8px;
  font-size: 22px;
  color: #2ed1e3;
  text-shadow: 0 0 18px rgba(46, 209, 227, 0.18);
}

.duel-propose-modal__status {
  margin-top: 10px;
}

.duel-propose-modal__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 16px 16px;
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.duel-propose-modal__btn {
  flex: 1 1 0;
  font-weight: 900;
  letter-spacing: 0.04em;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-propose-modal__btn--submit.btn-primary {
  background: #2f78ff;
  border-color: #2f78ff;
}

.duel-propose-modal__btn--submit.btn-primary[disabled] {
  opacity: 0.55;
}

/* Mobile: full-screen modal overlay */
@media (max-width: 767px) {
  .duel-propose-modal .duel-propose-modal__dialog {
    margin: 0;
    width: 100%;
    height: 100%;
    max-width: none;
  }

  .duel-propose-modal .duel-propose-modal__content {
    height: 100%;
    border-radius: 0;
  }

  .duel-propose-modal__body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }

  .duel-propose-modal__footer {
    position: sticky;
    bottom: 0;
    background: #0f1b2b;
  }
}

@media (max-width: 420px) {
  .duel-propose-modal__inputs {
    grid-template-columns: 1fr;
  }
}

