/* =========================
   英语模式选择弹窗
   经典 Windows 9x 窗口风格
========================= */

.mode-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(10, 15, 30, 0.55);

  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

.mode-overlay[hidden] {
  display: none;
}

/* -------------------------
   Win9x 窗口外壳
------------------------- */
.mode-modal {
  position: relative;

  width: min(420px, 92vw);

  /* 外层凸起边框 */
  border: 2px solid;
  border-color:
    #dfdfdf
    #0a0a0a
    #0a0a0a
    #dfdfdf;

  background: #c0c0c0;

  box-shadow:
    6px 6px 0 rgba(0, 0, 0, 0.25);

  font-family:
    "Tahoma",
    "Microsoft Sans Serif",
    "MS Sans Serif",
    "Microsoft YaHei",
    sans-serif;

  color: #000;

  animation: modePop 0.18s ease both;
}

.mode-modal::before {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  /* 内层凹陷边框 */
  border: 2px solid;
  border-color:
    #ffffff
    #808080
    #808080
    #ffffff;
}

@keyframes modePop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* -------------------------
   标题栏
------------------------- */
.mode-title-bar {
  position: relative;
  z-index: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;

  height: 30px;
  padding: 0 3px 0 8px;

  background:
    linear-gradient(
      90deg,
      #000080 0%,
      #1084d0 100%
    );

  color: #fff;

  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.mode-title-text {
  flex: 1;

  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

/* -------------------------
   关闭按钮
------------------------- */
.mode-close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 20px;
  padding: 0;

  border: 2px solid;
  border-color:
    #ffffff
    #0a0a0a
    #0a0a0a
    #ffffff;

  background: #c0c0c0;

  color: #000;

  font-size: 15px;
  line-height: 1;

  cursor: pointer;
}

.mode-close::before {
  content: "";

  position: absolute;
  inset: 0;

  pointer-events: none;

  border: 1px solid;
  border-color:
    #c0c0c0
    #808080
    #808080
    #c0c0c0;
}

.mode-close:hover {
  background: #d4d4d4;
}

.mode-close:active {
  border-color:
    #0a0a0a
    #ffffff
    #ffffff
    #0a0a0a;
}

/* -------------------------
   窗口内容区
------------------------- */
.mode-window-body {
  position: relative;
  z-index: 1;

  padding: 18px 20px 20px;
}

.mode-desc {
  margin: 0 0 14px;

  font-size: 13px;
  line-height: 1.45;

  color: #000;
}

/* -------------------------
   选项列表
------------------------- */
.mode-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 10px;

  width: 100%;
  padding: 10px 12px;

  border: 2px solid;
  border-color:
    #ffffff
    #808080
    #808080
    #ffffff;

  background: #c0c0c0;

  color: #000;

  font: inherit;
  font-size: 13px;
  text-align: left;

  cursor: pointer;
}

.mode-option:hover {
  background: #d4d4d4;
}

.mode-option:active {
  border-color:
    #808080
    #ffffff
    #ffffff
    #808080;
}

.mode-option.is-active {
  background: #000080;

  color: #fff;
}

.mode-option.is-active:hover {
  background: #000090;
}

/* -------------------------
   复古单选圆点
------------------------- */
.mode-radio {
  position: relative;

  flex-shrink: 0;

  width: 14px;
  height: 14px;

  border: 1px solid #000;
  border-radius: 50%;

  background: #fff;

  box-shadow:
    inset 1px 1px 0 #808080,
    inset -1px -1px 0 #fff;
}

.mode-option.is-active .mode-radio::after {
  content: "";

  position: absolute;
  top: 50%;
  left: 50%;

  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #000;

  transform: translate(-50%, -50%);
}

.mode-option.is-active .mode-radio {
  background: #fff;
}

.mode-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mode-option-name {
  font-weight: 700;
}

.mode-option-note {
  font-size: 11px;

  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .mode-modal {
    animation: none;
  }
}
