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

html, body { height: 100%; }

body {
  background: #000;
  overflow: hidden;
  color: #fff;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* 提示 */
.hint {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(30, 30, 40, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  white-space: nowrap;
  z-index: 15;
  transition: opacity 0.5s;
}

/* 左下工具栏 */
.toolbar {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
}

.btn {
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.btn:hover { background: rgba(255, 255, 255, 0.22); }
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.export-btn {
  background: rgba(255, 90, 120, 0.25);
  border-color: rgba(255, 120, 150, 0.4);
}
.export-btn:hover { background: rgba(255, 90, 120, 0.38); }

/* 时长选择 */
.dur-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  padding: 7px 28px 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='white' opacity='0.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.dur-select option { background: #1a1a24; color: #fff; }
.dur-select:disabled { opacity: 0.5; cursor: not-allowed; }

/* 导出设置面板 */
.settings-panel {
  position: fixed;
  left: 16px;
  bottom: 66px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 18, 28, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.settings-btn {
  background: rgba(120, 140, 255, 0.25);
  border-color: rgba(140, 160, 255, 0.4);
}
.settings-btn:hover { background: rgba(120, 140, 255, 0.4); }

/* 效果菜单面板 */
.menu-panel {
  position: fixed;
  left: 16px;
  bottom: 66px;
  z-index: 9;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(18, 18, 28, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.effect-option {
  border: none;
  cursor: pointer;
  color: #ddd;
  background: transparent;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.effect-option:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.effect-option.active { background: rgba(255, 120, 160, 0.3); color: #fff; }

/* 录制状态 */
.record-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 40, 60, 0.2);
  border: 1px solid rgba(255, 80, 100, 0.4);
  font-size: 14px;
}

.record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4757;
  animation: blink 1s infinite;
}

/* 提示条 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(30, 30, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 14px;
  z-index: 20;
  transition: opacity 0.4s;
}

.hidden { display: none !important; }

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}