* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  background: #f5f5f5;
  height: 100vh;
  overflow: hidden;
}

/* ========== 右侧内容区 ========== */
.content { height: 100vh; width: 100%; }

.view { display: none; flex-direction: column; height: 100vh; }
.view.active { display: flex; }

.view-main {
  flex: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 24px;
  overflow-y: auto;
}

.view-action {
  flex: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f2ff;
  border-top: 2px solid #d0e2ff;
  padding: 20px;
  position: relative;
}

.placeholder { font-size: 26px; color: #888; }
.action-hint { font-size: 20px; color: #6a9be0; }

/* ========== 英语操作区阶段 ========== */
.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 100%;
}

.stage[hidden] { display: none; }

.action-btn {
  font-size: 22px;
  padding: 14px 28px;
  border: 2px solid #7aa7ff;
  border-radius: 12px;
  background: #fff;
  color: #3f6fd8;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.action-btn:hover {
  background: #7aa7ff;
  color: #fff;
}

/* 选中/激活态：蓝底白字，用于循环开关 */
.action-btn.active {
  background: #3f6fd8;
  border-color: #3f6fd8;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(63, 111, 216, 0.35);
}

.back-btn {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 15px;
  padding: 6px 12px;
  border: 1px solid #b9d3ff;
  border-radius: 8px;
  background: #fff;
  color: #5a8fe0;
  cursor: pointer;
  font-family: inherit;
}

.back-btn:hover { background: #f0f6ff; }

.stage-player {
  flex-direction: column;
  gap: 14px;
  padding-top: 20px;
}

.selectors {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.select {
  font-size: 18px;
  padding: 10px 14px;
  border: 2px solid #b9d3ff;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-family: inherit;
  min-width: 130px;
  cursor: pointer;
}

.play-controls {
  display: flex;
  gap: 14px;
}

.play-controls[hidden] { display: none; }

/* ========== 箭头把手 ========== */
.drawer-toggle {
  position: fixed;
  top: 50%;
  left: -11px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #7aa7ff;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  z-index: 30;
  transition: left 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

body.drawer-open .drawer-toggle { left: 209px; }

/* ========== 抽屉式侧边栏 ========== */
.sidebar {
  position: fixed;
  top: 80px;
  bottom: 80px;
  left: 0;
  width: 220px;
  height: auto;
  background: #7aa7ff;
  border-radius: 14px;
  z-index: 20;
  transform: translateX(-210px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

body.drawer-open .sidebar { transform: translateX(0); }

.nav-viewport {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.nav-list {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 30px 16px;
  touch-action: none;
  will-change: transform;
  cursor: grab;
}

.nav-list.dragging { cursor: grabbing; }

.nav-btn {
  font-size: 22px;
  padding: 16px 10px;
  border: 2px solid #ccc;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  color: #333;
  flex-shrink: 0;
}

.nav-btn:hover { border-color: #7aa7ff; }

.nav-btn.active {
  background: #3f6fd8;
  border-color: #3f6fd8;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(63, 111, 216, 0.35);
}

/* ========== 遮罩层 ========== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

body.drawer-open .overlay { opacity: 1; pointer-events: auto; }