/* 序列模仿专属样式（公共组件、变量见 ../../style.css）
   复用护眼童趣主题：暖色底、降饱和柔和配色、大圆角 */

#app {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 760px;
}

#sidebar {
  background: var(--panel);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.actions { display: flex; flex-direction: column; gap: 8px; }

/* 色块数选择器置灰（不可选难度时） */
.control-group.muted { opacity: 0.45; }
.control-group.muted .control-label { color: #aaa; }

/* 主区 */
#play-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px 24px;
  min-height: 420px;
  background: var(--panel);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

/* 状态栏 */
.status-bar {
  font-size: 16px;
  color: var(--primary);
  font-weight: 600;
  min-height: 1.4em;
}

/* 色块容器：relative 包裹，供倒计时叠层定位 */
.grid-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
}

/* 色块容器：正方形，居中 */
.grid {
  display: grid;
  gap: 10px;
  width: 100%;
  aspect-ratio: 1 / 1;
}

/* 倒计时叠层：覆盖在色块上 */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 150px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 10;
  animation: countdownPop .9s ease-out;
}
.countdown-overlay.hidden { display: none; }
@keyframes countdownPop {
  0% { transform: scale(1.6); opacity: 0.3; }
  30% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 色块：大圆角、点亮发光（降亮度的柔光，护眼） */
.simon-pad {
  border: none;
  border-radius: 18px;
  background: var(--pad-color);
  opacity: 0.5;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.06);
  transition: opacity .1s, transform .1s, box-shadow .15s;
  user-select: none;
}
@media (hover: hover) {
  .simon-pad:hover:not(:disabled):not(.lit) { transform: translateY(-2px); opacity: 0.65; }
}
.simon-pad:active:not(:disabled) { transform: scale(0.96); }

/* 点亮：不透明 + 柔和发光（不刺眼） */
.simon-pad.lit {
  opacity: 1;
  box-shadow: 0 0 20px 3px var(--pad-color), inset 0 0 0 2px rgba(255,255,255,0.35);
  transform: scale(1.03);
}

/* 点错闪红 */
.simon-pad.error {
  opacity: 1;
  background: #e54848 !important;
  box-shadow: 0 0 24px 4px #e54848;
  animation: shake .4s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.simon-pad.disabled { opacity: 0.3; cursor: default; }
.simon-pad:disabled { cursor: default; }

/* 结束弹窗记录行 */
.modal-content .win-record { color: var(--primary); font-size: 15px; min-height: 1.2em; }

/* 响应式 */
@media (max-width: 640px) {
  #app { grid-template-columns: 1fr; }
  #play-area { padding: 22px 16px; min-height: 320px; }
  .grid { gap: 8px; max-width: 340px; }
  .simon-pad { border-radius: 14px; }
}
