* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6fa;
  color: #1f2a44;
}

.hero {
  background: linear-gradient(120deg, #2f6fed, #6ea3ff);
  color: #fff;
  padding: 32px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.container {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 20px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 3fr) minmax(0, 0.7fr);
  gap: 20px;
  align-items: start;
}

.main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  background: #fff;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(31, 42, 68, 0.06);
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 600;
  font-size: 14px;
}

.emoji-hint {
  font-size: 12px;
  color: #6b7380;
  background: #f2f5ff;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(47, 111, 237, 0.2);
}

.field input,
.field select {
  border: 1px solid #d9dce5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#addTaskBtn {
  background: #2f6fed;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#addTaskBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(47, 111, 237, 0.2);
}

.ghost {
  background: #fff;
  color: #2f6fed;
  border: 1px solid rgba(47, 111, 237, 0.4);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.ghost:hover {
  background: rgba(47, 111, 237, 0.08);
  box-shadow: 0 10px 18px rgba(47, 111, 237, 0.12);
}

.matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.quadrant {
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 12px;
  min-height: 280px;
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.06);
  display: flex;
  flex-direction: column;
  position: relative;
}

.quadrant[data-quadrant="urgent-important"] {
  background: rgba(235, 77, 75, 0.08);
}

.quadrant[data-quadrant="important-not-urgent"] {
  background: rgba(240, 147, 43, 0.08);
}

.quadrant[data-quadrant="urgent-not-important"] {
  background: rgba(72, 126, 176, 0.08);
}

.quadrant[data-quadrant="not-urgent-not-important"] {
  background: rgba(46, 204, 113, 0.08);
}

.quadrant h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.quadrant .hint {
  font-size: 12px;
  color: #6b7380;
  margin-bottom: 12px;
}

.task-list {
  list-style: none;
  position: relative;
  min-height: 180px;
}

.task-item {
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: absolute;
  min-width: 110px;
  max-width: 140px;
  box-shadow: 0 8px 12px rgba(31, 42, 68, 0.1);
}

.emoji-picker {
  position: absolute;
  top: 36px;
  left: 8px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 20px rgba(31, 42, 68, 0.16);
  padding: 6px;
  display: flex;
  gap: 6px;
  z-index: 5;
  border: 1px solid rgba(47, 111, 237, 0.2);
}

.emoji-option {
  border: none;
  background: rgba(47, 111, 237, 0.08);
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}

.emoji-option:hover {
  background: rgba(47, 111, 237, 0.18);
  transform: translateY(-1px);
}

.task-item:hover {
  transform: translateX(2px);
}

.task-item.dragging {
  cursor: grabbing;
  opacity: 0.8;
  box-shadow: 0 12px 18px rgba(31, 42, 68, 0.18);
}

.task-emoji {
  font-size: 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0 2px;
}

.task-text {
  flex: 1;
  line-height: 1.3;
}

.priority-red {
  background: rgba(235, 77, 75, 0.15);
  color: #c0392b;
  border: 1px solid rgba(235, 77, 75, 0.35);
}

.priority-orange {
  background: rgba(240, 147, 43, 0.15);
  color: #d35400;
  border: 1px solid rgba(240, 147, 43, 0.35);
}

.priority-blue {
  background: rgba(72, 126, 176, 0.15);
  color: #2c3e50;
  border: 1px solid rgba(72, 126, 176, 0.35);
}

.priority-green {
  background: rgba(46, 204, 113, 0.15);
  color: #1e8449;
  border: 1px solid rgba(46, 204, 113, 0.35);
}

.footer {
  text-align: center;
  color: #6b7380;
  font-size: 12px;
  padding-bottom: 30px;
}

.pending-panel {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 24px rgba(31, 42, 68, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 24px;
  min-height: 560px;
}

.pending-panel h3 {
  font-size: 18px;
}

.pending-header .hint {
  font-size: 12px;
  color: #6b7380;
}

.pending-area {
  position: relative;
  border-radius: 14px;
  padding: 14px;
  background: #f7f9ff;
  border: 1px dashed rgba(47, 111, 237, 0.2);
  min-height: 440px;
  overflow: hidden;
}

.pending-tip {
  display: inline-block;
  font-size: 12px;
  color: #6b7380;
  margin-bottom: 8px;
}

.pending-list {
  min-height: 210px;
}

.pending-list .task-item {
  min-width: 105px;
  max-width: 135px;
}

.trash-panel {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 18px rgba(31, 42, 68, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 24px;
}

.trash-panel h3 {
  font-size: 16px;
}

.trash-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.trash-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ghost.danger {
  border-color: rgba(231, 76, 60, 0.45);
  color: #e74c3c;
}
.ghost.danger:hover {
  background: rgba(231, 76, 60, 0.12);
  box-shadow: 0 10px 18px rgba(231, 76, 60, 0.12);
}

.trash-bin {
  border: 2px dashed rgba(47, 111, 237, 0.35);
  border-radius: 16px;
  padding: 22px 14px;
  text-align: center;
  color: #2f6fed;
  font-weight: 600;
  background: rgba(47, 111, 237, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.trash-bin.active {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.15);
  color: #c0392b;
}

.trash-content {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.trash-content.expanded {
  display: flex;
}
.trash-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.trash-item {
  font-size: 12px;
  color: #6b7380;
  background: #f2f4fa;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid transparent;
  transition: border 0.2s ease, background 0.2s ease;
}

.trash-item-title {
  font-weight: 600;
  color: #1f2a44;
  font-size: 13px;
}


@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .matrix {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .trash-panel {
    position: static;
  }

  .pending-panel {
    position: static;
  }
}