* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: manipulation;
}

body {
  background: #0d0f17;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
}

.game-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 360px;
  padding: 0 10px;
}

.title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #00f3ff;
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}

.setting-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.setting-label {
  font-size: 9px;
  font-weight: 700;
  color: #667085;
}

.selector-container {
  display: flex;
  gap: 6px;
}

.diff-btn {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: bold;
  background: #1a1e2d;
  color: #888;
  border: 1px solid #333;
  border-radius: 12px;
  cursor: pointer;
}

.diff-btn.active {
  background: #00f3ff;
  color: #0d0f17;
  border-color: #00f3ff;
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

#start-btn {
  padding: 6px 24px;
  font-size: 13px;
  font-weight: bold;
  color: #0d0f17;
  background: linear-gradient(135deg, #00f3ff, #ff007f);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 243, 255, 0.4);
}

.info-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 270px;
  font-weight: 700;
  font-size: 13px;
}

#combo-board {
  color: #ff007f;
}

#judge-display {
  height: 20px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
}

.pop-anim {
  transform: scale(1.2);
}

#game-container {
  position: relative;
  width: 100%;
  max-width: 270px;
  height: 330px;
  background: rgba(20, 24, 38, 0.9);
  border: 2px solid #00f3ff;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
  overflow: hidden;
  touch-action: none;
}

.lane-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
}

#target-line {
  position: absolute;
  top: 270px;
  left: 0;
  width: 100%;
  height: 12px;
  background: rgba(255, 0, 127, 0.3);
  border-top: 2px solid #ff007f;
  border-bottom: 2px solid #ff007f;
}

.touch-zones {
  position: absolute;
  top: 270px;
  bottom: 0;
  width: 100%;
  display: flex;
}

.zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  border-right: 1px dashed rgba(255, 255, 255, 0.05);
  transition: background 0.1s;
}

.zone.active {
  background: rgba(0, 243, 255, 0.2);
  color: #fff;
}

/* 通常ノーツ */
.note {
  position: absolute;
  width: 31%;
  height: 12px;
  background: linear-gradient(180deg, #00f3ff, #00aaff);
  border-radius: 4px;
  box-shadow: 0 0 8px #00f3ff;
  will-change: top;
  pointer-events: none;
  display: none;
}

/* ロングノーツ */
.long-note {
  position: absolute;
  width: 31%;
  background: linear-gradient(180deg, #ff007f, #ff66b2);
  border-radius: 4px;
  box-shadow: 0 0 8px #ff007f;
  opacity: 0.85;
  will-change: top, height;
  pointer-events: none;
  display: none;
}

.long-note.holding {
  box-shadow: 0 0 15px #ff007f, 0 0 25px #ffffff;
}