* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Noto Sans', sans-serif;
  background: #f5f5f5;
  color: #222;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#game-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

#stage-info {
  margin-bottom: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

#stage-number {
  font-size: 14px;
  font-weight: 600;
}

#help-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #fff;
  color: #666;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

#help-btn:active {
  background: #f5f5f5;
  transform: scale(0.95);
}

#current-stage {
  color: #4a9eff;
}

#hint-text {
  font-size: 12px;
  color: #888;
  min-height: 16px;
}

#play-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.zone {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  position: relative;
}

.zone-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 6px;
  font-weight: 600;
}

#physical-zone, #concept-zone {
  flex: 0 0 auto;
}

.items-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.item {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.item:active {
  cursor: grabbing;
}

.item.dragging {
  opacity: 0.5;
  transform: scale(1.05);
}

.item.physical {
  border-color: #4a9eff;
}

.item.concept {
  border-color: #ff6b9d;
}

#fusion-zone {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#fusion-slots {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 4px;
}

.fusion-slot {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 10px;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.fusion-slot.drag-over {
  border-color: #4a9eff;
  background: rgba(74, 158, 255, 0.1);
}

.fusion-slot.complete {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.05);
  border-style: solid;
}

.fusion-slot .item {
  margin: 0;
}

.fusion-slot .plus {
  color: #666;
  font-size: 18px;
  font-weight: 300;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 24px;
  max-width: 320px;
  text-align: center;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: #222;
}

.help-content {
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
}

.help-content p {
  margin-bottom: 14px;
}

.help-content strong {
  color: #222;
  display: block;
  margin-bottom: 4px;
}

.help-content .tip {
  background: rgba(74, 158, 255, 0.1);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #4a9eff;
  margin-bottom: 0;
  font-size: 12px;
}

#result-text {
  font-size: 16px;
  margin-bottom: 20px;
  line-height: 1.5;
}

#next-btn, #close-help-btn {
  padding: 12px 28px;
  background: #4a9eff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 8px;
}

#next-btn:active, #close-help-btn:active {
  background: #3a8eef;
}