body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}
.exercise-panel {
  max-width: 800px;
  margin: 10px auto 0 auto;
  background-color: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
h2 {
  text-align: center;
  color: #333;
  font-size: 18px;
  margin: 10px 0 15px 0;
  line-height: 1.3;
}
.notes {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #1a237e;
  line-height: 1.4;
}
.notes ul {
  margin: 8px 0 0 14px;
  padding-left: 0;
}
.notes li {
  margin-bottom: 4px;
}
.section {
  margin-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 16px;
}
.section:last-child {
  border-bottom: none;
}
.section-title {
  font-size: 15px;
  color: #1976d2;
  margin-bottom: 12px;
  font-weight: bold;
  line-height: 1.3;
}
.sentence {
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}
.blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 2px dashed #ccc;
  margin: 0 2px;
  min-height: 20px;
  text-align: center;
  padding: 2px 4px;
  background-color: #f9f9f9;
  cursor: pointer;
  position: relative;
  font-size: 13px;
  vertical-align: middle;
}
.blank small {
  color: #666;
  font-size: 9px;
  position: absolute;
  top: -6px;
  left: -6px;
  background: #e6e6e6;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.blank.filled.correct {
  border-bottom-color: #4CAF50;
  background-color: #e8f5e9;
}
.blank.filled.incorrect {
  border-bottom-color: #f44336;
  background-color: #fdecea;
}
.keywords-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 8px;
  padding: 12px 8px;
  background-color: #f0f8ff;
  border-radius: 8px;
  gap: 6px;
}
.draggable {
  display: inline-block;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid #999;
  border-radius: 5px;
  font-size: 16px;
  cursor: grab;
  background-color: #fff;
  user-select: none;
  position: relative;
  touch-action: none;
  min-width: 60px;
  text-align: left !important;
}
.draggable.dragging {
  opacity: 0.5;
  cursor: grabbing;
}
.draggable.used {
  background-color: #f0f0f0;
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
}
.draggable.selected {
  background-color: #1976d2;
  color: white;
  border-color: #1565c0;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}
.draggable-label {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #59a6f2;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  border-radius: 50%;
  width: 13px;
  height: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  pointer-events: none;
}
.cantonese {
  color: #388e3c;
  font-size: 13px;
  margin-right: 6px;
  display: block;
  margin-bottom: 4px;
}
#toggle-answers-btn {
  float: right;
  margin-bottom: 10px;
  padding: 8px 12px;
  font-size: 12px;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
#toggle-answers-btn:hover {
  background: #1565c0;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .exercise-panel {
    margin: 5px;
    padding: 12px;
    border-radius: 8px;
  }
  h2 {
    font-size: 16px;
    margin: 5px 0 10px 0;
  }
  .notes {
    font-size: 12px;
    padding: 10px 12px;
  }
  .section-title {
    font-size: 14px;
    margin-bottom: 10px;
  }
  .sentence {
    font-size: 13px;
    margin: 10px 0;
    line-height: 1.5;
  }
  .cantonese {
    font-size: 12px;
    margin-bottom: 6px;
  }
  .blank {
    min-width: 70px;
    font-size: 12px;
    padding: 3px;
    margin: 0 1px;
  }
  .blank small {
    width: 12px;
    height: 12px;
    font-size: 8px;
    top: -5px;
    left: -5px;
  }
  .keywords-container {
    padding: 8px 4px;
    gap: 4px;
    justify-content: flex-start;
  }
  .draggable {
    font-size: 11px;
    padding: 6px 8px;
    min-width: 50px;
    text-align: left !important;
  }
  .draggable-label {
    width: 14px;
    height: 14px;
    font-size: 7px;
    top: -3px;
    right: -3px;
  }
  #toggle-answers-btn {
    font-size: 11px;
    padding: 6px 10px;
    margin-bottom: 8px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .exercise-panel {
    margin: 2px;
    padding: 8px;
  }
  h2 {
    font-size: 15px;
  }
  .notes {
    font-size: 11px;
    padding: 8px 10px;
  }
  .section-title {
    font-size: 13px;
  }
  .sentence {
    font-size: 12px;
  }
  .cantonese {
    font-size: 11px;
  }
  .blank {
    min-width: 60px;
    font-size: 11px;
  }
  .keywords-container {
    padding: 6px 2px;
    justify-content: flex-start;
  }
  .draggable {
    font-size: 10px;
    padding: 5px 6px;
    min-width: 45px;
    text-align: left !important;
  }
} 