.stage {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  place-items: center;
  position: relative;
  min-height: 520px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  margin-bottom: 14px;
}

.stage-inner {
  position: relative;
  width: 100%;
  height: 480px;
  background: repeating-conic-gradient(#222 0 25%, #1a1a1a 0 50%) 50% / 20px
    20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: grid;
  place-items: center;
  outline: none;
}

.hint {
  position: absolute;
  bottom: 12px;
  left: 16px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 旋轉方塊 */
.box {
  width: 220px;
  height: 220px;
  transform-style: preserve-3d;
}
.box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #90caf9, #42a5f5);
  border-radius: 12px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.2);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.panel-section {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.panel-section h2 {
  font-size: 13px;
  margin: 0 0 8px 0;
  color: #cfd6e6;
  letter-spacing: 0.2px;
}

button {
  width: 100%;
  background: #0f1218;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  margin-bottom: 8px;
}

button:hover {
  border-color: #3a82f6;
}

label {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

input[type="range"],
input[type="text"] {
  width: 100%;
  background: #0f1218;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 4px;
}

.status {
  margin-top: 10px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  color: #666;
}

.filter-hint {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  font-style: italic;
}

/* 紀錄 */
.log {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0f1218;
}

.log li {
  font-size: 12px;
  padding: 6px 8px;
  border-bottom: 1px solid #222;
  color: #ccc;
}

.log li:last-child {
  border-bottom: none;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1100px) {
  .demo-grid {
    grid-template-columns: 1fr 340px;
  }
}

@media (max-width: 900px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}
