* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; }
body.light { background: #fff; }
canvas { display: block; width: 100%; height: 100%; }

.overlay {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 10; display: flex; flex-direction: column; align-items: center;
  gap: 12px;
}
.title {
  font-size: 32px;
  font-weight: 700;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #fff;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
body.light .title { color: #000; }
.btn-row { display: flex; gap: 10px; }
.play-btn {
  padding: 14px 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: 17px;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.35s;
}
.play-btn:hover {
  border-color: rgba(255,255,255,0.4);
  background: #111;
}
body.light .play-btn {
  border-color: rgba(0,0,0,0.15);
  background: #fff;
  color: #000;
}
body.light .play-btn:hover {
  border-color: rgba(0,0,0,0.3);
  background: #eee;
}
.overlay.hidden { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.9); transition: all 0.4s; }

.small-btn {
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: #000;
  color: #aaa;
  font-size: 12px;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  cursor: pointer;
  transition: all 0.3s;
}
.small-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); }
.small-btn.on { color: #fff; border-color: rgba(255,255,255,0.3); background: #222; }
body.light .small-btn {
  border-color: rgba(0,0,0,0.12);
  background: #fff;
  color: #666;
}
body.light .small-btn:hover { color: #000; border-color: rgba(0,0,0,0.25); }
body.light .small-btn.on { color: #000; border-color: rgba(0,0,0,0.25); background: #eee; }

.status {
  font-size: 12px; color: #888;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  min-height: 16px;
}
body.light .status { color: #666; }
.hint {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 5; font-size: 11px; color: #666;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  opacity: 0; transition: opacity 0.6s;
}
body.light .hint { color: #999; }
.hint.show { opacity: 1; }

.crop-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.85);
  display: none; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px;
  overflow: auto; -webkit-overflow-scrolling: touch;
  padding: 20px;
}
.crop-overlay.show { display: flex; }
.crop-overlay canvas {
  cursor: grab; flex-shrink: 0;
  touch-action: none;
}
.crop-overlay canvas:active { cursor: grabbing; }
.crop-hint {
  font-size: 13px; color: #999;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
.crop-btns { display: flex; gap: 12px; }
.crop-btns .small-btn { font-size: 14px; padding: 10px 28px; }

@media (max-width: 767px) {
  .crop-overlay { gap: 12px; padding: 16px; }
  .crop-hint { font-size: 14px; }
  .crop-btns .small-btn { font-size: 15px; padding: 12px 32px; }
  .crop-btns { gap: 16px; }
}

.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 50; background: rgba(255,255,255,0.1);
  opacity: 0; transition: opacity 0.3s;
}
.progress-bar.show { opacity: 1; }
.progress-fill {
  height: 100%; width: 0%;
  background: #fff;
  transition: width 0.1s linear;
}
body.light .progress-bar { background: rgba(0,0,0,0.08); }
body.light .progress-fill { background: #333; }

.mobile-wheel {
  position: fixed; bottom: 24px; right: 16px; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mw-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.6); color: #fff; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  -webkit-tap-highlight-color: transparent;
}
body.light .mw-btn {
  border-color: rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.7); color: #333;
}
.mw-ctrls {
  display: none; flex-direction: column; align-items: center; gap: 4px;
}
.mw-ctrls.show { display: flex; }
.mw-val {
  font-size: 13px; color: #aaa;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
body.light .mw-val { color: #666; }
@media (min-width: 768px) {
  .mobile-wheel { display: none; }
}

.back-btn {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 30;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.55); color: #fff; font-size: 16px;
  cursor: pointer; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.back-btn.show { display: flex; }
@media (min-width: 768px) {
  .back-btn { display: none !important; }
}
