.ecm-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 99999;
  display: none;
}
.ecm-overlay.show { display: block; }

.ecm-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: auto;
  width: 30%;
  min-width: 280px;
  max-width: 400px;
  height: fit-content;
  background: #EAEAEA;
  border-radius: 22px;
  box-shadow: 0px 7px 31px rgb(0 0 0);
  padding: 28px 24px 24px;
  box-sizing: border-box;
  animation: ecmFadeIn .2s ease;
}
@keyframes ecmFadeIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

.ecm-close {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  transition: color .2s;
}
.ecm-close:hover { color: #666; }

.ecm-tip {
  font-size: 18px;
  color: #343434;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.5;
}

.ecm-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d9dfea;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 13px;
  color: #333;
  outline: none;
  transition: border-color .2s;
  margin-bottom: 18px;
}
.ecm-input:focus { border-color: #7f97d6; }

.ecm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.ecm-btn {
  min-width: 110px;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 400;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: background .2s, border-color .2s, color .2s;
  flex: 1;
}

.ecm-btn-cancel {
  color: #343434;
  border: 1px solid #d9dfea;
  background: #fff;
  display: block;
  width: 66%;
  margin-top: 12px;
}
.ecm-btn-cancel:hover {
    color: #fff;
  background: #F19700;
  border-color: #F19700;
}

.ecm-input-row {
  display: flex;
  align-items: center;
  gap: 2.5%;
  justify-content: center;
  margin-top: 30px;
  margin-bottom: 25px;
}

.ecm-input-row .ecm-input {
  flex: 0 0 66%;
  width: 66%;
  margin-bottom: 0;
}

.ecm-input-row .ecm-btn-confirm {
  flex: 0 0 31.5%;
  width: 31.5%;
}

.ecm-version-row {
  margin-bottom: 16px;
}

.ecm-version-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.ecm-version-btn {
  min-width: 110px;
  max-width: 200px;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 400;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition: background .2s, border-color .2s, color .2s;
  flex: 1;
  color: #343434;
  border: 1px solid #c5cde8;
  background: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecm-version-btn:hover {
  color: #fff;
  background: #F19700;
  border-color: #F19700;
}

.ecm-version-btn.active {
  color: #fff;
  background: #F19700;
  border-color: #F19700;
}

.ecm-jump-row {
  margin-top: 30px;
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
}

.ecm-btn-jump {
  background: #F19700;
  color: #fff;
  border: 1px solid #F19700;
  width: 66%;
}

.ecm-btn-jump:hover {
  background: #d98500;
  border-color: #d98500;
}

.ecm-btn-confirm {
  color: #343434;
  border: 1px solid #c5cde8;
}
.ecm-btn-confirm:hover {
  color: #fff;
  background: #F19700;
  border-color: #F19700;
}
@media (min-width: 1025px) {
  .show {
      max-width: 100%;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .ecm-modal {
    width: 70%;
    min-width: unset;
    max-width: 360px;
    padding: 24px 20px 20px;
    border-radius: 18px;
  }

  .ecm-close {
    top: 10px;
    right: 12px;
    font-size: 20px;
  }

  .ecm-tip {
    font-size: 1.1rem;
    margin-bottom: 14px;
  }

  .ecm-input-row .ecm-input {
    padding: 9px 12px;
    font-size: 14px;
  }

  .ecm-input-row .ecm-btn-confirm {
    min-width: 60px;
    height: 38px;
    font-size: 13px;
    line-height: 38px;
  }

  .ecm-btn-cancel {
    height: 40px;
    font-size: 13px;
    line-height: 40px;
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .ecm-modal {
    width: 85%;
    padding: 20px 16px 18px;
  }

  .ecm-input-row {
    gap: 8px;
  }

  .ecm-btn-cancel {
    height: 38px;
    font-size: 12px;
    line-height: 38px;
  }
}