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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #ffeef8 0%, #fff7e6 50%, #e8f4ff 100%);
  min-height: 100vh;
  color: #333;
  -webkit-tap-highlight-color: transparent;
}

body {
  padding: 20px 16px 40px;
  user-select: none;
  -webkit-user-select: none;
}

.app {
  max-width: 480px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 10px;
}

.lang-pill {
  background: white;
  border: 2px solid #ffd1dc;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #b18a9b;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}

.lang-pill.active {
  background: linear-gradient(135deg, #ff6b9d, #ff4f8b);
  border-color: #ff6b9d;
  color: white;
}

.lang-pill:active {
  transform: translateY(1px);
}

.title {
  text-align: center;
  font-size: 26px;
  margin-bottom: 16px;
  color: #ff6b9d;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  word-break: break-word;
}

.name-edit-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s, transform 0.1s;
  padding: 4px;
  line-height: 1;
}

.name-edit-btn:hover { opacity: 1; }
.name-edit-btn:active { transform: scale(0.9); }

.name-edit-hint {
  text-align: center;
  font-size: 13px;
  color: #b18a9b;
  margin: -8px 0 16px;
  font-style: italic;
  cursor: pointer;
  opacity: 0.9;
  letter-spacing: 0;
  font-weight: 400;
  animation: hint-bob 2.4s ease-in-out infinite;
}

.name-edit-hint:hover { opacity: 1; color: #ff6b9d; }
.name-edit-hint:active { transform: scale(0.97); }
.name-edit-hint.hidden { display: none; }

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

.wheel-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  filter: drop-shadow(0 8px 20px rgba(255, 107, 157, 0.25));
}

.wheel.grabbing { cursor: grabbing; }
.wheel.locked    { cursor: not-allowed; opacity: 0.7; }

.pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 42px;
  color: #ff4757;
  z-index: 10;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.3));
  pointer-events: none;
  line-height: 1;
}

.empty-hint {
  position: absolute;
  color: #b18a9b;
  font-size: 16px;
  pointer-events: none;
}

.locked-card {
  background: white;
  border-radius: 24px;
  padding: 22px 20px 24px;
  margin: 0 0 20px;
  box-shadow: 0 6px 24px rgba(255, 107, 157, 0.15);
  text-align: center;
  border: 3px solid #ffd1dc;
  animation: pop 0.35s ease-out;
}

@keyframes pop {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.locked-card.hidden { display: none; }

.locked-label {
  color: #888;
  font-size: 14px;
}

.locked-task {
  font-size: 26px;
  font-weight: 700;
  color: #ff6b9d;
  margin: 10px 0 18px;
  word-break: break-word;
}

.complete-btn {
  background: linear-gradient(135deg, #4ecdc4, #44b3aa);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 14px 36px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(78, 205, 196, 0.4);
  transition: transform 0.1s, box-shadow 0.1s;
}

.complete-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 8px rgba(78, 205, 196, 0.4);
}

.locked-tip {
  margin-top: 12px;
  font-size: 13px;
  color: #aaa;
}

.todo-section {
  background: white;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  transition: opacity 0.2s;
}

.todo-section.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.todo-input {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.todo-input input {
  flex: 1;
  border: 2px solid #ffd1dc;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 16px;
  outline: none;
  background: #fffafc;
  transition: border-color 0.2s;
}

.todo-input input:focus {
  border-color: #ff6b9d;
  background: white;
}

.todo-input button {
  background: linear-gradient(135deg, #ff6b9d, #ff4f8b);
  color: white;
  border: none;
  border-radius: 14px;
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255, 107, 157, 0.3);
}

.todo-input button:active {
  transform: translateY(1px);
}

.task-list {
  list-style: none;
}

.task-list:empty::before {
  content: attr(data-empty);
  display: block;
  text-align: center;
  color: #c8a4b3;
  padding: 14px 0;
  font-size: 14px;
}

.task-list li {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #fff5f9;
  border-radius: 14px;
  margin-bottom: 8px;
  font-size: 16px;
}

.task-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-text {
  flex: 1;
  word-break: break-word;
}

.delete-btn {
  background: transparent;
  border: none;
  color: #ff8aa9;
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}

.delete-btn:active {
  color: #ff4757;
}

@media (max-width: 360px) {
  .title { font-size: 24px; }
  .locked-task { font-size: 22px; }
}
